Module: Taxa::OpenTreeOfLife::Studies::Tree

Included in:
Taxa::OpenTreeOfLife::Studies
Defined in:
lib/taxa/open_tree_of_life/studies/tree.rb

Overview

wrapper around the node_info tree of life endpoint for Open Tree of Life

Instance Method Summary collapse

Instance Method Details

#tree(study_id, tree_id) ⇒ Object



10
11
12
13
14
# File 'lib/taxa/open_tree_of_life/studies/tree.rb', line 10

def tree(study_id, tree_id)
  url = "https://api.opentreeoflife.org/v3/study/#{study_id}/tree/#{tree_id}"
  response = @http_client.get(url, nil, 'Content-Type' => 'application/json')
  JSON.parse(response.body)
end