Class: MarketBot::Play::Developer

Inherits:
Chart
  • Object
show all
Defined in:
lib/market_bot/play/developer.rb

Constant Summary

Constants inherited from Chart

Chart::CATEGORIES, Chart::COLLECTIONS, Chart::MAX_PAGES

Instance Attribute Summary

Attributes inherited from Chart

#category, #collection, #country, #lang, #result

Instance Method Summary collapse

Methods inherited from Chart

parse

Constructor Details

#initialize(developer, options = {}) ⇒ Developer

Returns a new instance of Developer.



4
5
6
# File 'lib/market_bot/play/developer.rb', line 4

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

Instance Method Details

#store_urls(options = {}) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/market_bot/play/developer.rb', line 8

def store_urls(options={})
  results = []
  num = 100

  url = "https://play.google.com/store/apps/developer?"
  url << "id=#{CGI.escape(@collection)}&"
  url << "start=0&"
  url << "gl=#{@country}&"
  url << "num=#{num}&"
  url << "hl=#{@lang}"

  results << url

  return results
end

#update(opts = {}) ⇒ Object



24
25
26
27
28
29
# File 'lib/market_bot/play/developer.rb', line 24

def update(opts={})
  super(opts)
  @result.each { |r| r.delete(:rank) }

  self
end