Class: Foederati::Provider
- Inherits:
-
Object
- Object
- Foederati::Provider
- Defined in:
- lib/foederati/provider.rb,
lib/foederati/provider/request.rb,
lib/foederati/provider/response.rb
Overview
A Foederati provider is one JSON API provider capable of being searched by the Foederati.
TODO allow specification of a wildcard to search all the provider’s records
Defined Under Namespace
Classes: Fields, Request, Response, Results, Urls
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#urls ⇒ Object
readonly
Returns the value of attribute urls.
Instance Method Summary collapse
-
#initialize(id, &block) ⇒ Provider
constructor
A new instance of Provider.
-
#search(**params) ⇒ Object
TODO sanity check things like presence of API URL.
Constructor Details
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
17 18 19 |
# File 'lib/foederati/provider.rb', line 17 def fields @fields end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
17 18 19 |
# File 'lib/foederati/provider.rb', line 17 def id @id end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
17 18 19 |
# File 'lib/foederati/provider.rb', line 17 def results @results end |
#urls ⇒ Object (readonly)
Returns the value of attribute urls.
17 18 19 |
# File 'lib/foederati/provider.rb', line 17 def urls @urls end |
Instance Method Details
#search(**params) ⇒ Object
TODO sanity check things like presence of API URL
31 32 33 |
# File 'lib/foederati/provider.rb', line 31 def search(**params) request.execute(params).normalise end |