Class: Factual::Crossref
- Inherits:
-
Object
- Object
- Factual::Crossref
- Defined in:
- lib/factual/crossref.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize(client) ⇒ Crossref
constructor
A new instance of Crossref.
-
#search_by_factual_id(factual_id, optional = {}) ⇒ Object
optional parameters include: limit: default is 500, must use OAuth to exceed.
-
#search_by_url(url, optional = {}) ⇒ Object
optional parameters include: limit: default is 500, must use OAuth to exceed.
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
#client ⇒ Object
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 = {}) = {:factual_id => factual_id} process(, 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 = {}) = {:url => url} process(, optional) end |