awis-sdk-ruby 1.1.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +0 -1
- data/README.md +89 -33
- data/awis.gemspec +1 -3
- data/lib/awis.rb +9 -9
- data/lib/awis/api.rb +7 -0
- data/lib/awis/models.rb +8 -0
- data/lib/awis/models/url_info.rb +1 -1
- data/lib/awis/utils.rb +3 -2
- data/lib/awis/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5c55c0fb766550990c1a7f6f07a64e68a61dbece692b9b6fa540986c247ee91a
|
4
|
+
data.tar.gz: a6bde3ae5ae8493d6777a32614b004efc7991115e980aa274ddcaf7fd705dd4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 567fbf489d1ff95d74d4f6802c4c35738513aaa63942076f7c420653292445ae2178d331dcef206b5caf9bb960080e91a0701bb9d02d771f2a640d47063f8ff1
|
7
|
+
data.tar.gz: 161b0a7db4c82ee52954319c12693b2e92472ad932e85545c917092e8e29fa75abe32cc9ad9a6f240778d42a8a1b77a42c70cb522b94fd2e2308d91f70799300
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,60 +1,108 @@
|
|
1
1
|
## Amazon - Alexa Web Information Service (AWIS)
|
2
|
-
Ruby Library for AWIS REST API -
|
2
|
+
Ruby Library for AWIS REST API - see: [Alexa Docs](http://docs.amazonwebservices.com/AlexaWebInfoService/latest/)
|
3
3
|
|
4
4
|
### How to installation
|
5
5
|
|
6
|
-
```
|
6
|
+
```ruby
|
7
7
|
gem install awis-sdk-ruby
|
8
8
|
```
|
9
9
|
|
10
|
+
### Support Ruby 2.x
|
11
|
+
|
12
|
+
- The latest update requires Ruby 2.0 or higher
|
13
|
+
|
10
14
|
### How to usage
|
11
15
|
|
12
16
|
##### Configure your amazon certificate
|
13
17
|
|
14
|
-
```
|
18
|
+
```ruby
|
15
19
|
require 'awis'
|
16
20
|
|
17
21
|
AWIS_CONFIG = YAML.load(File.read('awis.yml'))
|
18
22
|
Awis.config do |c|
|
19
|
-
c.access_key_id
|
20
|
-
c.secret_access_key
|
21
|
-
c.debug
|
22
|
-
c.protocol
|
23
|
-
c.timeout
|
24
|
-
c.open_timeout
|
25
|
-
c.logger
|
23
|
+
c.access_key_id = AWIS_CONFIG['access_key_id']
|
24
|
+
c.secret_access_key = AWIS_CONFIG['secret_access_key']
|
25
|
+
c.debug = AWIS_CONFIG['debug']
|
26
|
+
c.protocol = 'https' # Default 'https'
|
27
|
+
c.timeout = 10 # Default 10
|
28
|
+
c.open_timeout = 10 # Default 10
|
29
|
+
c.logger = false # Default nil
|
26
30
|
end
|
27
31
|
```
|
28
32
|
|
29
|
-
##### Get
|
33
|
+
##### Get Url Info
|
30
34
|
|
31
|
-
```
|
35
|
+
```ruby
|
32
36
|
client = Awis::Client.new
|
33
37
|
url_info = client.url_info(url: "site.com")
|
34
38
|
```
|
35
39
|
|
36
40
|
If you looking for the API request URI:
|
37
41
|
|
38
|
-
|
39
|
-
|
42
|
+
```ruby
|
43
|
+
Awis::API::UrlInfo.new.load_request_uri(url: 'site.com')
|
44
|
+
```
|
40
45
|
|
41
|
-
|
46
|
+
returns object that contains attributes:
|
42
47
|
|
43
48
|
* data_url
|
44
49
|
* rank
|
45
50
|
* asin
|
46
51
|
* xml
|
47
52
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
53
|
+
returns object that contains relationships:
|
54
|
+
|
55
|
+
**contact_info**
|
56
|
+
- attrubutes
|
57
|
+
- data_url
|
58
|
+
- owner_name
|
59
|
+
- email
|
60
|
+
- physical_address
|
61
|
+
- company_stock_ticker
|
62
|
+
- phone_numbers
|
63
|
+
|
64
|
+
**content_data**
|
65
|
+
- attrubutes
|
66
|
+
- data_url
|
67
|
+
- site_title
|
68
|
+
- site_description
|
69
|
+
- speed_median_load_time
|
70
|
+
- speed_percentile
|
71
|
+
- adult_content
|
72
|
+
- language_locale
|
73
|
+
- links_in_count
|
74
|
+
- owned_domains
|
75
|
+
|
76
|
+
**usage_statistics**
|
77
|
+
- attrubutes
|
78
|
+
- time_range_months
|
79
|
+
- time_range_days
|
80
|
+
- rank_value
|
81
|
+
- rank_delta
|
82
|
+
- reach_rank_value
|
83
|
+
- reach_rank_delta,
|
84
|
+
- reach_per_million_value
|
85
|
+
- reach_per_million_delta
|
86
|
+
- page_views_per_million_value
|
87
|
+
- page_views_per_million_delta,
|
88
|
+
- page_views_rank_value
|
89
|
+
- page_views_rank_delta
|
90
|
+
- page_views_per_user_value
|
91
|
+
- page_views_per_user_delta
|
92
|
+
- Methods:
|
93
|
+
- range_type
|
94
|
+
- range_count
|
95
|
+
|
96
|
+
**related_links**
|
97
|
+
- attrubutes
|
98
|
+
- data_url
|
99
|
+
- navigable_url
|
100
|
+
- title
|
101
|
+
|
102
|
+
**categories**
|
103
|
+
- attrubutes
|
104
|
+
- title
|
105
|
+
- absolute_path
|
58
106
|
|
59
107
|
New methods:
|
60
108
|
|
@@ -67,14 +115,16 @@ You can specify options:
|
|
67
115
|
|
68
116
|
##### Get Sites Linking In
|
69
117
|
|
70
|
-
```
|
118
|
+
```ruby
|
71
119
|
client = Awis::Client.new
|
72
120
|
sites_linking_in = client.sites_linking_in(url: "site.com")
|
73
121
|
```
|
74
122
|
|
75
123
|
If you looking for the API request URI:
|
76
124
|
|
77
|
-
|
125
|
+
```ruby
|
126
|
+
Awis::API::SitesLinkingIn.new.load_request_uri(url: 'site.com')
|
127
|
+
```
|
78
128
|
|
79
129
|
Returns object that contains relationships:
|
80
130
|
|
@@ -88,14 +138,16 @@ You can specify options:
|
|
88
138
|
|
89
139
|
##### Get Traffic History
|
90
140
|
|
91
|
-
```
|
141
|
+
```ruby
|
92
142
|
client = Awis::Client.new
|
93
143
|
traffic_history = client.traffic_history(url: "site.com")
|
94
144
|
```
|
95
145
|
|
96
146
|
If you looking for the API request URI:
|
97
147
|
|
98
|
-
|
148
|
+
```ruby
|
149
|
+
Awis::API::TrafficHistory.new.load_request_uri(url: 'site.com')
|
150
|
+
```
|
99
151
|
|
100
152
|
Returns object that contains methods:
|
101
153
|
|
@@ -115,14 +167,16 @@ You can specify options:
|
|
115
167
|
|
116
168
|
##### Get Category Listings
|
117
169
|
|
118
|
-
```
|
170
|
+
```ruby
|
119
171
|
client = Awis::Client.new
|
120
172
|
category_listings = client.category_listings(path: "Top/Arts")
|
121
173
|
```
|
122
174
|
|
123
175
|
If you looking for the API request URI:
|
124
176
|
|
125
|
-
|
177
|
+
```ruby
|
178
|
+
Awis::API::CategoryListings.new.load_request_uri(path: "Top/Games/Card_Games")
|
179
|
+
```
|
126
180
|
|
127
181
|
Returns object that contains methods:
|
128
182
|
|
@@ -135,14 +189,16 @@ Returns object that contains relationships:
|
|
135
189
|
|
136
190
|
##### Get Category Browse
|
137
191
|
|
138
|
-
```
|
192
|
+
```ruby
|
139
193
|
client = Awis::Client.new
|
140
194
|
category_browses = client.category_browse(path: "Top/Arts")
|
141
195
|
```
|
142
196
|
|
143
197
|
If you looking for the API request URI:
|
144
198
|
|
145
|
-
|
199
|
+
```ruby
|
200
|
+
Awis::API::CategoryBrowse.new.load_request_uri(path: "Top/Games/Card_Games")
|
201
|
+
```
|
146
202
|
|
147
203
|
Returns object that contains methods:
|
148
204
|
|
data/awis.gemspec
CHANGED
data/lib/awis.rb
CHANGED
@@ -4,15 +4,15 @@ require 'multi_xml'
|
|
4
4
|
require 'nokogiri'
|
5
5
|
require 'aws-sigv4'
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
7
|
+
require_relative './awis/version'
|
8
|
+
require_relative './awis/hash'
|
9
|
+
require_relative './awis/utils'
|
10
|
+
require_relative './awis/exceptions'
|
11
|
+
require_relative './awis/connection'
|
12
|
+
require_relative './awis/config'
|
13
|
+
require_relative './awis/client'
|
14
|
+
require_relative './awis/api'
|
15
|
+
require_relative './awis/models'
|
16
16
|
|
17
17
|
module Awis
|
18
18
|
SERVICE_PATH = 'api'
|
data/lib/awis/api.rb
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative './api/base'
|
4
|
+
require_relative './api/url_info'
|
5
|
+
require_relative './api/traffic_history'
|
6
|
+
require_relative './api/sites_linking_in'
|
7
|
+
require_relative './api/category_listings'
|
8
|
+
require_relative './api/category_browse'
|
9
|
+
|
3
10
|
module Awis
|
4
11
|
module API
|
5
12
|
autoload :Base, 'awis/api/base'
|
data/lib/awis/models.rb
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative './models/base'
|
4
|
+
require_relative './models/base_entity'
|
5
|
+
require_relative './models/url_info'
|
6
|
+
require_relative './models/traffic_history'
|
7
|
+
require_relative './models/sites_linking_in'
|
8
|
+
require_relative './models/category_listings'
|
9
|
+
require_relative './models/category_browse'
|
10
|
+
|
3
11
|
module Awis
|
4
12
|
module Models
|
5
13
|
autoload :Base, 'awis/models/base'
|
data/lib/awis/models/url_info.rb
CHANGED
data/lib/awis/utils.rb
CHANGED
data/lib/awis/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awis-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Encore Shao
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sigv4
|
@@ -168,7 +168,7 @@ files:
|
|
168
168
|
homepage: https://github.com/encoreshao/amazon-awis
|
169
169
|
licenses: []
|
170
170
|
metadata: {}
|
171
|
-
post_install_message:
|
171
|
+
post_install_message:
|
172
172
|
rdoc_options: []
|
173
173
|
require_paths:
|
174
174
|
- lib
|
@@ -183,9 +183,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
183
|
- !ruby/object:Gem::Version
|
184
184
|
version: '0'
|
185
185
|
requirements: []
|
186
|
-
|
187
|
-
|
188
|
-
signing_key:
|
186
|
+
rubygems_version: 3.0.3
|
187
|
+
signing_key:
|
189
188
|
specification_version: 4
|
190
189
|
summary: Ruby - Amazon Alexa Web Information Service Library (AWIS)
|
191
190
|
test_files: []
|