Class: DmgAndroidApi::Android::Developer

Inherits:
Leaderboard show all
Defined in:
lib/dmg_android_api/android/developer.rb

Overview

Developer pages are extremely similar to leaderboard pages. Amazingly, this inheritence hack works!

Constant Summary

Constants inherited from Leaderboard

Leaderboard::CATEGORIES, Leaderboard::IDENTIFIERS

Instance Attribute Summary

Attributes inherited from Leaderboard

#category, #hydra, #identifier

Instance Method Summary collapse

Methods inherited from Leaderboard

#enqueue_update, #initialize, parse, parse_editors_choice_page, parse_normal_page, #rank_to_page, #results, #update

Constructor Details

This class inherits a constructor from DmgAndroidApi::Android::Leaderboard

Instance Method Details

#initialze(developer, options = {}) ⇒ Object



7
8
9
# File 'lib/dmg_android_api/android/developer.rb', line 7

def initialze(developer, options={})
  super(query, nil, options)
end

#market_urls(options = {}) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/dmg_android_api/android/developer.rb', line 11

def market_urls(options={})
  results = []

  min_page = options[:min_page] || 1
  max_page = options[:max_page] || 25

  (min_page..max_page).each do |page|
    start_val = (page - 1) * 12

    url = "https://play.google.com/store/apps/developer?"
    url << "id=#{URI.escape(identifier)}&"
    url << "start=#{start_val}&"
    url << "num=12&hl=en"

    results << url
  end

  results
end