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

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

Requires a valid access token. https://developer.spotify.com/web-api/get-users-top-artists-and-tracks/
public getMyTop ( string $type, $options = [] ) : array | object
$type string The type of entity to fetch.
Результат array | object A list with the requested top entity. Type is controlled by SpotifyWebAPI::setReturnAssoc().
    public function getMyTop($type, $options = [])
    {
        $headers = $this->authHeaders();
        $uri = '/v1/me/top/' . $type;
        $this->lastResponse = $this->request->api('GET', $uri, $options, $headers);
        return $this->lastResponse['body'];
    }