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.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle