PHP code example of siegsb / play-extractor

1. Go to this page and download the library: Download siegsb/play-extractor 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/ */

    

siegsb / play-extractor example snippets



use \SiegSB\PlayExtractor;

$playExtractor = new PlayExtractor('en', 'US');

/**  
* @param $contentId string. The unique ID for the content, see the Supported Contents to more information  
* @return $details DataObject. The details of the content as a object of the requested content, see the Supported Contents to more information  
*/  
$playExtractor->details->album($contentId);  
$playExtractor->details->app($contentId);  
$playExtractor->details->artist($contentId);  
$playExtractor->details->book($contentId);  

// Returns the album ID, the same that you use when you call $playExtractor->details->album()  
$album->getAlbumId();  
// Returns the URL of the album cover  
$album->getImage();  
// Returns the title of the album  
$album->getTitle();  
// Returns the artist name  
$album->getArtist();  
// Returns the artist ID, you can use it to request the artist details  
$album->getArtistId();  
// Returns the price based on your PlayExtractor language and country configuration  
$album->getPrice();  
// Returns the Play Store URL of the album  
$album->getUrl();  
// Returns the description of the album  
$album->getDescription();  
// Returns the genre  
$album->getGenre();  
// Returns the number of tracks  
$album->getTracks();  
// Returns the total rating of the album as a float
$album->getRatingValue();  
// Returns the number of ratings  
$album->getRatingCount();  

// Returns the package name, this is the contentId  
$app->getPackage();  
// Returns the URL of the icon like PNG  
$app->getIcon();  
// Returns the public name of the app  
$app->getName();  
// Returns the public name of the developer  
$app->getDeveloper();  
// Returns the price of the app based in your PlayExtractor configuration  
$app->getPrice();  
// Returns the Play Store URL of the app  
$app->getUrl();  
// Returns the app description  
$app->getDescription();  
// Returns the category  
$app->getCategory();  
// Returns the total rating of the app as a float  
$app->getRatingValue();  
// Returns the number of ratings  
$app->getRatingCount();  
// Returns the size of the APK file  
$app->getFileSize();  
// Returns the date of the last update as a string date format  
$app->getDateUpdated();  
// Returns the number of downloads  
$app->getNumDownloads();  
// Returns the current app version  
$app->getVersion();  
// Returns the minimum Android version that the app 

// Returns the artist ID  
$artist->getArtistId();  
// Returns the URL of the artist image as PNG  
$artist->getImage();  
// Returns the public artist name  
$artist->getName();  
// Returns the Play Store URL of the artist  
$artist->getUrl();  
// Returns the biography of the artist  
$artist->getAbout();  

// Returns the book ID  
$book->getBookId();  
// Returns the URL of the book cover as PNG  
$book->getImage();  
// Returns the title  
$book->getTitle();  
// Returns the public author name  
$book->getAuthor();  
// Returns the price  
$book->getPrice();  
// Returns the Play Store URL of the book  
$book->getUrl();  
// Returns the description of the book  
$book->getDescription();  
// Returns the total number of pages  
$book->getPages();  
// Returns the language of the book  
$book->getLanguages();  
// Returns the ISBN code  
$book->getIsbn();  
// Returns the total rating as a float  
$book->getRatingValue();  
// Returns the number of ratings  
$book->getRatingCount();  

print json_encode($artist);