PHP code example of yzpeedro / genius-php-sdk
1. Go to this page and download the library: Download yzpeedro/genius-php-sdk library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yzpeedro / genius-php-sdk example snippets
// get GeniusSDK class
use Yzpeedro\GeniusPhpSdk\Genius;
// initiate Genius
$genius = new Genius('YOUR_ACCESS_TOKEN');
// get artist by id
$artist = $genius->artist('artist_id');
// get song by id
$song = $genius->song('song_id');
// get annotation by id
$annotation = $genius->annotations('annotation_id');
// get referents by id
$referent = $genius->referents('web_page_id');
// get webPage
$webPages = $genius->webPage('raw_annotatable_url', 'canonical_url', 'og_url');
// get result from search in Genius database
$search = $genius->search('query');
bash
composer