Module: Sistrix::Base
- Included in:
- Credits, Domain, Domain::Age, Domain::Competitors::Sem, Domain::Competitors::Seo, Domain::Competitors::Us, Domain::Kwcount::Sem, Domain::Kwcount::Seo, Domain::Overview, Domain::Pagerank, Domain::Pages, Domain::Sichtbarkeitsindex, Domain::Social::Latest, Domain::Social::Overview, Domain::Social::Top, Domain::Social::Url, Keyword, Keyword::Domain::Sem, Keyword::Domain::Seo, Keyword::Domain::Us, Keyword::Sem, Keyword::Seo, Keyword::Us, Links::Linktargets, Links::Linktexts, Links::List, Links::Overview, Monitoring::Folders, Monitoring::Projects, Monitoring::Report, Monitoring::Report::Download, Monitoring::Reports
- Defined in:
- lib/sistrix/base.rb
Instance Method Summary collapse
Instance Method Details
#base_uri ⇒ Object
19 20 21 |
# File 'lib/sistrix/base.rb', line 19 def base_uri 'http://' + ::Sistrix::SERVICE_HOST + '/' + method_name end |
#fetch(options = {}) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/sistrix/base.rb', line 6 def fetch( = {}) @options.merge!() response = RestClient.get(base_uri, { :params => @options }) Nokogiri::XML(response.to_s) end |
#method_name ⇒ Object
13 14 15 16 17 |
# File 'lib/sistrix/base.rb', line 13 def method_name # derive the method name from the class name # self.class.to_s.downcase.sub(/^.+?::/, '').gsub(/::/, '.') end |