You are here

public function Photos::photosGetSizes in Flickr API Integration 8

Returns the available sizes for a photo.

Parameters

string $photo_id: ID of the photo to get the available sizes of.

bool $cacheable: Cacheable.

Return value

array|bool Response from the flickr method flickr.photos.getSizes.. (https://www.flickr.com/services/api/flickr.photos.getSizes.html)

File

src/Service/Photos.php, line 70

Class

Photos
Class Photos.

Namespace

Drupal\flickr_api\Service

Code

public function photosGetSizes($photo_id, $cacheable = TRUE) {
  $args = [
    'photo_id' => $photo_id,
  ];
  $response = $this->client
    ->request('flickr.photos.getSizes', $args, $cacheable);
  if ($response) {
    return $response['sizes']['size'];
  }
  return FALSE;
}