Download the PHP package njasm/soundcloud without Composer
On this page you can find all versions of the php package njasm/soundcloud. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download njasm/soundcloud
More information about njasm/soundcloud
Files in njasm/soundcloud
Package soundcloud
Short Description Soundcloud API Wrapper written in PHP with OAuth 2.0 support
License MIT
Homepage http://github.com/njasm/soundcloud
Informations about the package soundcloud
Soundcloud.com API Wrapper in PHP
Implemented features
- User Authorization/Authentication
- User Credentials Flow Authentication
- Access to all GET, PUT, POST and DELETE Resources
- Media File Download/Upload
Requirements
PHP 5.6 or higher.
Installation
Recommended installation is through composer.
Include njasm\soundcloud
in your project, by adding it to your composer.json
file.
If you don't use composer
to manage your project dependencies, this library provides your with an
autoload.php
You just need to include autoload.php in your project to start using the library as you would if installed through
composer
.
Usage
Include Njasm\Soundcloud\
namespace in the script where you intend to use SoundcloudFacade
or Soundcloud
class.
SoundcloudFacade.php
provides you with boilerplate code to get authorization url, change a code for a token, etc etc..
Examples
Get Authorization Url.
Authentication
Authentication with user credentials flow.
If an access token is returned from soundcloud, it will be automatically set for future requests. The Response object will always be returned to the client.
Accept response as json or xml
Note: Soundcloud.com stopped sending responses in xml format, the methods are kept in the 2.x.x versions, but calling them will have no effect on the request, all requests will have an accept header of application/json.
Add params to resource.
Send request
To allow different ways to set the Resource parameters that you are accessing - by submitting an array or setParams() method injection. The request will only be sent to soundcloud, when you invoke the request() method. Take in considerations that specific operations like userCredentials(), download(), etc. will invoke request() automatically.