app_store_info 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.rubocop.yml +10 -0
- data/.ruby-version +1 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/app_store_info.gemspec +33 -0
- data/bin/console +7 -0
- data/bin/setup +7 -0
- data/lib/app_store_info.rb +35 -0
- data/lib/app_store_info/api.rb +47 -0
- data/lib/app_store_info/app.rb +51 -0
- data/lib/app_store_info/genres.rb +77 -0
- data/lib/app_store_info/json_accessors.rb +25 -0
- data/lib/app_store_info/regions.rb +56 -0
- data/lib/app_store_info/version.rb +3 -0
- metadata +189 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b373ddd16194c0c7cc275cf7c3d8cc626ccca9b9
|
4
|
+
data.tar.gz: 19751924943f11933dc977b6ce5f11c3a4e256f9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: df93c102915029dda150226ed17f5cd74282895d58c490eb5cfecb4d6a6fc36c5a35023535be2cf5ffa8b103006a7f78b8684453f692ab1462eeb81d06c728e7
|
7
|
+
data.tar.gz: 0867b3e3df2dad6d59373574a8d2aba23e0353f22eb85b537230461d98807855cf97cf7b2b5ac0c4cd774cb6e90c99679337e86a3830c41a4279ec99d008df25
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.2.3
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Ricardo Otero
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# AppStoreInfo
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/app_store_info`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'app_store_info'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install app_store_info
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/app_store_info.
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
require 'app_store_info/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'app_store_info'
|
9
|
+
spec.version = AppStoreInfo::VERSION
|
10
|
+
spec.authors = ['Ricardo Otero']
|
11
|
+
spec.email = ['oterosantos@gmail.com']
|
12
|
+
|
13
|
+
spec.summary = 'App Store parser'
|
14
|
+
spec.description = 'Get details about any app in the Apple App Store'
|
15
|
+
spec.homepage = 'https://github.com/rikas/app_store_info'
|
16
|
+
spec.license = 'MIT'
|
17
|
+
|
18
|
+
spec.bindir = 'exe'
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ['lib']
|
21
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
|
22
|
+
|
23
|
+
spec.add_dependency 'faraday', '~> 0.9'
|
24
|
+
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.10'
|
26
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
27
|
+
spec.add_development_dependency 'rspec', '~> 3.3'
|
28
|
+
spec.add_development_dependency 'rubocop', '~> 0.35'
|
29
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 1.3'
|
30
|
+
spec.add_development_dependency 'pry', '~> 0.10'
|
31
|
+
spec.add_development_dependency 'vcr', '~> 3.0'
|
32
|
+
spec.add_development_dependency 'webmock', '~> 1.22'
|
33
|
+
end
|
data/bin/console
ADDED
data/bin/setup
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'app_store_info/version'
|
2
|
+
require 'app_store_info/api'
|
3
|
+
require 'app_store_info/app'
|
4
|
+
require 'app_store_info/regions'
|
5
|
+
|
6
|
+
module AppStoreInfo
|
7
|
+
DEFAULT_REGION = 'us'
|
8
|
+
|
9
|
+
def self.read(id, region = DEFAULT_REGION)
|
10
|
+
# The region can be wrong because of the multiple app store formats (and our way of getting) it
|
11
|
+
# from the URL. If that's the case then just fallback to 'us'.
|
12
|
+
region = DEFAULT_REGION unless Regions.find(region)
|
13
|
+
|
14
|
+
json = AppStoreInfo::API.new(id, region).parse
|
15
|
+
|
16
|
+
App.new(json)
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.read_url(url)
|
20
|
+
match = url.match(%r{\Ahttps://itunes.apple.com/(\w+)/.+/?id=?([\d]+)})
|
21
|
+
|
22
|
+
fail ArgumentError, 'Invalid App Store URL' unless match
|
23
|
+
|
24
|
+
region = match.captures.first
|
25
|
+
id = match.captures.last
|
26
|
+
|
27
|
+
read(id, region)
|
28
|
+
end
|
29
|
+
|
30
|
+
class EntryNotFound < StandardError; end
|
31
|
+
|
32
|
+
class ConnectionError < StandardError; end
|
33
|
+
|
34
|
+
class ParseError < StandardError; end
|
35
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'json'
|
2
|
+
require 'faraday'
|
3
|
+
|
4
|
+
module AppStoreInfo
|
5
|
+
class API
|
6
|
+
# The URL to lookup an app. The first variable is the region (us, pt, kor, etc..) and the
|
7
|
+
# second one is the application id (i.e. 599015198).
|
8
|
+
URL_TEMPLATE = 'https://itunes.apple.com/%s/lookup?id=%s'.freeze
|
9
|
+
|
10
|
+
attr_accessor :id, :url
|
11
|
+
|
12
|
+
def initialize(id, region = AppStoreInfo::DEFAULT_REGION)
|
13
|
+
@id = id
|
14
|
+
@region = region
|
15
|
+
@url = format(URL_TEMPLATE, region, id)
|
16
|
+
end
|
17
|
+
|
18
|
+
def parse
|
19
|
+
response = Faraday.get(url)
|
20
|
+
|
21
|
+
unless response.status == 200 && response.body
|
22
|
+
fail ConnectionError, "Cound't connect to app store API"
|
23
|
+
end
|
24
|
+
|
25
|
+
parse_json(response.body)
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def parse_json(body)
|
31
|
+
json = JSON.parse(body)
|
32
|
+
|
33
|
+
fail EntryNotFound, 'No results' unless json.key?('results')
|
34
|
+
|
35
|
+
json = json['results'].first
|
36
|
+
|
37
|
+
# If the JSON exists and it's a mobile app (to avoid OS X apps)
|
38
|
+
unless json && json['supportedDevices']
|
39
|
+
fail EntryNotFound, "App not found or unavailable on '#{@region}' region"
|
40
|
+
end
|
41
|
+
|
42
|
+
json
|
43
|
+
rescue JSON::ParserError => error
|
44
|
+
raise ParseError, error.message
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'app_store_info/json_accessors'
|
2
|
+
|
3
|
+
module AppStoreInfo
|
4
|
+
class App
|
5
|
+
include AppStoreInfo::JSONAccessors
|
6
|
+
|
7
|
+
attr_reader :current_version
|
8
|
+
|
9
|
+
json_accessors id: 'trackId', name: 'trackCensoredName', domain: 'sellerUrl',
|
10
|
+
average_user_rating: 'averageUserRating', user_rating_count: 'userRatingCount',
|
11
|
+
genre_ids: 'genreIds', price: 'price', currency: 'currency',
|
12
|
+
supported_devices: 'supportedDevices', company: 'artistName',
|
13
|
+
description: 'description', minimum_os_version: 'minimumOsVersion',
|
14
|
+
features: 'features'
|
15
|
+
|
16
|
+
def initialize(json)
|
17
|
+
read_json_accessors(json)
|
18
|
+
|
19
|
+
@artwork = json['artworkUrl512'] || json['artworkUrl100']
|
20
|
+
|
21
|
+
@current_version = read_current_version(json)
|
22
|
+
end
|
23
|
+
|
24
|
+
def universal?
|
25
|
+
@features.include?('iosUniversal')
|
26
|
+
end
|
27
|
+
|
28
|
+
def genre_names
|
29
|
+
@genre_ids.map { |genre| GENRES[genre.to_i] }
|
30
|
+
end
|
31
|
+
|
32
|
+
def store_icon_url
|
33
|
+
return unless @artwork
|
34
|
+
|
35
|
+
@artwork.match(/\.(png|jpg|gif)\z/) ? @artwork : nil
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
def read_current_version(json)
|
41
|
+
version = OpenStruct.new
|
42
|
+
|
43
|
+
version.average_user_rating = json['averageUserRatingForCurrentVersion']
|
44
|
+
version.user_rating_count = json['userRatingCountForCurrentVersion']
|
45
|
+
version.number = json['version']
|
46
|
+
version.release_notes = json['releaseNotes']
|
47
|
+
|
48
|
+
version
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
module AppStoreInfo
|
2
|
+
GENRES = {
|
3
|
+
6018 => 'Books',
|
4
|
+
6000 => 'Business',
|
5
|
+
6022 => 'Catalogs',
|
6
|
+
6017 => 'Education',
|
7
|
+
6016 => 'Entertainment',
|
8
|
+
6015 => 'Finance',
|
9
|
+
6023 => 'Food & Drink',
|
10
|
+
6014 => 'Games',
|
11
|
+
6013 => 'Health & Fitness',
|
12
|
+
6012 => 'Lifestyle',
|
13
|
+
6020 => 'Medical',
|
14
|
+
6011 => 'Music',
|
15
|
+
6010 => 'Navigation',
|
16
|
+
6009 => 'News',
|
17
|
+
6021 => 'Magazines & Newspapers',
|
18
|
+
6008 => 'Photo & Video',
|
19
|
+
6007 => 'Productivity',
|
20
|
+
6006 => 'Reference',
|
21
|
+
6005 => 'Social Networking',
|
22
|
+
6004 => 'Sports',
|
23
|
+
6003 => 'Travel',
|
24
|
+
6002 => 'Utilities',
|
25
|
+
6001 => 'Weather',
|
26
|
+
|
27
|
+
# Games subgenres
|
28
|
+
7001 => 'Action',
|
29
|
+
7002 => 'Adventure',
|
30
|
+
7003 => 'Arcade',
|
31
|
+
7004 => 'Board',
|
32
|
+
7005 => 'Card',
|
33
|
+
7006 => 'Casino',
|
34
|
+
7007 => 'Dice',
|
35
|
+
7008 => 'Educational',
|
36
|
+
7009 => 'Family',
|
37
|
+
7011 => 'Music',
|
38
|
+
7012 => 'Puzzle',
|
39
|
+
7013 => 'Racing',
|
40
|
+
7014 => 'Role Playing',
|
41
|
+
7015 => 'Simulation',
|
42
|
+
7016 => 'Sports',
|
43
|
+
7017 => 'Strategy',
|
44
|
+
7018 => 'Trivia',
|
45
|
+
7019 => 'Word',
|
46
|
+
|
47
|
+
# Magazines & Newspapers subgenres
|
48
|
+
13007 => 'Arts & Photography',
|
49
|
+
13006 => 'Automotive',
|
50
|
+
13008 => 'Brides & Weddings',
|
51
|
+
13009 => 'Business & Investing',
|
52
|
+
13010 => "Children's Magazines",
|
53
|
+
13011 => 'Computers & Internet',
|
54
|
+
13012 => 'Cooking, Food & Drink',
|
55
|
+
13013 => 'Crafts & Hobbies',
|
56
|
+
13014 => 'Electronics & Audio',
|
57
|
+
13015 => 'Entertainment',
|
58
|
+
13002 => 'Fashion & Style',
|
59
|
+
13017 => 'Health, Mind & Body',
|
60
|
+
13018 => 'History',
|
61
|
+
13003 => 'Home & Garden',
|
62
|
+
13019 => 'Literary Magazines & Journals',
|
63
|
+
13020 => "Men's Interest",
|
64
|
+
13021 => 'Movies & Music',
|
65
|
+
13001 => 'News & Politics',
|
66
|
+
13004 => 'Outdoors & Nature',
|
67
|
+
13023 => 'Parenting & Family',
|
68
|
+
13024 => 'Pets',
|
69
|
+
13025 => 'Professional & Trade',
|
70
|
+
13026 => 'Regional News',
|
71
|
+
13027 => 'Science',
|
72
|
+
13005 => 'Sports & Leisure',
|
73
|
+
13028 => 'Teens',
|
74
|
+
13029 => 'Travel & Regional',
|
75
|
+
13030 => "Women's Interest"
|
76
|
+
}.freeze
|
77
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module AppStoreInfo
|
2
|
+
module JSONAccessors
|
3
|
+
def self.included(base)
|
4
|
+
base.extend ClassMethods
|
5
|
+
end
|
6
|
+
|
7
|
+
def read_json_accessors(json)
|
8
|
+
self.class.accessors.each do |field, json_field|
|
9
|
+
instance_variable_set("@#{field}", json[json_field])
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
module ClassMethods
|
14
|
+
def json_accessors(json_accessors)
|
15
|
+
json_accessors.map { |field, _| attr_reader field }
|
16
|
+
|
17
|
+
@_json_accessors = json_accessors
|
18
|
+
end
|
19
|
+
|
20
|
+
def accessors
|
21
|
+
@_json_accessors
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module AppStoreInfo
|
2
|
+
class Regions
|
3
|
+
# All the available regions (taken from https://developer.apple.com/library/ios/documentation/
|
4
|
+
# LanguagesUtilities/Conceptual/iTunesConnect_Guide/Appendices/AppStoreTerritories.html
|
5
|
+
REGIONS = {
|
6
|
+
'AE' => 'United Arab Emirates',
|
7
|
+
'AG' => 'Antigua and Barbuda', 'AI' => 'Anguilla', 'AL' => 'Albania', 'AM' => 'Armenia',
|
8
|
+
'AO' => 'Angola', 'AR' => 'Argentina', 'AT' => 'Austria', 'AU' => 'Australia',
|
9
|
+
'AZ' => 'Azerbaijan', 'BB' => 'Barbados', 'BE' => 'Belgium', 'BF' => 'Burkina Faso',
|
10
|
+
'BG' => 'Bulgaria', 'BH' => 'Bahrain', 'BJ' => 'Benin', 'BM' => 'Bermuda', 'BN' => 'Brunei',
|
11
|
+
'BO' => 'Bolivia', 'BR' => 'Brazil', 'BS' => 'Bahamas', 'BT' => 'Bhutan', 'BW' => 'Botswana',
|
12
|
+
'BY' => 'Belarus', 'BZ' => 'Belize', 'CA' => 'Canada', 'CG' => 'Republic Of Congo',
|
13
|
+
'CH' => 'Switzerland', 'CL' => 'Chile', 'CN' => 'China', 'CO' => 'Colombia',
|
14
|
+
'CR' => 'Costa Rica', 'CV' => 'Cape Verde', 'CY' => 'Cyprus', 'CZ' => 'Czech Republic',
|
15
|
+
'DE' => 'Germany', 'DK' => 'Denmark', 'DM' => 'Dominica', 'DO' => 'Dominican Republic',
|
16
|
+
'DZ' => 'Algeria', 'EC' => 'Ecuador', 'EE' => 'Estonia', 'EG' => 'Egypt',
|
17
|
+
'ES' => 'Spain', 'FI' => 'Finland', 'FJ' => 'Fiji', 'FM' => 'Federated States Of Micronesia',
|
18
|
+
'FR' => 'France', 'GB' => 'United Kingdom', 'GD' => 'Grenada', 'GH' => 'Ghana',
|
19
|
+
'GM' => 'Gambia', 'GR' => 'Greece', 'GT' => 'Guatemala', 'GW' => 'Guinea-Bissau',
|
20
|
+
'GY' => 'Guyana', 'HK' => 'Hong Kong', 'HN' => 'Honduras', 'HR' => 'Croatia',
|
21
|
+
'HU' => 'Hungary', 'ID' => 'Indonesia', 'IE' => 'Ireland', 'IL' => 'Israel', 'IN' => 'India',
|
22
|
+
'IS' => 'Iceland', 'IT' => 'Italy', 'JM' => 'Jamaica', 'JO' => 'Jordan', 'JP' => 'Japan',
|
23
|
+
'KE' => 'Kenya', 'KG' => 'Kyrgyzstan', 'KH' => 'Cambodia', 'KN' => 'St. Kitts and Nevis',
|
24
|
+
'KR' => 'Republic Of Korea', 'KW' => 'Kuwait', 'KY' => 'Cayman Islands',
|
25
|
+
'KZ' => 'Kazakstan', 'LA' => 'Lao People’s Democratic Republic', 'LB' => 'Lebanon',
|
26
|
+
'LC' => 'St. Lucia', 'LK' => 'Sri Lanka', 'LR' => 'Liberia', 'LT' => 'Lithuania',
|
27
|
+
'LU' => 'Luxembourg', 'LV' => 'Latvia', 'MD' => 'Republic Of Moldova', 'MG' => 'Madagascar',
|
28
|
+
'MK' => 'Macedonia', 'ML' => 'Mali', 'MN' => 'Mongolia', 'MO' => 'Macau',
|
29
|
+
'MR' => 'Mauritania', 'MS' => 'Montserrat', 'MT' => 'Malta', 'MU' => 'Mauritius',
|
30
|
+
'MW' => 'Malawi', 'MX' => 'Mexico', 'MY' => 'Malaysia', 'MZ' => 'Mozambique',
|
31
|
+
'NA' => 'Namibia', 'NE' => 'Niger', 'NG' => 'Nigeria', 'NI' => 'Nicaragua',
|
32
|
+
'NL' => 'Netherlands', 'NO' => 'Norway', 'NP' => 'Nepal', 'NZ' => 'New Zealand',
|
33
|
+
'OM' => 'Oman', 'PA' => 'Panama', 'PE' => 'Peru', 'PG' => 'Papua New Guinea',
|
34
|
+
'PH' => 'Philippines', 'PK' => 'Pakistan', 'PL' => 'Poland', 'PT' => 'Portugal',
|
35
|
+
'PW' => 'Palau', 'PY' => 'Paraguay', 'QA' => 'Qatar', 'RO' => 'Romania', 'RU' => 'Russia',
|
36
|
+
'SA' => 'Saudi Arabia', 'SB' => 'Solomon Islands', 'SC' => 'Seychelles', 'SE' => 'Sweden',
|
37
|
+
'SG' => 'Singapore', 'SI' => 'Slovenia', 'SK' => 'Slovakia', 'SL' => 'Sierra Leone',
|
38
|
+
'SN' => 'Senegal', 'SR' => 'Suriname', 'ST' => 'Sao Tome and Principe',
|
39
|
+
'SV' => 'El Salvador', 'SZ' => 'Swaziland', 'TC' => 'Turks and Caicos',
|
40
|
+
'TD' => 'Chad', 'TH' => 'Thailand', 'TJ' => 'Tajikistan', 'TM' => 'Turkmenistan',
|
41
|
+
'TN' => 'Tunisia', 'TR' => 'Turkey', 'TT' => 'Trinidad and Tobago', 'TW' => 'Taiwan',
|
42
|
+
'TZ' => 'Tanzania', 'UA' => 'Ukraine', 'UG' => 'Uganda', 'US' => 'United States',
|
43
|
+
'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VC' => 'St. Vincent and The Grenadines',
|
44
|
+
'VE' => 'Venezuela', 'VG' => 'British Virgin Islands',
|
45
|
+
'VN' => 'Vietnam', 'YE' => 'Yemen', 'ZA' => 'South Africa', 'ZW' => 'Zimbabwe'
|
46
|
+
}.freeze
|
47
|
+
|
48
|
+
def self.find(region)
|
49
|
+
list[region.upcase]
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.list
|
53
|
+
REGIONS
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
metadata
ADDED
@@ -0,0 +1,189 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: app_store_info
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ricardo Otero
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-11-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.9'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.9'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.10'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.10'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.3'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.35'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.35'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop-rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.3'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.3'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.10'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.10'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: vcr
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: webmock
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.22'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.22'
|
139
|
+
description: Get details about any app in the Apple App Store
|
140
|
+
email:
|
141
|
+
- oterosantos@gmail.com
|
142
|
+
executables: []
|
143
|
+
extensions: []
|
144
|
+
extra_rdoc_files: []
|
145
|
+
files:
|
146
|
+
- ".gitignore"
|
147
|
+
- ".rspec"
|
148
|
+
- ".rubocop.yml"
|
149
|
+
- ".ruby-version"
|
150
|
+
- ".travis.yml"
|
151
|
+
- Gemfile
|
152
|
+
- LICENSE.txt
|
153
|
+
- README.md
|
154
|
+
- Rakefile
|
155
|
+
- app_store_info.gemspec
|
156
|
+
- bin/console
|
157
|
+
- bin/setup
|
158
|
+
- lib/app_store_info.rb
|
159
|
+
- lib/app_store_info/api.rb
|
160
|
+
- lib/app_store_info/app.rb
|
161
|
+
- lib/app_store_info/genres.rb
|
162
|
+
- lib/app_store_info/json_accessors.rb
|
163
|
+
- lib/app_store_info/regions.rb
|
164
|
+
- lib/app_store_info/version.rb
|
165
|
+
homepage: https://github.com/rikas/app_store_info
|
166
|
+
licenses:
|
167
|
+
- MIT
|
168
|
+
metadata: {}
|
169
|
+
post_install_message:
|
170
|
+
rdoc_options: []
|
171
|
+
require_paths:
|
172
|
+
- lib
|
173
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
174
|
+
requirements:
|
175
|
+
- - ">="
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '0'
|
178
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
|
+
requirements:
|
180
|
+
- - ">="
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: '0'
|
183
|
+
requirements: []
|
184
|
+
rubyforge_project:
|
185
|
+
rubygems_version: 2.4.5.1
|
186
|
+
signing_key:
|
187
|
+
specification_version: 4
|
188
|
+
summary: App Store parser
|
189
|
+
test_files: []
|