class Genius::WebPage
Attributes
annotation_count[R]
domain[R]
id[R]
normalized_url[R]
title[R]
url[R]
Public Class Methods
find(*)
click to toggle source
# File lib/genius/web_page.rb, line 17 def self.find(*) raise NotImplementedError, "A Web Page cannot be loaded by its ID in the public API" end
lookup(params = {})
click to toggle source
# File lib/genius/web_page.rb, line 25 def self.lookup(params = {}) headers = default_headers.merge(params.delete(:headers) || {}) params = default_params.merge(params) new(http_get("/#{resource_name}s/lookup", query: params, headers: headers), text_format: params[:text_format]) end
Public Instance Methods
parse_resource!()
click to toggle source
# File lib/genius/web_page.rb, line 7 def parse_resource! @id = resource["id"] @url = resource["url"] @title = resource["title"] @normalized_url = resource["normalized_url"] @domain = resource["domain"] @share_url = resource["share_url"] @annotation_count = resource["annotation_count"] end
reload()
click to toggle source
# File lib/genius/web_page.rb, line 21 def reload raise NotReloadableError, "A Web Page cannot be reloaded" end