Skip to content
Setlist.fm wrapper client for symfony
PHP Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
src
tests
vendor-bin
.editorconfig
.gitattributes
.gitignore
.kodiak.toml
.php_cs.dist
.rmt.yml
.travis.yml
CHANGELOG
LICENSE.md
Makefile
README.md
composer.json
phpstan.neon.dist
phpunit.xml.dist

README.md

SetlistFmBundle

Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

Build Status Scrutinizer Code Quality Code Climate Coverage Status

This library provides a symfony bundle for Setlist.fm PHP API.

Installation

Open a command console, enter your project directory and execute the following command to download the latest stable version of this library:

composer require core23/setlistfm-bundle

composer require guzzlehttp/guzzle # if you want to use Guzzle native
composer require php-http/guzzle6-adapter # if you want to use HTTPlug with Guzzle

Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in config/bundles.php file of your project:

// config/bundles.php

return [
    // ...
    Http\HttplugBundle\HttplugBundle::class             => ['all' => true],
    Core23\SetlistFmBundle\Core23SetlistFmBundle::class => ['all' => true],
];

Configure the Bundle

Create a configuration file called core23_setlistfm.yaml:

# config/packages/core23_setlistfm.yaml

core23_setlistfm:
    api:
        key:    "%setlistfm_api.key%"

Define a HTTPlug client in your configuration.

# config/packages/httplug.yaml

httplug:
    classes:
        client: Http\Adapter\Guzzle6\Client
        message_factory: Http\Message\MessageFactory\GuzzleMessageFactory
        uri_factory: Http\Message\UriFactory\GuzzleUriFactory
        stream_factory: Http\Message\StreamFactory\GuzzleStreamFactory

API cache

It is recommended to use a cache to reduce the API usage.

# config/packages/httplug.yaml

httplug:
    plugins:
        cache:
            cache_pool: 'acme.httplug_cache'
            config:
                default_ttl: 7200 # Two hours
    clients:
        default:
            plugins:
                - httplug.plugin.cache

License

This library is under the MIT license.

You can’t perform that action at this time.