Class: StoreApi::AppStore::Apps::Details
- Inherits:
-
Object
- Object
- StoreApi::AppStore::Apps::Details
- Includes:
- Request
- Defined in:
- lib/store_api/app_store/apps/details.rb
Overview
app store detail class
Constant Summary collapse
- @@path =
'/lookup'
Constants included from Request
Instance Attribute Summary collapse
-
#bundle_id ⇒ Object
Returns the value of attribute bundle_id.
-
#categories ⇒ Object
Returns the value of attribute categories.
-
#category ⇒ Object
Returns the value of attribute category.
-
#category_id ⇒ Object
Returns the value of attribute category_id.
-
#category_ids ⇒ Object
Returns the value of attribute category_ids.
-
#content_rating ⇒ Object
Returns the value of attribute content_rating.
-
#cover_image ⇒ Object
Returns the value of attribute cover_image.
-
#date_published ⇒ Object
Returns the value of attribute date_published.
-
#description ⇒ Object
Returns the value of attribute description.
-
#developer ⇒ Object
Returns the value of attribute developer.
-
#developer_url ⇒ Object
Returns the value of attribute developer_url.
-
#file_size ⇒ Object
Returns the value of attribute file_size.
-
#id ⇒ Object
Returns the value of attribute id.
-
#price ⇒ Object
Returns the value of attribute price.
-
#rating_count ⇒ Object
Returns the value of attribute rating_count.
-
#rating_score ⇒ Object
Returns the value of attribute rating_score.
-
#rating_value ⇒ Object
Returns the value of attribute rating_value.
-
#release_notes ⇒ Object
Returns the value of attribute release_notes.
-
#screenshot ⇒ Object
Returns the value of attribute screenshot.
-
#software_version ⇒ Object
Returns the value of attribute software_version.
-
#supported_devices ⇒ Object
Returns the value of attribute supported_devices.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(id, country = nil, proxy = nil, header = nil) ⇒ Details
constructor
initialize.
-
#raw_details ⇒ Hash
get raw details.
Methods included from Request
Constructor Details
#initialize(id, country = nil, proxy = nil, header = nil) ⇒ Details
initialize
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/store_api/app_store/apps/details.rb', line 25 def initialize(id, country=nil, proxy=nil, header=nil) params = {'id' => id, 'country' => country, 'entry' => 'software' } begin html = get(StoreApi::AppStore::HOST, @@path, params, StoreApi::AppStore::HTTPS, proxy, header) @raw_details = JSON.load(html)['results'][0] @id = @raw_details['trackId'] @title = @raw_details['trackName'] @cover_image = @raw_details['artworkUrl60'] @developer = @raw_details['sellerName'] @developer_url = @raw_details['artistViewUrl'] @category = @raw_details['primaryGenreName'] @categories = @raw_details['genres'] @category_id = @raw_details['primaryGenreId'] @category_ids = @raw_details['genreIds'] @price = @raw_details['price'] @screenshot = @raw_details['screenshotUrls'] @description = @raw_details['description'] @rating_value = @raw_details['averageUserRating'] @rating_count = @raw_details['userRatingCount'] @rating_score = @raw_details['averageUserRating'] @release_notes = @raw_details['releaseNotes'] @date_published = @raw_details['releaseDate'] @file_size = @raw_details['fileSizeBytes'] @software_version = @raw_details['version'] @content_rating = @raw_details['contentAdvisoryRating'] @supported_devices = @raw_details['supportedDevices'] @bundle_id = @raw_details['bundleId'] rescue => e puts e end end |
Instance Attribute Details
#bundle_id ⇒ Object
Returns the value of attribute bundle_id.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def bundle_id @bundle_id end |
#categories ⇒ Object
Returns the value of attribute categories.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def categories @categories end |
#category ⇒ Object
Returns the value of attribute category.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def category @category end |
#category_id ⇒ Object
Returns the value of attribute category_id.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def category_id @category_id end |
#category_ids ⇒ Object
Returns the value of attribute category_ids.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def category_ids @category_ids end |
#content_rating ⇒ Object
Returns the value of attribute content_rating.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def @content_rating end |
#cover_image ⇒ Object
Returns the value of attribute cover_image.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def cover_image @cover_image end |
#date_published ⇒ Object
Returns the value of attribute date_published.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def date_published @date_published end |
#description ⇒ Object
Returns the value of attribute description.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def description @description end |
#developer ⇒ Object
Returns the value of attribute developer.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def developer @developer end |
#developer_url ⇒ Object
Returns the value of attribute developer_url.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def developer_url @developer_url end |
#file_size ⇒ Object
Returns the value of attribute file_size.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def file_size @file_size end |
#id ⇒ Object
Returns the value of attribute id.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def id @id end |
#price ⇒ Object
Returns the value of attribute price.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def price @price end |
#rating_count ⇒ Object
Returns the value of attribute rating_count.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def @rating_count end |
#rating_score ⇒ Object
Returns the value of attribute rating_score.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def @rating_score end |
#rating_value ⇒ Object
Returns the value of attribute rating_value.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def @rating_value end |
#release_notes ⇒ Object
Returns the value of attribute release_notes.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def release_notes @release_notes end |
#screenshot ⇒ Object
Returns the value of attribute screenshot.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def screenshot @screenshot end |
#software_version ⇒ Object
Returns the value of attribute software_version.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def software_version @software_version end |
#supported_devices ⇒ Object
Returns the value of attribute supported_devices.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def supported_devices @supported_devices end |
#title ⇒ Object
Returns the value of attribute title.
11 12 13 |
# File 'lib/store_api/app_store/apps/details.rb', line 11 def title @title end |
Instance Method Details
#raw_details ⇒ Hash
get raw details
60 61 62 |
# File 'lib/store_api/app_store/apps/details.rb', line 60 def raw_details @raw_details end |