mozapi 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mozapi.rb +17 -5
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 333307f3af04d893b90adb51f2bd432845f6431b
4
- data.tar.gz: e6b8f99c9288b3cfdfbc77d48594e949f12a00fb
3
+ metadata.gz: af97d62322b00f22302b845b62a62b75d69de204
4
+ data.tar.gz: 91481d6cb26980676e656db11afb244a6e624d0b
5
5
  SHA512:
6
- metadata.gz: 3643a3bbbf1576cf90301403a5d873da081d89fe5eff083eef5aea86b666c2ce78f35759299c43eca33c39a791e8502c6a00a571a10ed47de0be4328101f7f4b
7
- data.tar.gz: a7aeb87c8f2547b6dd68a2ba644903dcd9c285ec1db366ec1d91047975537a20ef3e416a11fcf88bee1fcfbde0abf171a8b08ae80c8b84b620a4a571b95c7bdc
6
+ metadata.gz: 50afacdf0c475f370225b9e914fcc1e1f2f94cc4bfc3724696b203ff5d63710cc89e6ad912cb15ae968f08de97d96c56036d320987593f7d17602675f11a7361
7
+ data.tar.gz: 14c3562499d636c808f1bc0cc677e8032877894dfead95ef12f91170b72d3ebf0d026cd157cb7e9fc40d0c94c273720eb949e3e5a84ef30a1b29a72def2d692d
@@ -21,18 +21,30 @@ class MozAPI
21
21
 
22
22
  LIMIT = 100
23
23
 
24
+ # defined
25
+
26
+
24
27
  URL = 4
25
28
  ROOT_DOMAIN = 16
29
+ # uipl - not in the free version
30
+ LINKING_ROOT_DOMAINS = 1024
31
+ # uid
32
+ LINKS = 2048
33
+ # upa
34
+ PAGE_AUTHORITY = 34359738368
35
+ # pda
26
36
  DOMAIN_AUTHORITY = 68719476736
37
+ # pib
38
+ LINKING_C_BLOCKS = 36028797018963968
27
39
 
28
40
  # URL + root_domain + page_authority + domain_authority
29
- DEFAULT_SOURCE_COLS = URL + ROOT_DOMAIN + 34359738368 + DOMAIN_AUTHORITY
41
+ DEFAULT_SOURCE_COLS = URL + ROOT_DOMAIN + PAGE_AUTHORITY + DOMAIN_AUTHORITY
30
42
  # URL + root_domain
31
43
  DEFAULT_TARGET_COLS = URL + ROOT_DOMAIN
32
44
  # anchor_text
33
45
  DEFAULT_LINK_COLS = URL
34
- # linking root domains + links
35
- DEFAULT_URL_METRICS_COLS = 1024 + 2048 + DOMAIN_AUTHORITY
46
+ # linking root domains + links + DA
47
+ DEFAULT_URL_METRICS_COLS = LINKING_ROOT_DOMAINS + 2048 + DOMAIN_AUTHORITY + LINKING_C_BLOCKS
36
48
 
37
49
 
38
50
  def initialize
@@ -71,7 +83,7 @@ class MozAPI
71
83
  end
72
84
 
73
85
  #
74
- def url_metrics(url, options = {})
86
+ def url_metrics(target_url, options = {})
75
87
  sleep 10
76
88
 
77
89
  expires = expiration_time
@@ -84,7 +96,7 @@ class MozAPI
84
96
  }.merge(options)
85
97
 
86
98
  #puts "[MozAPI#links] options: #{options[:Offset]}"
87
- req_url = "http://lsapi.seomoz.com/linkscape/url_metrics/#{URI::encode(target_url)}?#{options.to_query}"
99
+ req_url = "http://lsapi.seomoz.com/linkscape/url-metrics/#{URI::encode(target_url)}?#{options.to_query}"
88
100
 
89
101
  response = HTTParty.get(req_url, :headers => {"User-Agent" => 'node-linkscape (https://github.com/mjp/node-linkscape)'})
90
102
 
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.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Engelhardt
@@ -14,16 +14,16 @@ dependencies:
14
14
  name: httparty
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 0.13.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 0.13.1
27
27
  description: MozAPI is a light-weight wrapper for the MozscapeAPI (http://moz.com/products/api).
28
28
  It currently supports parts of the 'links' endpoint
29
29
  email: christoph@it-engelhardt.de