Class: Taxa::OpenTreeOfLife::Client
- Inherits:
-
Object
- Object
- Taxa::OpenTreeOfLife::Client
- Defined in:
- lib/taxa/open_tree_of_life/client.rb
Overview
API client for Open Tree of Life
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#studies ⇒ Object
readonly
Returns the value of attribute studies.
-
#taxonomy ⇒ Object
readonly
Returns the value of attribute taxonomy.
-
#tnrs ⇒ Object
readonly
Returns the value of attribute tnrs.
-
#tree_of_life ⇒ Object
readonly
Returns the value of attribute tree_of_life.
Instance Method Summary collapse
-
#initialize(**options) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(**options) ⇒ Client
Returns a new instance of Client.
15 16 17 18 19 20 21 22 23 |
# File 'lib/taxa/open_tree_of_life/client.rb', line 15 def initialize(**) = http_client = [:http_client] || Faraday.new @tnrs = TNRS.new(http_client) @tree_of_life = TreeOfLife.new(http_client) @taxonomy = Taxonomy.new(http_client) @studies = Studies.new(http_client) end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
12 13 14 |
# File 'lib/taxa/open_tree_of_life/client.rb', line 12 def end |
#studies ⇒ Object (readonly)
Returns the value of attribute studies.
13 14 15 |
# File 'lib/taxa/open_tree_of_life/client.rb', line 13 def studies @studies end |
#taxonomy ⇒ Object (readonly)
Returns the value of attribute taxonomy.
13 14 15 |
# File 'lib/taxa/open_tree_of_life/client.rb', line 13 def taxonomy @taxonomy end |
#tnrs ⇒ Object (readonly)
Returns the value of attribute tnrs.
13 14 15 |
# File 'lib/taxa/open_tree_of_life/client.rb', line 13 def tnrs @tnrs end |
#tree_of_life ⇒ Object (readonly)
Returns the value of attribute tree_of_life.
13 14 15 |
# File 'lib/taxa/open_tree_of_life/client.rb', line 13 def tree_of_life @tree_of_life end |