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.
- checksums.yaml +4 -4
- data/lib/mozapi.rb +3 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 148d77bd704d793a716ce47cf340794208251188
|
|
4
|
+
data.tar.gz: f6d3b010ac5a1a1818aab9d33b9178c706c0f5ab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 479c9650261f6623f95b2cbceb12e7055e20227a7f0de162d0ac874bcc52db7432d6b9d2c18b495b8951e5802140dd1a3afa834289de4f498be176af195ba968
|
|
7
|
+
data.tar.gz: 1711fb33c946efe37362f399489b483c76dacd7f4897c25911b0d475d8e94163c42a355568bc9bb01f5fe8d662f1d485632093ec4f5dd06ce9843f4da457e7f6
|
data/lib/mozapi.rb
CHANGED
|
@@ -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 =
|
|
56
|
-
@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
|
|