Class: Taxa::OpenTreeOfLife::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/taxa/open_tree_of_life/client.rb

Overview

API client for Open Tree of Life

Instance Attribute Summary collapse

Instance Method Summary collapse

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(**options)
  @options = options

  http_client = options[: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

#optionsObject

Returns the value of attribute options.



12
13
14
# File 'lib/taxa/open_tree_of_life/client.rb', line 12

def options
  @options
end

#studiesObject (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

#taxonomyObject (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

#tnrsObject (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_lifeObject (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