Class: Factual::Crossref

Inherits:
Object
  • Object
show all
Defined in:
lib/factual/crossref.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Crossref

Returns a new instance of Crossref.



6
7
8
# File 'lib/factual/crossref.rb', line 6

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



4
5
6
# File 'lib/factual/crossref.rb', line 4

def client
  @client
end

Instance Method Details

#search_by_factual_id(factual_id, optional = {}) ⇒ Object

optional parameters include:

limit: default is 500, must use OAuth to exceed


12
13
14
15
# File 'lib/factual/crossref.rb', line 12

def search_by_factual_id(factual_id, optional = {})
  options = {:factual_id => factual_id}
  process(options, optional)
end

#search_by_url(url, optional = {}) ⇒ Object

optional parameters include:

limit: default is 500, must use OAuth to exceed


19
20
21
22
# File 'lib/factual/crossref.rb', line 19

def search_by_url(url, optional = {})
  options = {:url => url}
  process(options, optional)
end