You are here

public function Locations::getLocationMediaRecent in Instagram API 8

Get a list of recent media objects from a given location.

Parameters

string $locationId: Location ID.

array $args: Args, see API docs for options.

bool $cacheable: Cacheable.

Return value

array|bool Response array. https://api.instagram.com/v1/locations/{location-id}?access_token=ACCESS-TOKEN

See also

https://www.instagram.com/developer/endpoints/locations/

File

src/Service/Locations.php, line 87

Class

Locations
Class Locations.

Namespace

Drupal\instagram_api\Service

Code

public function getLocationMediaRecent($locationId, array $args = [], $cacheable = TRUE) {
  $response = $this->client
    ->request('locations/' . $locationId . '/media/recent', $args, $cacheable);
  if ($response) {
    return $response;
  }
  return FALSE;
}