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

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

https://developer.spotify.com/web-api/get-track/
public getTrack ( string $trackId, array | object $options = [] ) : array | object
$trackId string ID of the track.
$options array | object Optional. Options for the track. - string market Optional. An ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
Результат array | object The requested track. Type is controlled by SpotifyWebAPI::setReturnAssoc().
    public function getTrack($trackId, $options = [])
    {
        $headers = $this->authHeaders();
        $uri = '/v1/tracks/' . $trackId;
        $this->lastResponse = $this->request->api('GET', $uri, $options, $headers);
        return $this->lastResponse['body'];
    }