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

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

Requires a valid access token. https://developer.spotify.com/web-api/get-category/
public getCategory ( string $categoryId, array | object $options = [] ) : array | object
$categoryId string The Spotify ID of the category.
$options array | object Optional. Options for the category. - string locale Optional. Language to show category in, for example sv_SE. - string country Optional. An ISO 3166-1 alpha-2 country code. Show category from this country.
Результат array | object The category. Type is controlled by SpotifyWebAPI::setReturnAssoc().
    public function getCategory($categoryId, $options = [])
    {
        $headers = $this->authHeaders();
        $uri = '/v1/browse/categories/' . $categoryId;
        $this->lastResponse = $this->request->api('GET', $uri, $options, $headers);
        return $this->lastResponse['body'];
    }