Download the PHP package siegsb/play-extractor without Composer
On this page you can find all versions of the php package siegsb/play-extractor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download siegsb/play-extractor
More information about siegsb/play-extractor
Files in siegsb/play-extractor
Package play-extractor
Short Description Extracts info from Play Store easily like an API
License Apache-2.0
Homepage https://github.com/siegsb/play-extractor
Informations about the package play-extractor
PlayExtractor
This project is a fork of PlayStoreApi project but isn't related in any way with that project. Thanks to RedInput, developer of the original library on which this is based.
Play Extractor provides a Composer PHP library to extract info from Play Store for differents items like albums, apps, artists and more.
Don't requires any kind of authentication and support all the languages and countries availables on Play Store website.
Installation
The best method to install PlayExtractor in your PHP project is using Composer, just add the following line to your require:
"siegsb/play-extractor": "1.0.*"
Then update your Composer project using composer update. Also you can clone this repository to your project path but the recomended method is via Composer.
Usage
First include the autoload.php file into your PHP script and set the namespace to use:
Then you can create a new PlayExtractor object with the locale and country params using ISO-2 format:
Now you can request the details of any kind of content available on Play Store:
Supported Contents
Right now PlayExtractor support the following contents, in each item you can see more information:
Album
This object have the following methods:
App
This object have the following methods:
Artist
This object have the following methods:
Book
This object have the following methods:
Exceptions
If the language or country code is not valid for Play Store, or if the requested content do not exist, PlayExtractor returns an Exception.
Tips
You can use the method json_encode() with any Data object to convert to JSON easily, for example:
This returns the following JSON string:
Colaborations and pull requests
To keep clean code, all the scripts of the library must be formated in PSR-2 and the autoloads in PSR-4 with namespaces. Try to keep the compatibility of the library with PHP 5.4 minimum. Don't modify the composer.json if not necessary and the build test with Travis is required.
If you want to include a new function, please add the correct comments to your code using annotations and create the PHPUnit test cases in the tests path. Also you should be clear in your commits messages. Be care with the info of others developers and don't delete it from the composer file, also verify taht your info, if you want, are correct.
Thanks!