PHP 클래스 SpotifyWebAPI\SpotifyWebAPI

파일 보기 프로젝트 열기: jwilsson/spotify-web-api-php 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$accessToken
$lastResponse
$request

공개 메소드들

메소드 설명
__construct ( Request $request = null ) Constructor Set up Request object.
addMyAlbums ( string | array $albums ) : boolean Add albums to the current user's Spotify library.
addMyTracks ( string | array $tracks ) : boolean Add tracks to the current user's Spotify library.
addUserPlaylistTracks ( string $userId, string $playlistId, string | array $tracks, array | object $options = [] ) : boolean Add tracks to a user's playlist.
createUserPlaylist ( string $userId, array | object $options ) : array | object Create a new playlist for a user.
currentUserFollows ( string $type, string | array $ids ) : array Check to see if the current user is following one or more artists or other Spotify users.
deleteMyAlbums ( string | array $albums ) : boolean Delete albums from current user's Spotify library.
deleteMyTracks ( string | array $tracks ) : boolean Delete tracks from current user's Spotify library.
deleteUserPlaylistTracks ( string $userId, string $playlistId, array $tracks, string $snapshotId = '' ) : string | boolean Delete tracks from a playlist and retrieve a new snapshot ID.
followArtistsOrUsers ( string $type, string | array $ids ) : boolean Add the current user as a follower of one or more artists or other Spotify users.
followPlaylist ( string $userId, string $playlistId, array | object $options = [] ) : boolean Add the current user as a follower of a playlist.
getAlbum ( string $albumId ) : array | object Get a album.
getAlbumTracks ( string $albumId, array | object $options = [] ) : array | object Get a album's tracks.
getAlbums ( array $albumIds, array | object $options = [] ) : array | object Get multiple albums.
getArtist ( string $artistId ) : array | object Get an artist.
getArtistAlbums ( string $artistId, array | object $options = [] ) : array | object Get an artist's albums.
getArtistRelatedArtists ( string $artistId ) : array | object Get an artist's related artists.
getArtistTopTracks ( string $artistId, array | object $options ) : array | object Get an artist's top tracks in a country.
getArtists ( array $artistIds ) : array | object Get multiple artists.
getAudioFeatures ( array $trackIds ) : array | object Get track audio features.
getCategoriesList ( array | object $options = [] ) : array | object Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s "Browse" tab).
getCategory ( string $categoryId, array | object $options = [] ) : array | object Get a single category used to tag items in Spotify (on, for example, the Spotify player’s "Browse" tab).
getCategoryPlaylists ( string $categoryId, array | object $options = [] ) : array | object Get a list of Spotify playlists tagged with a particular category.
getFeaturedPlaylists ( array | object $options = [] ) : array | object Get Spotify featured playlists.
getGenreSeeds ( ) : array | object Get a list of possible seed genres.
getLastResponse ( ) : array Get the latest full response from the Spotify API.
getMyPlaylists ( array | object $options = [] ) : array | object Get the current user’s playlists.
getMySavedAlbums ( array | object $options = [] ) : array | object Get the current user’s saved albums.
getMySavedTracks ( array | object $options = [] ) : array | object Get the current user’s saved tracks.
getMyTop ( string $type, $options = [] ) : array | object Get the current user's top tracks or artists.
getNewReleases ( array | object $options = [] ) : array | object Get new releases.
getRecommendations ( array | object $options = [] ) : array | object Get recommendations based on artists, tracks, or genres.
getReturnAssoc ( ) : boolean Get the return type for the Request body element.
getTrack ( string $trackId, array | object $options = [] ) : array | object Get a track.
getTracks ( array $trackIds, array | object $options = [] ) : array | object Get multiple tracks.
getUser ( string $userId ) : array | object Get a user.
getUserFollowedArtists ( array | object $options = [] ) : array | object Get the artists followed by the current user.
getUserPlaylist ( string $userId, string $playlistId, array | object $options = [] ) : array | object Get a user's specific playlist.
getUserPlaylistTracks ( string $userId, string $playlistId, array | object $options = [] ) : array | object Get the tracks in a user's playlist.
getUserPlaylists ( string $userId, array | object $options = [] ) : array | object Get a user's playlists.
me ( ) : array | object Get the currently authenticated user.
myAlbumsContains ( string | array $albums ) : array Check if albums are saved in the current user's Spotify library.
myTracksContains ( string | array $tracks ) : array Check if tracks are saved in the current user's Spotify library.
reorderUserPlaylistTracks ( string $userId, string $playlistId, array | object $options ) : string | boolean Reorder the tracks in a user's playlist.
replaceUserPlaylistTracks ( string $userId, string $playlistId, string | array $tracks ) : boolean Replace all tracks in a user's playlist with new ones.
search ( string $query, string | array $type, array | object $options = [] ) : array | object Search for an item.
setAccessToken ( string $accessToken ) : void Set the access token to use.
setReturnAssoc ( boolean $returnAssoc ) : void Set the return type for the Request body element.
unfollowArtistsOrUsers ( string $type, string | array $ids ) : boolean Remove the current user as a follower of one or more artists or other Spotify users.
unfollowPlaylist ( string $userId, string $playlistId ) : boolean Remove the current user as a follower of a playlist.
updateUserPlaylist ( string $userId, string $playlistId, array | object $options ) : boolean Update the details of a user's playlist.
userFollowsPlaylist ( string $ownerId, string $playlistId, array | object $options ) : array Check if a user is following a playlist.

