Class: Anego::Client
- Inherits:
-
Object
- Object
- Anego::Client
- Defined in:
- lib/anego/client.rb
Constant Summary collapse
- API_ENDPOINT =
"https://api.appannie.com/v1.2"
Instance Method Summary collapse
- #accounts ⇒ Object
-
#initialize(api_key: nil) ⇒ Client
constructor
A new instance of Client.
- #product_details(market, product_id) ⇒ Object
- #product_ranks(market, product_id, start_date, end_date, country, category, feed) ⇒ Object
- #product_ratings(market, product_id) ⇒ Object
- #product_reviews(market, product_id, start_date, end_date, country) ⇒ Object
- #products(account_id) ⇒ Object
Constructor Details
#initialize(api_key: nil) ⇒ Client
Returns a new instance of Client.
5 6 7 |
# File 'lib/anego/client.rb', line 5 def initialize(api_key: nil) @api_key = api_key end |
Instance Method Details
#accounts ⇒ Object
9 10 11 |
# File 'lib/anego/client.rb', line 9 def accounts request :get, "/accounts" end |
#product_details(market, product_id) ⇒ Object
17 18 19 |
# File 'lib/anego/client.rb', line 17 def product_details(market, product_id) request :get, "/apps/#{market}/app/#{product_id}/details" end |
#product_ranks(market, product_id, start_date, end_date, country, category, feed) ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/anego/client.rb', line 33 def product_ranks(market, product_id, start_date, end_date, country, category, feed) request :get, "/apps/#{market}/app/#{product_id}/ranks", { start_date: start_date, end_date: end_date, countries: country, category: category, feed: feed } end |
#product_ratings(market, product_id) ⇒ Object
21 22 23 |
# File 'lib/anego/client.rb', line 21 def (market, product_id) request :get, "/apps/#{market}/app/#{product_id}/ratings" end |
#product_reviews(market, product_id, start_date, end_date, country) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/anego/client.rb', line 25 def product_reviews(market, product_id, start_date, end_date, country) request :get, "/apps/#{market}/app/#{product_id}/reviews", { start_date: start_date, end_date: end_date, countries: country } end |
#products(account_id) ⇒ Object
13 14 15 |
# File 'lib/anego/client.rb', line 13 def products(account_id) request :get, "/accounts/#{account_id}/products" end |