Skip to content
Romain Monteil edited this page Jan 4, 2019 · 2 revisions

Me API

Get Current User's Profile

Get Current User's Profile reference

$response = $spotify->me()->get();

Return an instance of UserResponse

Get a List of Current User's Playlists

Get a List of Current User's Playlists reference

$response = $spotify->me()->playlists([
    QueryParametersInterface::PARAMETER_LIMIT => 10,
    QueryParametersInterface::PARAMETER_OFFSET => 5,
]);

Return an instance of PagingResponse

Get a User's Top Artists

Get a User's Top Artists reference

$response = $spotify->me()->top(TypeInterface::TYPE_ARTISTS, [
    QueryParametersInterface::PARAMETER_TIME_RANGE => 'medium_term',
    QueryParametersInterface::PARAMETER_LIMIT => 10,
    QueryParametersInterface::PARAMETER_OFFSET => 5,
]);

Return an instance of PagingResponse

Get a User's Top Tracks

Get a User's Top Tracks reference

$response = $spotify->me()->top(TypeInterface::TYPE_TRACKS, [
    QueryParametersInterface::PARAMETER_TIME_RANGE => 'medium_term',
    QueryParametersInterface::PARAMETER_LIMIT => 10,
    QueryParametersInterface::PARAMETER_OFFSET => 5,
]);

Return an instance of PagingResponse