보호된 메소드들

메소드 설명
authHeaders ( ) : array Add authorization headers.
idToUri ( array | string $ids ) : array | string Convert Spotify object IDs to Spotify URIs.

메소드 상세

__construct() 공개 메소드

Constructor Set up Request object.
public __construct ( Request $request = null )
$request Request Optional. The Request object to use.

addMyAlbums() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/save-albums-user/
public addMyAlbums ( string | array $albums ) : boolean
$albums string | array ID(s) of the album(s) to add.
리턴 boolean Whether the albums was successfully added.

addMyTracks() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/save-tracks-user/
public addMyTracks ( string | array $tracks ) : boolean
$tracks string | array ID(s) of the track(s) to add.
리턴 boolean Whether the tracks was successfully added.

addUserPlaylistTracks() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/add-tracks-to-playlist/
public addUserPlaylistTracks ( string $userId, string $playlistId, string | array $tracks, array | object $options = [] ) : boolean
$userId string ID of the user who owns the playlist.
$playlistId string ID of the playlist to add tracks to.
$tracks string | array ID(s) of the track(s) to add.
$options array | object Optional. Options for the new tracks. - int position Optional. Zero-based track position in playlist. Tracks will be appened if omitted or false.
리턴 boolean Whether the tracks was successfully added.

authHeaders() 보호된 메소드

Add authorization headers.
protected authHeaders ( ) : array
리턴 array Authorization headers.

createUserPlaylist() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/create-playlist/
public createUserPlaylist ( string $userId, array | object $options ) : array | object
$userId string ID of the user to create the playlist for.
$options array | object Options for the new playlist. - name string Required. Name of the playlist. - public bool Optional. Whether the playlist should be public or not.
리턴 array | object The new playlist. Type is controlled by SpotifyWebAPI::setReturnAssoc().

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.

deleteMyAlbums() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/remove-albums-user/
public deleteMyAlbums ( string | array $albums ) : boolean
$albums string | array ID(s) of the album(s) to delete.
리턴 boolean Whether the albums was successfully deleted.

deleteMyTracks() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/remove-tracks-user/
public deleteMyTracks ( string | array $tracks ) : boolean
$tracks string | array ID(s) of the track(s) to delete.
리턴 boolean Whether the tracks was successfully deleted.

deleteUserPlaylistTracks() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/remove-tracks-playlist/
public deleteUserPlaylistTracks ( string $userId, string $playlistId, array $tracks, string $snapshotId = '' ) : string | boolean
$userId string ID of the user who owns the playlist.
$playlistId string ID of the playlist to delete tracks from.
$tracks array Array of arrays with tracks to delete. - id string Required. Spotify track ID. - positions int|array Optional. The track's position(s) in the playlist.
$snapshotId string Optional. The playlist's snapshot ID.
리턴 string | boolean A new snapshot ID or false if the tracks weren't successfully deleted.

followArtistsOrUsers() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/follow-artists-users/
public followArtistsOrUsers ( string $type, string | array $ids ) : boolean
$type string The type to check: either 'artist' or 'user'.
$ids string | array ID(s) of the user(s) or artist(s) to follow.
리턴 boolean Whether the artist or user was successfully followed.

