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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-discogs-api

Discogs Api

This library is a PHP 7.3 / PHP 8.x implementation of the Discogs API v2.0. The Discogs API is a REST-based interface. By using this library you don't have to worry about communicating with the API: all the hard work has already be done.

License

This library is released under the MIT license. See the complete license in the LICENSE file.

Symfony Bundle

For the integration of Discogs into Symfony 5 or Symfony 6, see calliostro/discogs-bundle.

Installation

Start by installing composer. Next do:

$ composer require calliostro/php-discogs-api

Requirements

PHP 7.3 or PHP 8.x

Usage

Creating a new instance is as simple as:

User-Agent

Discogs requires that you supply a User-Agent. You can do this easily:

Throttling

Discogs doesn't like it when you hit their API at a too high connection rate. Use the ThrottleSubscriber to prevent getting errors or banned:

Authentication

Discogs API allow to access protected endpoints with either a simple Discogs Auth Flow or a more advanced (and more complex) Oauth Flow

Discogs Auth

As stated in the Discogs Authentication documentation:

In order to access protected endpoints, you’ll need to register for either a consumer key and secret or user token, depending on your situation:

  • To easily access your own user account information, use a User token.
  • To get access to an endpoint that requires authentication and build 3rd party apps, use a Consumer Key and Secret.

Use Authorization header:

Authenticate with personal access token (you can get it from https://www.discogs.com/settings/developers):

OAuth

There are a lot of endpoints which require OAuth. Lucky for you using Guzzle this is peanuts. If you're having trouble obtaining the token and token_secret, please check out ricbra/php-discogs-api-example.

History

Another cool plugin is the History plugin:

More info and plugins

For more information about Guzzle and its plugins checkout the docs.

Perform a search:

Per august 2014 a signed OAuth request is required for this endpoint.

Get information about a label:

Get information about an artist:

Get information about a release:

Get information about a master release:

Get image

Discogs returns the full url to images so just use the internal client to get those:

User lists

Get user lists

Get user list items

Get user wantlist

User Collection

Authorization is required when folder_id is not 0.

Get collection folders

Get collection folder

Get collection items by folder

Listings

Creating and manipulating listings requires you to be authenticated as the seller

Create a Listing

Change Listing

Delete a Listing

Create Listings in bulk (via CSV)

Delete Listings in bulk (via CSV)

Documentation

Further documentation can be found at the Discogs API v2.0 Documentation.

Contributing

Implemented a missing feature? You can request it. And creating a pull request is an even better way to get things done.

Thanks to

Initial development by ricbra/php-discogs-api.

Porting to PHP 7 and adding more Discos API methods by AnssiAhola/php-discogs-api.

This API is build upon the shoulders of Guzzle 7.


All versions of php-discogs-api with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
guzzlehttp/guzzle Version ^7.0
guzzlehttp/guzzle-services Version ^1.2|^1.3|^1.4
guzzlehttp/oauth-subscriber Version ^0.4|^0.5|^0.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package calliostro/php-discogs-api contains the following files

Loading the files please wait ....