I have integrated google-api-php-client using composer in my Codeigniter PHP application. Google_Client is created successfully, and able to fetch sample api for Google Books. PhotoGallery service not working.
$client = new Google_Client();
$client->setAuthConfig('/path/to/json/my_credentials.json');
$client->setAccessType('offline');
$service = new Google_Service_PhotosLibrary($client);
The service object return below value:
{
albums: { },
mediaItems: { },
sharedAlbums: { },
batchPath: null,
rootUrl: "https://photoslibrary.googleapis.com/",
version: "v1",
servicePath: "",
availableScopes: null,
resource: null,
serviceName: "photoslibrary"
}
How to list albums using this service, and then also list the photos inside it.