ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - sheharyarn/explay: Google Play API in Elixir :computer:
Google Play API in Elixir  :computer:. Contribute to sheharyarn/explay development by creating an account on GitHub.
Visit Site

GitHub - sheharyarn/explay: Google Play API in Elixir  :computer:

GitHub - sheharyarn/explay: Google Play API in Elixir :computer:

ExPlay

Google Play (Android Market) API in Elixir :computer:

(Ported from node-google-play)

Installation

Add explay to your list of dependencies in mix.exs:

def deps do
  [{:explay, "~> 0.1.5"}]
end

Install JS Dependency

Right now, there isn't an erlang/elixir implementation of Google's Protobuf library that can decode v2 data correctly, so we're relying on the npm module protobufjs. In your project's root, run:

npm init
npm install protobufjs --save

or if you prefer yarn:

yarn add protobufjs

Usage

There are a lot of modules, each handling their own relevant API calls, but you need to be concerned with only two:

  • ExPlay.Account
  • ExPlay.Request

Authentication

To interact with the Google Play API and get back data, you need a valid and authenticated Google account (with email, password and device id).

# Save this account object to later use in API requests

account = %ExPlay.Account{email: "[email protected]", password: "12345678", device_id: "XXXXXXXX"}
account = ExPlay.Account.authenticate!(account)

Get App Details

{:ok, app} = ExPlay.Request.package_details(account, "com.facebook.katana")

app.title
# => "Facebook"

app.descriptionHtml
# => "Keeping up with friends is faster than ever..."

app.details.appDetails.numDownloads
# => "1,000,000,000+ downloads"

app.details.appDetails.versionCode
# => 41212272

# And lots of other stuff. Use Map.keys(app) to get an idea of the response.

Get App Delivery Data

You can get an app's delivery data using ExPlay.Request.package_download_info/2. It will return a map with a downloadable APK url and authorization cookies which you can pass to any HTTP client to download the APK (Even wget or curl).

Note: The package here can be the app's bundle identifier string or a {bundle, version} tuple.

{:ok, info} = ExPlay.Request.package_download_info(account, "com.facebook.katana")

info.downloadUrl
# => "https://play.googlezip.net/market/download/Download?packageName=com.facebook.katana&versionCode=41212272&ssl..."

info.downloadAuthCookie
# => [%{"name" => "MarketDA", "value" => "09919279757374609811"}]

Download APK

Alternatively, you can let ExPlay download the app for you. Specify the package you want to download and a (writable) path where you'd like to save it.

Note: The package here can be the app's bundle identifier string or a {bundle, version} tuple.

ExPlay.Request.download!(account, "com.facebook.katana", "/tmp/facebook.apk")
# => :ok

Roadmap

  • Write missing Tests
  • Write Documentation
  • Update documentation with more information and examples
  • Implement pure Erlang/Elixir Protobuf v2 solution for decoding data
  • Cover all API calls
    • Authentication
    • Package Details
    • Bulk Package Details
    • Search Apps
    • Related Apps
    • Categories
    • App Reviews
    • Download App
    • Download App Data

Contributing

  • Fork, Enhance, Send PR
  • Lock issues with any bugs or feature requests
  • Implement something from Roadmap
  • Spread the word

License

This package is available as open source under the terms of the MIT License.

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory