Download the PHP package edwindayot/echonest without Composer

On this page you can find all versions of the php package edwindayot/echonest. 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 echonest

Echonest API

Latest Stable Version Total Downloads License

So here you are, searching for usefull methods to request the Echonest API with a speak-like language. This Echonest Library helps you in this way, take a look :

Initializing

First of all, you need to initialize the Echonest Library, just do it like this:

And that's it, you've got your Echonest instance ! The only next thing to do is to give it as a parameter of the API category you want to use. Let's say you want to use the Artist category:

Requesting

Now, you'll be able to make all of your requests very simply. Let's say you want to search an artist which name is "Martin Garrix":

With only this, you'll get the QueryBuilder instance, there is many methods you can use with the Fluent model. For instance, you could just want the Spotify's datas for this artist, so you can say:

There you are, now, you've got your QueryBuilder instance, and the only thing to do now is to get the Query results:

Now, your martin_garrix is a collection, and there is a couple thing you can do at this point. The thing you'll use the most is the array transformation of the collection.

That's it, you've got your array.

These methods matches to the Echonest API specifications, so if you want to understand what is an id, or whatever, please refer to http://developer.echonest.com/docs/v4/.

So, since the get() method is launched, the QueryBuilder instance become an EchonestColletion instance, so the methods from the QueryBuilder aren't available anymore. Here is a list of the available methods for each API Category, for the QueryBuilder, and for the EchonestCollection:

Artists

Songs

Genres

Tracks

Query

Collection

Of course, the last method toArray() isn't necessary because of the ArrayAccess implements. The EchonestCollection var 'items' values are accessible as an array:

Works fine as this:

So the toArray() is necessary only if you want to return it as json or xml for instance.

Enjoy ! (Do not forget to report any bug you found, and please tell me about the new features you want !)


All versions of echonest with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
guzzle/guzzle Version ~3.7
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 edwindayot/echonest contains the following files

Loading the files please wait ....