Download the PHP package calliostro/php-discogs-api without Composer
On this page you can find all versions of the php package calliostro/php-discogs-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download calliostro/php-discogs-api
More information about calliostro/php-discogs-api
Files in calliostro/php-discogs-api
Package php-discogs-api
Short Description Lightweight Discogs API client for PHP 8.1+ with modern developer comfort — Clean parameter API and minimal dependencies
License MIT
Informations about the package php-discogs-api
⚡ Discogs API Client for PHP 8.1+ – Ultra-Lightweight
🚀 ONLY 2 CLASSES! The most lightweight Discogs API client for PHP. Zero bloat, maximum performance.
An ultra-minimalist Discogs API client that proves you don't need 20+ classes to build a great API client. Built with modern PHP 8.1+ features, service descriptions, and powered by Guzzle.
📦 Installation
Important: You need to register your application at Discogs to get your credentials. For read-only access to public data, no authentication is required.
Symfony Users: For easier integration, there's also a Symfony Bundle available.
🚀 Quick Start
Basic Usage
Collection and Marketplace
Database Search and Discovery
✨ Key Features
- Ultra-Lightweight – Only 2 classes, ~234 lines of logic + service descriptions
- Complete API Coverage – All 60+ Discogs API endpoints supported
- Direct API Calls –
$client->artistGet()
maps to/artists/{id}
, no abstractions - Type Safe + IDE Support – Full PHP 8.1+ types, PHPStan Level 8, method autocomplete
- Future-Ready – PHP 8.5 compatible (beta/dev testing)
- Pure Guzzle – Modern HTTP client, no custom transport layers
- Well Tested – 100% test coverage, PSR-12 compliant
- Secure Authentication – Full OAuth and Personal Access Token support
🎵 All Discogs API Methods as Direct Calls
- Database Methods – search(), artistGet(), artistReleases(), releaseGet(), releaseRatingGet(), releaseRatingPut(), releaseRatingDelete(), releaseRatingCommunity(), releaseStats(), masterGet(), masterVersions(), labelGet(), labelReleases()
- User Identity Methods – identityGet(), userGet(), userEdit(), userSubmissions(), userContributions(), userLists()
- Collection Methods – collectionFolders(), collectionFolderGet(), collectionFolderCreate(), collectionFolderEdit(), collectionFolderDelete(), collectionItems(), collectionItemsByRelease(), collectionAddRelease(), collectionEditRelease(), collectionRemoveRelease(), collectionCustomFields(), collectionEditField(), collectionValue()
- Wantlist Methods – wantlistGet(), wantlistAdd(), wantlistEdit(), wantlistRemove()
- Marketplace Methods – inventoryGet(), listingGet(), listingCreate(), listingUpdate(), listingDelete(), marketplaceFee(), marketplaceFeeCurrency(), marketplacePriceSuggestions(), marketplaceStats()
- Order Methods – orderGet(), ordersGet(), orderUpdate(), orderMessages(), orderMessageAdd()
- Inventory Export Methods – inventoryExportCreate(), inventoryExportList(), inventoryExportGet(), inventoryExportDownload()
- Inventory Upload Methods – inventoryUploadAdd(), inventoryUploadChange(), inventoryUploadDelete(), inventoryUploadList(), inventoryUploadGet()
- List Methods – listGet()
All 60+ Discogs API endpoints are supported with clean documentation — see Discogs API Documentation for complete method reference
📋 Requirements
- php ^8.1
- guzzlehttp/guzzle ^6.5 || ^7.0
🔧 Advanced Configuration
Option 1: Simple Configuration (Recommended)
For basic customizations like timeout or User-Agent, use the ClientFactory:
Option 2: Advanced Guzzle Configuration
For advanced HTTP client features (middleware, interceptors, etc.), create your own Guzzle client:
💡 Note: By default, the client uses
DiscogsClient/3.0 (+https://github.com/calliostro/php-discogs-api)
as User-Agent. You can override this by setting custom headers as shown above.
🔐 Authentication
Discogs supports different authentication flows:
Personal Access Token (Recommended)
For accessing your own account data, use a Personal Access Token from Discogs Developer Settings:
OAuth 1.0a Authentication
For building applications that access user data on their behalf:
💡 Note: Implementing the complete OAuth flow is complex and beyond the scope of this README. For detailed examples, see the Discogs OAuth Documentation.
🧪 Testing
Run the test suite:
Run static analysis:
Check code style:
📚 API Documentation Reference
For complete API documentation including all available parameters, visit the Discogs API Documentation.
Popular Methods
Database Methods
search($params)
– Search the Discogs databaseartistGet($params)
– Get artist informationartistReleases($params)
– Get artist's releasesreleaseGet($params)
– Get release informationmasterGet($params)
– Get master release informationmasterVersions($params)
– Get master release versions
Collection Methods
collectionFolders($params)
– Get user's collection folderscollectionItems($params)
– Get collection items by foldercollectionFolderGet($params)
– Get specific collection folder
User Methods
identityGet($params)
– Get authenticated user's identity (auth required)userGet($params)
– Get user profile informationwantlistGet($params)
– Get user's wantlist
🤝 Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Please ensure your code follows PSR-12 standards and includes tests.
📄 License
This project is licensed under the MIT License — see the LICENSE file for details.
🙏 Acknowledgments
- Discogs for providing the excellent music database API
- Guzzle for the robust HTTP client
- ricbra/php-discogs-api and AnssiAhola/php-discogs-api for the original inspiration
⭐ Star this repo if you find it useful! It helps others discover this lightweight solution.