SpotifyWebAPI\SpotifyWebAPI::getArtistAlbums PHP Метод

getArtistAlbums() публичный Метод

https://developer.spotify.com/web-api/get-artists-albums/
public getArtistAlbums ( string $artistId, array | object $options = [] ) : array | object
$artistId string ID of the artist.
$options array | object Optional. Options for the albums. - string|array album_type Optional. Album type(s) to return. If omitted, all album types will be returned. - string market Optional. Limit the results to items that are playable in this market, for example SE. - int limit Optional. Limit the number of albums. - int offset Optional. Number of albums to skip.
Результат array | object The artist's albums. Type is controlled by SpotifyWebAPI::setReturnAssoc().
    public function getArtistAlbums($artistId, $options = [])
    {
        $options = (array) $options;
        if (isset($options['album_type'])) {
            $options['album_type'] = implode(',', (array) $options['album_type']);
        }
        $headers = $this->authHeaders();
        $uri = '/v1/artists/' . $artistId . '/albums';
        $this->lastResponse = $this->request->api('GET', $uri, $options, $headers);
        return $this->lastResponse['body'];
    }