-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreleases.php
More file actions
44 lines (28 loc) · 915 Bytes
/
releases.php
File metadata and controls
44 lines (28 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
use AmpacheDiscogs\Discogs;
require dirname(__DIR__) . '/vendor/autoload.php';
// your own username and password are required to use the Discogs API
$username = null;
$password = null;
$discogs = new Discogs($username, $password);
$artist = 'Code 64';
$album = 'The Shape';
$artistId = 129150;
$masterId = 2871442;
$releaseId = 25201483;
try {
$results = $discogs->search_release($artist, $album);
print_r($results);
$results = $discogs->search_master($artist, $album);
print_r($results);
$results = $discogs->get_artist_releases($artistId);
print_r($results);
$results = $discogs->get_release($releaseId);
print_r($results);
$results = $discogs->get_master($masterId);
print_r($results);
$results = $discogs->get_master_versions($masterId);
print_r($results);
} catch (Exception $exception) {
print_r($exception->getMessage());
}