Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example #2

Closed
avantassel opened this issue Feb 22, 2010 · 3 comments
Closed

Example #2

avantassel opened this issue Feb 22, 2010 · 3 comments

Comments

@avantassel
Copy link

Any chance you could give a simple example of calling artist.getInfo? Having trouble how to make the call and what to include. Thanks.

@avantassel
Copy link
Author

nevermind, found it. Here is an example.

include 'lastfm.api.php';
$info = Artist::getInfo($artist);

print_r($info);

@fxb fxb closed this as completed Aug 1, 2011
@Cruel
Copy link

Cruel commented Sep 25, 2013

Is this an out-dated example? Otherwise how do you called the static method when Caller's setApiKey needs a class instance?

@reallistic
Copy link

Cruel. Next time use google ;)

require "/src/lastfm.api.php";

// set api key
CallerFactory::getDefaultCaller()->setApiKey(LAST_FM_API_KEY);

// search for the Coldplay band
$artistName = "Coldplay";
$limit = 1;
$results = Artist::search($artistName, $limit);

http://www.sitepoint.com/using-the-last-fm-api/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants