module Spyonweb::API
Public Instance Methods
adsense(query, args = {})
click to toggle source
# File lib/spyonweb/api.rb, line 16 def adsense(query, args = {}) get('adsense', query, args) end
analytics(query, args = {})
click to toggle source
# File lib/spyonweb/api.rb, line 20 def analytics(query, args = {}) get('analytics', query, args) end
dns_domain(query, args = {})
click to toggle source
# File lib/spyonweb/api.rb, line 24 def dns_domain(query, args = {}) get('dns_domain', query, args) end
domain(query)
click to toggle source
# File lib/spyonweb/api.rb, line 8 def domain(query) get('domain', query) end
ip(query, args = {})
click to toggle source
# File lib/spyonweb/api.rb, line 12 def ip(query, args = {}) get('ip', query, args) end
ip_dns(query, args = {})
click to toggle source
# File lib/spyonweb/api.rb, line 28 def ip_dns(query, args = {}) get('ip_dns', query, args) end
summary(query)
click to toggle source
# File lib/spyonweb/api.rb, line 4 def summary(query) get('summary', query) end
Private Instance Methods
get(method, query, args = {})
click to toggle source
# File lib/spyonweb/api.rb, line 34 def get(method, query, args = {}) params = { access_token: Spyonweb.api_token }.merge(args) response = Spyonweb.resource["#{method}/#{CGI.escape(query)}"].get params: params Response.parse(response) end