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

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

Requires a valid access token. https://developer.spotify.com/web-api/check-current-user-follows/
public currentUserFollows ( string $type, string | array $ids ) : array
$type string The type to check: either 'artist' or 'user'.
$ids string | array ID(s) of the user(s) or artist(s) to check for.
Результат array Whether each user or artist is followed.
    public function currentUserFollows($type, $ids)
    {
        $ids = implode(',', (array) $ids);
        $options = ['ids' => $ids, 'type' => $type];
        $headers = $this->authHeaders();
        $uri = '/v1/me/following/contains';
        $this->lastResponse = $this->request->api('GET', $uri, $options, $headers);
        return $this->lastResponse['body'];
    }