Browse files

Added code sample in readme file

  • Loading branch information...
rtuin committed Nov 11, 2011
1 parent 0d229e5 commit 526795eb367d2e1655feb3b18e666dcb5aab4f28
Showing with 13 additions and 0 deletions.
  1. +13 −0
@@ -6,6 +6,19 @@ The library is designed to be slim and simple. In fact it is just a wrapper to t
API calls are instances of `SimpleXmlElement`. This is on purpose as the `SimpleXmlElement` classes allow for easy traversing
over the data and even query against it.
+A simple code example is the following:
+ // This code sample queries the Album.getInfo method
+ // Preconfigure the client
+ $apiKey = 'yourapikey';
+ $client = new Lastfm\Service\Client($apiKey);
+ // Instantiate an instance of the service subset (or entity if you like)
+ $album = new Lastfm\Service\Album($client);
+ // The actual query to the API
+ $result = $album->getInfo('On the go', 'Matthew Halsall');
## Thoughts and wishlist
As the library is generated from the documentation that is available [here](, there is still
some work to do.

0 comments on commit 526795e

Please sign in to comment.