Genius
This package was cloned from Joe Dawson's package which may be found at https://github.com/JoeDawson/genius., (*1)
This package was made to fetch data from the Genius API, this is very much still a work in progress. If you plan on relying on this to fetch information from their API using this package, we would recommend not using this package for now., (*2)
Installation
Firstly you'll need to pull this in using Composer., (*3)
composer require chocoholics/genius
After you have successfully installed, add the Service Provider to your config/app.php`, (*4)
Chocoholics\Genius\GeniusServiceProvider::class,
And the following facade, also in config/app.php
, (*5)
'Genius' => Chocoholics\Genius\Facades\Genius::class,
Now we'll go ahead and publish the genius.php
configuration file., (*6)
php artisan vendor:publish --provider="Chocoholics\Genius\GeniusServiceProvider"
Open up the genius.php
, you will see that you will require an access token. Create one for your API client on Genius and add it to your env
file., (*7)
GENIUS_TOKEN=
What does this package do?
Currently, you can fetch a single Annotation or Song., (*8)
The following with return a JSON response for the given annotation., (*9)
$annotation = Genius::annotation(10225840)->get();
This is how you would fetch a song, again this will return a JSON response., (*10)
$song = Genius::song(378195)->get();