Cloudspeakers class
__construct
Default constructor
Parameters
- apiKey string
- The API-key that has to be used for authentication
Return
void
setTimeOut
Set the timeout
After this time the request will stop. You should handle any errors triggered by this.
Parameters
- seconds int
- The timeout in seconds
Return
void
setUserAgent
Set the user-agent for you application
It will be appended to ours, the result will look like: "PHP Cloudspeakers/<version> <your-user-agent>"
Parameters
- userAgent string
- Your user-agent, it should look like <app-name>/<app-version>
Return
void
getHotlist
Retrieve the artists or albums that are most written about
Parameters
- entity string
- Which entity should be retrieved? Possible values are: artists, albums.
- max
Return
array
getPlaylists
With this command you can get the playlists for audio files or video files
Parameters
- entity string
- Which entity should be retrieved? Possible values are: artist, user, source, festival.
- mbid string (optional)
- ID of the artist from MusicBrainz. Only used when entity is artist.
- username int (optional)
- Username of the user or festival from teh Cloudspeakers database.
- max string (optional)
- Maximum number of tracks/videos to display.
- type string (optional)
- Type of playlist. Possible values are: both, audio, video
Return
array
getReviews
Retrieve reviews of an artist, album or source
Parameters
- entity string
- Which entity should be retrieved? Possible values are: artists, albums, sources.
- mbid string (optional)
- ID of the artist or album from MusicBrainz. Only used when entity is artist and album.
- name string (optional)
- The name of the source.
- max int (optional)
- Maximum number of weblinks to display.
- page int (optional)
- What page number?
- lang array (optional)
- The language of the reviews shown, multiple languages should be comma separated.
Return
array
getWeblinks
Retrieve social and official URLs of an artist. This will return f.i. MySpace, LastFM, official homepage, Cloudspeakers URLs and more including icons of the sources used.
Parameters
- mbid string
- ID of the artist from MusicBrainz.
- max int (optional)
- Maximum number of weblinks to display.
Return
array