ik19/lastfm-bundle

This Bundle allows interact with last fm api

v1.0 2014-02-20 23:38 UTC

README

LastFm Symfony2 bundle to interact with their api.

The v1.0 is the initial version and only handles the next entities. I'm developing on develop branch to add more methods and entities. Feel free to contribute with me to improve this bundle.

  • Artist
  • Tag

Installation

The easy way is using composer.Add some of follow requires in your composer.json.

{
    "require": {
        "ik19/lastfm-bundle": "dev-master"
    }
}

{
    "require": {
        "ik19/lastfm-bundle": "v1.0"
    }
}

Execute

composer require ik19/lastfm-bundle 

on your terminal to start the installation.

Configuration

After installing the bundle, make add the bundle in app/AppKernel.php

...
new ik19\LastFmBundle\LastFmBundle(),

Put your api key and your api secret into the app/config file.

# last_fm LastFM Bundle 
last_fm:
    last_fm_key: "Your_api_key" 
    last_fm_secret: "Your_secret_key"

Usage

To start using it simply use like a service in your controllers

$artist = $this->get('last_fm.artist');
$artist->search('Thrice');
$response = $artist->getResponse();