linkscape 0.2.6 → 0.2.7

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.
@@ -1,6 +1,6 @@
1
1
  = Linkscape Gem
2
2
 
3
- This is the official Gem to interact with the SEOmoz API. For more information, please check out the {API page on SEOmoz}[http://www.seomoz.org/api] and the {SEOmoz API Wiki}[http://apiwiki.seomoz.org]
3
+ This is the official Gem to interact with the SEOmoz API. For more information, please check out the {API page on SEOmoz}[http://www.seomoz.org/api] and the {SEOmoz API Wiki}[http://apiwiki.seomoz.org]. Note: this gem is currently an alpha release, and is not intended for production use...yet.
4
4
 
5
5
  == Usage
6
6
 
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ begin
8
8
  gem.summary = %Q{Provides an interface to the SEOmoz API}
9
9
  gem.description = %Q{Provides an interface to SEOmoz's suite of APIs, including the free and site intelligence APIs.}
10
10
  gem.email = %q{api@seomoz.org}
11
- gem.homepage = "http://www.seomoz.org/api"
11
+ gem.homepage = "http://github.com/seomoz/linkscape-gem"
12
12
  gem.authors = ["Marty Smyth", "Jeff Pollard"]
13
13
  gem.add_dependency "ruby-hmac", ">= 0"
14
14
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.6
1
+ 0.2.7
@@ -134,6 +134,12 @@ module Linkscape
134
134
  Linkscape::Request.run(@options.merge(options))
135
135
  end
136
136
 
137
+ def status(*args)
138
+ options = Hash === args.last ? args.pop.symbolize_keys : {}
139
+ options[:api] = 'status'
140
+ Linkscape::Request.run(@options.merge(options))
141
+ end
142
+
137
143
 
138
144
  def anchorMetrics(*args)
139
145
  options = Hash === args.last ? args.pop.symbolize_keys : {}
@@ -16,17 +16,20 @@ module Linkscape
16
16
  end
17
17
 
18
18
  def initialize(options)
19
-
20
- case options[:url]
21
- when String
22
- new_vals = {:url => CGI::escape(options[:url].sub(/^https?:\/\//, '')) }
23
- when Array
24
- @body = options[:url].collect{ |u| u.sub(/^https?:\/\//, '') }
25
- new_vals = {:url => ""}
26
- else
27
- raise "URL most be a String or an Array"
19
+
20
+ new_vals = {}
21
+ if options[:url]
22
+ case options[:url]
23
+ when String
24
+ new_vals = {:url => CGI::escape(options[:url].sub(/^https?:\/\//, '')) }
25
+ when Array
26
+ @body = options[:url].collect{ |u| u.sub(/^https?:\/\//, '') }
27
+ new_vals = {:url => ""}
28
+ else
29
+ raise "URL most be a String or an Array"
30
+ end
28
31
  end
29
-
32
+
30
33
  @requestURL = URL_TEMPLATE.template(signRequest(options.merge(new_vals)))
31
34
  @requestURL += "&" + options[:query].collect{|k,v| "#{CGI::escape(k.to_s)}=#{CGI::escape(v.to_s)}"}.join('&') if options[:query] && Hash === options[:query]
32
35
  @requestURL += "&" + options[:query] if options[:query] && String === options[:query]
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{linkscape}
8
- s.version = "0.2.6"
8
+ s.version = "0.2.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Marty Smyth", "Jeff Pollard"]
12
- s.date = %q{2010-05-05}
12
+ s.date = %q{2010-08-31}
13
13
  s.description = %q{Provides an interface to SEOmoz's suite of APIs, including the free and site intelligence APIs.}
14
14
  s.email = %q{api@seomoz.org}
15
15
  s.extra_rdoc_files = [
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
38
38
  "rails/init.rb",
39
39
  "test.rb"
40
40
  ]
41
- s.homepage = %q{http://www.seomoz.org/api}
41
+ s.homepage = %q{http://github.com/seomoz/linkscape-gem}
42
42
  s.rdoc_options = ["--charset=UTF-8"]
43
43
  s.require_paths = ["lib"]
44
44
  s.rubygems_version = %q{1.3.6}
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 6
9
- version: 0.2.6
8
+ - 7
9
+ version: 0.2.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Marty Smyth
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-05-05 00:00:00 -07:00
18
+ date: 2010-08-31 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -61,7 +61,7 @@ files:
61
61
  - rails/init.rb
62
62
  - test.rb
63
63
  has_rdoc: true
64
- homepage: http://www.seomoz.org/api
64
+ homepage: http://github.com/seomoz/linkscape-gem
65
65
  licenses: []
66
66
 
67
67
  post_install_message: