Download the PHP package calliostro/discogs-bundle without Composer
On this page you can find all versions of the php package calliostro/discogs-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download calliostro/discogs-bundle
More information about calliostro/discogs-bundle
Files in calliostro/discogs-bundle
Package discogs-bundle
Short Description Lightweight Symfony bundle for the Discogs API with autowiring, resilience, and rate limiting support.
License MIT
Homepage https://github.com/calliostro/discogs-bundle
Informations about the package discogs-bundle
Discogs API Bundle for Symfony
A Symfony bundle integrating calliostro/php-discogs-api into your Symfony application. Provides dependency injection, autowiring, built-in retry resilience, and optional rate limiting for PHP 8.1+ and Symfony 6.4, 7.x, and 8.x.
๐ฆ Installation
Install via Composer:
โ๏ธ Configuration
Configure the bundle in config/packages/calliostro_discogs.yaml:
[!NOTE] By default, the client uses
DiscogsClient/4.1.0 (+https://github.com/calliostro/php-discogs-api)as User-Agent. You can override this in the configuration if needed.
Authentication Methods
- Personal Access Token: Obtain your token from Discogs Developer Settings to access user-specific data (collections, wantlists) and benefit from higher rate limits (60 requests/min).
- Consumer Credentials: For OAuth applications, register your application on Discogs to obtain your
consumer_keyandconsumer_secret. - Anonymous Access: If no credentials are configured, the bundle initializes the client for public data endpoints (subject to unauthenticated rate limits of 25 requests/min).
๐ Quick Start
Basic Usage
Inject the DiscogsClient service directly into your controllers or services:
Collection and Wantlist
Search and Database Lookups
โจ Key Features
- Lightweight Integration โ Minimal footprint with zero overhead on top of
calliostro/php-discogs-api. - Complete API Coverage โ All 60 Discogs API endpoints supported.
- Direct API Calls โ
$client->getArtist(artistId: 123)maps directly to/artists/{id}. - Built-in Retry Resilience โ Automatic exponential backoff and retry handling for
429 Too Many Requestsand503 Service Unavailableresponses. - Type Safe & IDE Support โ PHP 8.1+ types, named parameters, and PHPStan Level 8 static analysis.
- Symfony Native โ Autowiring support for Symfony 6.4, 7.x, and 8.x.
- Multiple Authentication Methods โ Personal Access Token, OAuth 1.0a, Consumer Credentials, and Anonymous access.
๐ต All Discogs API Methods as Direct Calls
- Database Methods โ
search(),getArtist(),listArtistReleases(),getRelease(),getUserReleaseRating(),updateUserReleaseRating(),deleteUserReleaseRating(),getCommunityReleaseRating(),getReleaseStats(),getMaster(),listMasterVersions(),getLabel(),listLabelReleases() - User Identity Methods โ
getIdentity(),getUser(),updateUser(),listUserSubmissions(),listUserContributions() - User Collection Methods โ
listCollectionFolders(),getCollectionFolder(),createCollectionFolder(),updateCollectionFolder(),deleteCollectionFolder(),listCollectionItems(),getCollectionItemsByRelease(),addToCollection(),updateCollectionItem(),removeFromCollection(),getCustomFields(),setCustomFields(),getCollectionValue() - User Wantlist Methods โ
getUserWantlist(),addToWantlist(),updateWantlistItem(),removeFromWantlist() - User Lists Methods โ
getUserLists(),getUserList() - Marketplace Methods โ
getUserInventory(),getMarketplaceListing(),createMarketplaceListing(),updateMarketplaceListing(),deleteMarketplaceListing(),getMarketplaceFee(),getMarketplaceFeeByCurrency(),getMarketplacePriceSuggestions(),getMarketplaceStats(),getMarketplaceOrder(),getMarketplaceOrders(),updateMarketplaceOrder(),getMarketplaceOrderMessages(),addMarketplaceOrderMessage() - Inventory Export Methods โ
createInventoryExport(),listInventoryExports(),getInventoryExport(),downloadInventoryExport() - Inventory Upload Methods โ
addInventoryUpload(),changeInventoryUpload(),deleteInventoryUpload(),listInventoryUploads(),getInventoryUpload()
[!NOTE] Complete method documentation and endpoint parameters can be found in the Discogs API Documentation.
๐ Requirements
- PHP
^8.1(tested on PHP 8.1โ8.6) - Symfony
^6.4 || ^7.0 || ^8.0 - calliostro/php-discogs-api
^4.1
โก Resilience & Rate Limiting
Built-in Retries (Reactive)
Out of the box, calliostro/php-discogs-api v4.1 automatically handles rate limit responses (429 Too Many Requests) and temporary service downtime (503 Service Unavailable). When triggered, the client sleeps for the duration requested by Discogs (via the Retry-After header) or uses exponential backoff before retrying the request.
You can customize or disable this behavior in config/packages/calliostro_discogs.yaml:
Symfony Rate Limiter (Proactive, Optional)
For high-volume batch processing, background workers, or scraping tasks, use symfony/rate-limiter to throttle outgoing requests client-side before sending them:
1. Configure the Rate Limiter
2. Assign to the Bundle
๐งช Development & Testing Guide
See DEVELOPMENT.md for detailed setup instructions, test suite commands, static analysis, and contribution guidelines.
๐ค Contributing
Contributions are welcome! Please ensure that all tests pass and coding standards are maintained:
๐ License
This project is licensed under the MIT License โ see the LICENSE file for details.
โ๏ธ Disclaimer
Discogs is a registered trademark of Zink Media, LLC. This project is an independent, unofficial open-source library and is not affiliated with, endorsed by, or sponsored by Discogs or Zink Media, LLC.
๐ Acknowledgments
- Discogs for providing the database and API.
- Symfony for the web framework and dependency injection container.
- Underlying client:
calliostro/php-discogs-api. - Sister Symfony bundles:
calliostro/spotify-web-api-bundle,calliostro/last-fm-client-bundle, andcalliostro/musicbrainz-bundle.
All versions of discogs-bundle with dependencies
calliostro/php-discogs-api Version ^4.1
symfony/config Version ^6.4 || ^7.0 || ^8.0
symfony/dependency-injection Version ^6.4 || ^7.0 || ^8.0
symfony/http-kernel Version ^6.4 || ^7.0 || ^8.0