followPlaylist() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/follow-playlist/
public followPlaylist ( string $userId, string $playlistId, array | object $options = [] ) : boolean
$userId string ID of the user who owns the playlist.
$playlistId string ID of the playlist to follow.
$options array | object Optional. Options for the followed playlist. - public bool Optional. Whether the playlist should be followed publicly or not.
리턴 boolean Whether the playlist was successfully followed.

getAlbum() 공개 메소드

https://developer.spotify.com/web-api/get-album/
public getAlbum ( string $albumId ) : array | object
$albumId string ID of the album.
리턴 array | object The requested album. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getAlbumTracks() 공개 메소드

https://developer.spotify.com/web-api/get-albums-tracks/
public getAlbumTracks ( string $albumId, array | object $options = [] ) : array | object
$albumId string ID of the album.
$options array | object Optional. Options for the tracks. - int limit Optional. Limit the number of tracks. - int offset Optional. Number of tracks to skip. - string market Optional. An ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
리턴 array | object The requested album tracks. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getAlbums() 공개 메소드

https://developer.spotify.com/web-api/get-several-albums/
public getAlbums ( array $albumIds, array | object $options = [] ) : array | object
$albumIds array IDs of the albums.
$options array | object Optional. Options for the albums. - string market Optional. An ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
리턴 array | object The requested albums. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getArtist() 공개 메소드

https://developer.spotify.com/web-api/get-artist/
public getArtist ( string $artistId ) : array | object
$artistId string ID of the artist.
리턴 array | object The requested artist. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getArtistAlbums() 공개 메소드

https://developer.spotify.com/web-api/get-artists-albums/
public getArtistAlbums ( string $artistId, array | object $options = [] ) : array | object
$artistId string ID of the artist.
$options array | object Optional. Options for the albums. - string|array album_type Optional. Album type(s) to return. If omitted, all album types will be returned. - string market Optional. Limit the results to items that are playable in this market, for example SE. - int limit Optional. Limit the number of albums. - int offset Optional. Number of albums to skip.
리턴 array | object The artist's albums. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getArtistRelatedArtists() 공개 메소드

https://developer.spotify.com/web-api/get-related-artists/
public getArtistRelatedArtists ( string $artistId ) : array | object
$artistId string ID of the artist.
리턴 array | object The artist's related artists. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getArtistTopTracks() 공개 메소드

https://developer.spotify.com/web-api/get-artists-top-tracks/
public getArtistTopTracks ( string $artistId, array | object $options ) : array | object
$artistId string ID of the artist.
$options array | object Options for the tracks. - string $country Required. An ISO 3166-1 alpha-2 country code specifying the country to get the top tracks for.
리턴 array | object The artist's top tracks. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getArtists() 공개 메소드

https://developer.spotify.com/web-api/get-several-artists/
public getArtists ( array $artistIds ) : array | object
$artistIds array IDs of the artists.
리턴 array | object The requested artists. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getAudioFeatures() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/get-several-audio-features/
public getAudioFeatures ( array $trackIds ) : array | object
$trackIds array IDs of the tracks.
리턴 array | object The tracks' audio features. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getCategoriesList() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/get-list-categories/
public getCategoriesList ( array | object $options = [] ) : array | object
$options array | object Optional. Options for the categories. - string locale Optional. Language to show categories in, for example sv_SE. - string country Optional. An ISO 3166-1 alpha-2 country code. Show categories from this country. - int limit Optional. Limit the number of categories. - int offset Optional. Number of categories to skip.
리턴 array | object The list of categories. Type is controlled by SpotifyWebAPI::setReturnAssoc().

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().

getCategoryPlaylists() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/get-categorys-playlists/
public getCategoryPlaylists ( string $categoryId, array | object $options = [] ) : array | object
$categoryId string The Spotify ID of the category.
$options array | object Optional. Options for the category's playlists. - string country Optional. An ISO 3166-1 alpha-2 country code. Show category playlists from this country. - int limit Optional. Limit the number of playlists. - int offset Optional. Number of playlists to skip.
리턴 array | object The list of playlists. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getFeaturedPlaylists() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/get-list-featured-playlists/
public getFeaturedPlaylists ( array | object $options = [] ) : array | object
$options array | object Optional. Options for the playlists. - string locale Optional. Language to show playlists in, for example sv_SE. - string country Optional. An ISO 3166-1 alpha-2 country code. Show playlists from this country. - string timestamp Optional. A ISO 8601 timestamp. Show playlists relevant to this date and time. - int limit Optional. Limit the number of playlists. - int offset Optional. Number of playlists to skip.
리턴 array | object The featured playlists. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getGenreSeeds() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/get-recommendations/#available-genre-seeds
public getGenreSeeds ( ) : array | object
리턴 array | object All possible seed genres. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getLastResponse() 공개 메소드

