Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Lastfm Bundle Laravel Package

binarythinking/lastfm-bundle

View on GitHub
Deep Wiki
Context7

BinaryThinking/LastfmBundle

Build Status

Symfony 2 Bundle for Last.fm API

This is a Bundle that will help you communicate with Last.fm's API.

Status

The Bundle handles API methods for following contexts (Please see Milestones on github):

  • Album
  • Artist
  • Chart
  • Geo
  • Library
  • Tag
  • User

Stay tuned for more coming soon.

Installation

If you're using composer just add:

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

If you're using a deps file just add:

[BinaryThinkingLastfmBundle]
    target=/bundles/BinaryThinking/LastfmBundle
    git=http://github.com/karolsojko/BinaryThinkingLastfmBundle.git

Register the BinaryThinking namespace in autoload.php

<?php
$loader->add('BinaryThinking', __DIR__ . '/../vendor/bundles');

And the bundle to AppKernel.php

<?php
$bundles = array(
  // ...
  new BinaryThinking\LastfmBundle\BinaryThinkingLastfmBundle()
);

Configuration

After installing just configure your application with your Last.fm API key and secret.

In your config define those two as:

binary_thinking_lastfm:
  client_apikey: "my_api_key"
  client_secret: "my_secret"

Using

In your controller if you want for example a client for the album API context just get the service like this:

<?php
$albumClient = $this->get('binary_thinking_lastfm.client.album');

Or you can get the client factory and request for a specific client f.e. album:

<?php
$clientFactory = $this->get('binary_thinking_lastfm.client_factory');
$albumClient = $clientFactory->getClient('album', $apiKey, $apiSecret);

Once you have your client you can use on it the methods that are available in the Last.fm API f.e.

<?php
// search for an album
$albums = $albumClient->search('Sound of perseverance');

// get detailed info on an album
$album = $albumClient->getInfo('Cynic', 'Focus');
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor