mozapi 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mozapi.rb +3 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d4ce058cd958d889b5b96fa51ad006db19e9415
4
- data.tar.gz: 2e232bc48c93982e32deb5d608b36e2994107638
3
+ metadata.gz: 148d77bd704d793a716ce47cf340794208251188
4
+ data.tar.gz: f6d3b010ac5a1a1818aab9d33b9178c706c0f5ab
5
5
  SHA512:
6
- metadata.gz: c568585997d517a70e09d602c70c61b22e6a9e626598b68c49859072a5c4cf5e06cf3feb54915a4bbab064d0a8026a8c5d2bafde54f394814d082101d0c0f1ea
7
- data.tar.gz: 22bbbf76e868103045425982b8b639628d8b92ae73d0962fc0b45ff160f085d82a3fa057ba0060fe1880f6eba50eafde359d227901059a37a855c278d6e6fe5e
6
+ metadata.gz: 479c9650261f6623f95b2cbceb12e7055e20227a7f0de162d0ac874bcc52db7432d6b9d2c18b495b8951e5802140dd1a3afa834289de4f498be176af195ba968
7
+ data.tar.gz: 1711fb33c946efe37362f399489b483c76dacd7f4897c25911b0d475d8e94163c42a355568bc9bb01f5fe8d662f1d485632093ec4f5dd06ce9843f4da457e7f6
@@ -51,14 +51,12 @@ class MozAPI
51
51
  DEFAULT_URL_METRICS_COLS = LINKING_ROOT_DOMAINS + 2048 + DOMAIN_AUTHORITY + LINKING_C_BLOCKS
52
52
 
53
53
 
54
- def initialize
55
- @api_id = ENV['MOZ_API_ID']
56
- @api_key = ENV['MOZ_API_KEY']
54
+ def initialize(id, key)
55
+ @api_id = id
56
+ @api_key = key
57
57
  end
58
58
 
59
59
  def links(target_url, options)
60
- sleep(10) # do this to honor the API rate limit
61
-
62
60
  expires = expiration_time
63
61
 
64
62
  options = {
@@ -88,7 +86,6 @@ class MozAPI
88
86
 
89
87
  #
90
88
  def url_metrics(target_url, options = {})
91
- sleep 10
92
89
 
93
90
  expires = expiration_time
94
91
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mozapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Engelhardt