Get the latest full response from the Spotify API.
public getLastResponse ( ) : array
리턴 array Response data. - array|object body The response body. Type is controlled by Request::setReturnAssoc(). - string headers Response headers. - int status HTTP status code.

getMyPlaylists() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/get-a-list-of-current-users-playlists/
public getMyPlaylists ( array | object $options = [] ) : array | object
$options array | object Optional. Options for the playlists. - int limit Optional. Limit the number of playlists. - int offset Optional. Number of playlists to skip.
리턴 array | object The user's playlists. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getMySavedAlbums() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/get-users-saved-albums/
public getMySavedAlbums ( array | object $options = [] ) : array | object
$options array | object Optional. Options for the albums. - int limit Optional. Limit the number of albums. - int offset Optional. Number of albums to skip. - string market Optional. An ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
리턴 array | object The user's saved albums. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getMySavedTracks() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/get-users-saved-tracks/
public getMySavedTracks ( array | object $options = [] ) : array | object
$options array | object Optional. Options for the tracks. - int limit Optional. Limit the number of tracks. - int offset Optional. Number of tracks to skip. - string market Optional. An ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
리턴 array | object The user's saved tracks. Type is controlled by SpotifyWebAPI::setReturnAssoc().

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().

getNewReleases() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/get-list-new-releases/
public getNewReleases ( array | object $options = [] ) : array | object
$options array | object Optional. Options for the items. - string country Optional. An ISO 3166-1 alpha-2 country code. Show items relevant to this country. - int limit Optional. Limit the number of items. - int offset Optional. Number of items to skip.
리턴 array | object The new releases. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getRecommendations() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/get-recommendations/
public getRecommendations ( array | object $options = [] ) : array | object
$options array | object Optional. Options for the recommendations. - int limit Optional. Limit the number of recommendations. - string market Optional. An ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking. - mixed max_* Optional. Max value for one of the tunable track attributes. - mixed min_* Optional. Min value for one of the tunable track attributes. - array seed_artists Artist IDs to seed by. - array seed_genres Genres to seed by. Call SpotifyWebAPI::getGenreSeeds() for a complete list. - array seed_tracks Track IDs to seed by. - mixed target_* Optional. Target value for one of the tunable track attributes.
리턴 array | object The requested recommendations. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getReturnAssoc() 공개 메소드

Get the return type for the Request body element.
public getReturnAssoc ( ) : boolean
리턴 boolean Whether an associative array or an stdClass is returned.

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().

getTracks() 공개 메소드

https://developer.spotify.com/web-api/get-several-tracks/
public getTracks ( array $trackIds, array | object $options = [] ) : array | object
$trackIds array IDs of the tracks.
$options array | object Optional. Options for the albums. - string market Optional. An ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
리턴 array | object The requested tracks. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getUser() 공개 메소드

https://developer.spotify.com/web-api/get-users-profile/
public getUser ( string $userId ) : array | object
$userId string ID of the user.
리턴 array | object The requested user. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getUserFollowedArtists() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/get-followed-artists/
public getUserFollowedArtists ( array | object $options = [] ) : array | object
$options array | object Optional. Options for the artists. - int limit Optional. Limit the number of artists returned. - string after Optional. The last artist ID retrieved from the previous request.
리턴 array | object A list of artists. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getUserPlaylist() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/get-playlist/
public getUserPlaylist ( string $userId, string $playlistId, array | object $options = [] ) : array | object
$userId string ID of the user.
$playlistId string ID of the playlist.
$options array | object Optional. Options for the playlist. - string|array fields Optional. A list of fields to return. See Spotify docs for more info. - string market Optional. An ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
리턴 array | object The user's playlist. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getUserPlaylistTracks() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/get-playlists-tracks/
public getUserPlaylistTracks ( string $userId, string $playlistId, array | object $options = [] ) : array | object
$userId string ID of the user.
$playlistId string ID of the playlist.
$options array | object Optional. Options for the tracks. - string|array fields Optional. A list of fields to return. See Spotify docs for more info. - int limit Optional. Limit the number of tracks. - int offset Optional. Number of tracks to skip. - string market Optional. An ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
리턴 array | object The tracks in the playlist. Type is controlled by SpotifyWebAPI::setReturnAssoc().

