You are here

public function Tags::tagsGetListUserPopular in Flickr API Integration 8

Get the popular tags for a given user.

Parameters

string $nsid: NSID of the user whose tags will be returned.

string $count: Number of tags to return.

bool $cacheable: Cacheable.

Return value

array Response from the flickr method flickr.tags.getListUserPopular. (https://www.flickr.com/services/api/flickr.tags.getListUserPopular.html)

File

src/Service/Tags.php, line 44

Class

Tags
Class Tags.

Namespace

Drupal\flickr_api\Service

Code

public function tagsGetListUserPopular($nsid, $count = NULL, $cacheable = TRUE) {
  $args = [
    'user_id' => $nsid,
  ];
  if ($count != NULL) {
    $args['count'] = $count;
  }
  $response = $this->client
    ->request('flickr.tags.getListUserPopular', $args, $cacheable);
  if ($response) {
    return $response['who']['tags']['tag'];
  }
  return FALSE;
}