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

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

About me?

Well, I'm Tijs Verkoyen, a self employed Belgian PHP-developer at Sumo Coders.

If you want to know more about me, check my blog (Dutch).

If you really like my work and want to support me, feel free to use the donate-button below.

Spoon

At both companies, we use Spoon. Spoon is a PHP5 Library that we use for building all our Web 2.0 applications.

The classes that you can download from this website are standalone, so each developer is free to use a library/framework/… he likes best.