You are here

public function Groups::groupsGetInfo in Flickr API Integration 8

Returns info about a given group.

Parameters

string $id: NSID of the group whose photos you want.

array $otherArgs: Other args.

bool $cacheable: Cacheable.

Return value

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

File

src/Service/Groups.php, line 49

Class

Groups
Class Groups.

Namespace

Drupal\flickr_api\Service

Code

public function groupsGetInfo($id, array $otherArgs = [], $cacheable = TRUE) {
  if ($this->helpers
    ->isNsid($id)) {
    $args = [
      'group_id' => $id,
    ];
  }
  else {
    $args = [
      'group_path_alias' => $id,
    ];
  }
  $args = array_merge($args, $otherArgs);
  $response = $this->client
    ->request('flickr.groups.getInfo', $args, $cacheable);
  if ($response) {
    return $response['group'];
  }
  return FALSE;
}