Class: RavenTools::Address

Inherits:
Client
  • Object
show all
Defined in:
lib/rb_raventools/address.rb

Instance Attribute Summary

Attributes inherited from Client

#api_key

Class Method Summary collapse

Methods inherited from Client

#domain_info, #domains, #engines, #initialize, #keyword_info, #keywords, #keywords_with_tags, #profile_info, #tag_info, #tags

Constructor Details

This class inherits a constructor from RavenTools::Client

Class Method Details

.build(method, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rb_raventools/address.rb', line 4

def self.build(method, options = {})
  url = "#{RavenTools::API_BASE_URL}key=#{@@api_key}&format=#{@@format}&method=#{method}"
  unless options[:domain] == nil
    url << "&domain=#{options[:domain]}"
  end
  unless options[:start_date] == nil
    url << "&start_date=#{options[:start_date]}"
  end
  unless options[:end_date] == nil
    url << "&end_date=#{options[:end_date]}"
  end
  unless options[:engine] == nil
    url << "&engine=#{options[:engine]}"
  end
  return url
end