getUserPlaylists() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/get-list-users-playlists/
public getUserPlaylists ( string $userId, array | object $options = [] ) : array | object
$userId string ID of the user.
$options array | object Optional. Options for the tracks. - int limit Optional. Limit the number of tracks. - int offset Optional. Number of tracks to skip.
리턴 array | object The user's playlists. Type is controlled by SpotifyWebAPI::setReturnAssoc().

idToUri() 보호된 메소드

Convert Spotify object IDs to Spotify URIs.
protected idToUri ( array | string $ids ) : array | string
$ids array | string ID(s) to convert.
리턴 array | string Spotify URI(s).

me() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/get-current-users-profile/
public me ( ) : array | object
리턴 array | object The currently authenticated user. Type is controlled by SpotifyWebAPI::setReturnAssoc().

myAlbumsContains() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/check-users-saved-albums/
public myAlbumsContains ( string | array $albums ) : array
$albums string | array ID(s) of the album(s) to check for.
리턴 array Whether each album is saved.

myTracksContains() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/check-users-saved-tracks/
public myTracksContains ( string | array $tracks ) : array
$tracks string | array ID(s) of the track(s) to check for.
리턴 array Whether each track is saved.

reorderUserPlaylistTracks() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/reorder-playlists-tracks/
public reorderUserPlaylistTracks ( string $userId, string $playlistId, array | object $options ) : string | boolean
$userId string ID of the user.
$playlistId string ID of the playlist.
$options array | object Options for the new . - int range_start Required. Position of the first track to be reordered. - int range_length Optional. The amount of tracks to be reordered. - int insert_before Required. Position where the tracks should be inserted. - string snapshot_id Optional. The playlist's snapshot ID.
리턴 string | boolean A new snapshot ID or false if the tracks weren't successfully reordered.

replaceUserPlaylistTracks() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/replace-playlists-tracks/
public replaceUserPlaylistTracks ( string $userId, string $playlistId, string | array $tracks ) : boolean
$userId string ID of the user.
$playlistId string ID of the playlist.
$tracks string | array ID(s) of the track(s) to add.
리턴 boolean Whether the tracks was successfully replaced.

setAccessToken() 공개 메소드

Set the access token to use.
public setAccessToken ( string $accessToken ) : void
$accessToken string The access token.
리턴 void

setReturnAssoc() 공개 메소드

Set the return type for the Request body element.
public setReturnAssoc ( boolean $returnAssoc ) : void
$returnAssoc boolean Whether to return an associative array or an stdClass.
리턴 void

unfollowArtistsOrUsers() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/unfollow-artists-users/
public unfollowArtistsOrUsers ( string $type, string | array $ids ) : boolean
$type string The type to check: either 'artist' or 'user'.
$ids string | array ID(s) of the user(s) or artist(s) to unfollow.
리턴 boolean Whether the artist(s) or user(s) were successfully unfollowed.

unfollowPlaylist() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/unfollow-playlist/
public unfollowPlaylist ( string $userId, string $playlistId ) : boolean
$userId string ID of the user who owns the playlist.
$playlistId string ID of the playlist to unfollow
리턴 boolean Whether the playlist was successfully unfollowed.

updateUserPlaylist() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/change-playlist-details/
public updateUserPlaylist ( string $userId, string $playlistId, array | object $options ) : boolean
$userId string ID of the user who owns the playlist.
$playlistId string ID of the playlist to update.
$options array | object Options for the playlist. - name string Optional. Name of the playlist. - public bool Optional. Whether the playlist should be public or not.
리턴 boolean Whether the playlist was successfully updated.

userFollowsPlaylist() 공개 메소드

Requires a valid access token. https://developer.spotify.com/web-api/check-user-following-playlist/
public userFollowsPlaylist ( string $ownerId, string $playlistId, array | object $options ) : array
$ownerId string User ID of the playlist owner.
$playlistId string ID of the playlist.
$options array | object Options for the check. - ids string|array Required. ID(s) of the user(s) to check for.
리턴 array Whether each user is following the playlist.

프로퍼티 상세

$accessToken 보호되어 있는 프로퍼티

protected $accessToken

$lastResponse 보호되어 있는 프로퍼티

protected $lastResponse

$request 보호되어 있는 프로퍼티

protected $request