ricbra/discogs-bundle

Bundle around the Discogs API client

Maintainers

👁 ricbra

Package info

github.com/ricbra/RicbraDiscogsBundle

Type:symfony-bundle

pkg:composer/ricbra/discogs-bundle

Statistics

Installs: 440

Dependents: 0

Suggesters: 6

Stars: 9

Open Issues: 0

1.0.1 2015-12-06 15:01 UTC

Requires

Requires (Dev)

None

Suggests

Provides

None

Conflicts

None

Replaces

None

MIT 6c9105a0e7ad94d04d4e68d4b8af89a2446047d6

  • Richard van den Brand <richard.woop@vandenbrand.org>

apidiscogs

This package is not auto-updated.

Last update: 2026-06-20 21:08:07 UTC


README

👁 Latest Stable Version
👁 Total Downloads
👁 Latest Unstable Version
👁 License

This bundle provides a simple integration of the "Discogs library" into Symfony2. You can find more information about this library on its dedicated page at http://www.discogs.com/developers/index.html.

<?php

$discogs = $this->container->get('discogs');

The bundle provides a new discogs service that returns an instance of Discogs\Service.

Installation

$ composer require ricbra/discogs-bundle ~1.0.0

Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
 $bundles = array(
 // ...

 new Ricbra\Bundle\DiscogsBundle\RicbraDiscogsBundle(),
 );
}

Configuration

To enable or disable the throttle:

ricbra_discogs:
 throttle:
 enabled: false # or true

To enable OAuth you've to also use some third party library for connecting and authorization. This bundle provides support for HWIOAuthBundle. The token_provider_id is the service id which provider the token and token secret. You get this after authenticating at Discogs.

ricbra_discogs:
 oauth:
 enabled: true
 consumer_key: _get_this_from_discogs_
 consumer_secret: _get_this_from_discogs_
 token_provider_id: ricbra_discogs.hwi_oauth_token_provider

Basic Usage

The only thing to do is to request the discogs service from the container to get an instance of Discogs\Service and start issuing API calls:

<?php

$discogs = $this->container->get('discogs');

$artist = $discogs->getArtist([
 'id' => 120
]);

echo $artist['name'];