1010[ ![ PHPStan Level] ( https://img.shields.io/badge/PHPStan-level%208-brightgreen.svg )] ( https://phpstan.org/ )
1111[ ![ Code Style] ( https://img.shields.io/badge/code%20style-PSR12-brightgreen.svg )] ( https://github.com/FriendsOfPHP/PHP-CS-Fixer )
1212
13- > ** 🚀 MINIMAL YET POWERFUL!** Focused ~ 750-line Discogs API client — as lightweight as possible while maintaining modern PHP comfort and clean APIs.
13+ > ** 🚀 MINIMAL YET POWERFUL!** Focused, lightweight Discogs API client — as compact as possible while maintaining modern PHP comfort and clean APIs.
1414
1515## 📦 Installation
1616
@@ -93,7 +93,7 @@ $identity = $discogs->getIdentity();
9393- ** Simple Setup** – Works immediately with public data, easy authentication for advanced features
9494- ** Complete API Coverage** – All 60 Discogs API endpoints supported
9595- ** Clean Parameter API** – Natural method calls: ` getArtist(123) ` with named parameter support
96- - ** Lightweight Focus** – ~ 750 lines for 60 endpoints (12 lines per endpoint average) with minimal dependencies
96+ - ** Lightweight Focus** – Minimal codebase with only essential dependencies
9797- ** Modern PHP Comfort** – Full IDE support, type safety, PHPStan Level 8 without bloat
9898- ** Secure Authentication** – Full OAuth and Personal Access Token support
9999- ** Well Tested** – 100% test coverage, PSR-12 compliant
@@ -111,7 +111,7 @@ $identity = $discogs->getIdentity();
111111- ** User Wantlist Methods** – getUserWantlist(), addToWantlist(), updateWantlistItem(), removeFromWantlist()
112112- ** User Lists Methods** – getUserLists(), getUserList()
113113
114- * All 60 Discogs API endpoints are supported with clean documentation — see [ Discogs API Documentation] ( https://www.discogs.com/developers/ ) for complete method reference*
114+ * All Discogs API endpoints are supported with clean documentation — see [ Discogs API Documentation] ( https://www.discogs.com/developers/ ) for complete method reference*
115115
116116> 💡 ** Note:** Some endpoints require special permissions (seller accounts, data ownership).
117117
@@ -228,107 +228,6 @@ $identity = $discogs->getIdentity();
228228echo "Hello " . $identity['username'];
229229```
230230
231- ## 🧪 Testing
232-
233- ### Quick Testing Commands
234-
235- ``` bash
236- # Unit tests (fast, CI-compatible, no external dependencies)
237- composer test
238-
239- # Integration tests (requires Discogs API credentials)
240- composer test-integration
241-
242- # All tests together (unit + integration)
243- composer test-all
244-
245- # Code coverage (HTML + XML reports)
246- composer test-coverage
247- ```
248-
249- ### Static Analysis & Code Quality
250-
251- ``` bash
252- # Static analysis (PHPStan Level 8)
253- composer analyse
254-
255- # Code style check (PSR-12)
256- composer cs
257-
258- # Auto-fix code style
259- composer cs-fix
260- ```
261-
262- ### Test Strategy
263-
264- - ** Unit Tests (101)** : Fast, reliable, no external dependencies → ** CI default**
265- - ** Integration Tests (31)** : Real API calls, rate-limited → ** Manual execution**
266- - ** Total Coverage** : 100% lines, methods, and classes covered
267-
268- ## 📚 API Documentation
269-
270- Complete method documentation available at [ Discogs API Documentation] ( https://www.discogs.com/developers/ ) .
271-
272- > ⚠️ ** API Change Notice:** The ` getReleaseStats() ` endpoint format changed around 2024/2025. It now returns only ` {"is_offensive": false} ` instead of the documented ` {"num_have": X, "num_want": Y} ` . For community statistics, use ` getRelease() ` and access ` community.have ` and ` community.want ` instead. Our library handles both formats gracefully.
273-
274- ### Most Used Methods
275-
276- | Method | Description | Auth Level |
277- | -------------------------------| ------------------| ---------------|
278- | ` search() ` | Database search | 2️⃣+ Consumer |
279- | ` getArtist() ` , ` getRelease() ` | Public data | 1️⃣ None |
280- | ` listCollectionFolders() ` | Your collections | 3️⃣+ Personal |
281- | ` getIdentity() ` | User info | 3️⃣+ Personal |
282- | ` getUserInventory() ` | Marketplace | 3️⃣+ Personal |
283-
284- ### Parameter Syntax Examples
285-
286- #### Traditional Positional Parameters
287-
288- ``` php
289- // Good for methods with few parameters
290- $artist = $discogs->getArtist(4470662); // Billie Eilish
291- $release = $discogs->getRelease(30359313); // Happier Than Ever
292- $results = $discogs->search('Taylor Swift', 'artist');
293- $collection = $discogs->listCollectionItems('username', 0, 25);
294- ```
295-
296- #### Named Parameters (PHP 8.0+, Recommended)
297-
298- ``` php
299- // Better for methods with many optional parameters
300- $search = $discogs->search(
301- query: 'Olivia Rodrigo',
302- type: 'release',
303- year: 2021,
304- perPage: 50
305- );
306-
307- $releases = $discogs->listArtistReleases(
308- artistId: 4470662,
309- sort: 'year',
310- sortOrder: 'desc',
311- perPage: 25
312- );
313-
314- // Marketplace listing with named parameters
315- $listing = $discogs->createMarketplaceListing(
316- releaseId: 30359313,
317- condition: 'Near Mint (NM or M-)',
318- price: 45.99,
319- status: 'For Sale',
320- comments: 'Rare pressing, excellent condition'
321- );
322- ```
323-
324- #### Hybrid Approach
325-
326- ``` php
327- // Mix positional for required, named for optional
328- $search = $discogs->search('Ariana Grande', 'artist', perPage: 50);
329- $releases = $discogs->listArtistReleases(4470662, sort: 'year', sortOrder: 'desc');
330- ```
331-
332231## 🤝 Contributing
333232
3342331 . Fork the repository
@@ -337,7 +236,9 @@ $releases = $discogs->listArtistReleases(4470662, sort: 'year', sortOrder: 'desc
3372364 . Push to branch (` git push origin feature/name ` )
3382375 . Open Pull Request
339238
340- Please follow PSR-12 standards and include tests.
239+ Contributions are welcome! See [ DEVELOPMENT.md] ( DEVELOPMENT.md ) for detailed setup instructions, testing guide, and development workflow.
240+
241+ Please follow PSR-12 standards and include tests for new features.
341242
342243## 📄 License
343244
0 commit comments