Gem to interact with the trefle API.
spec.add_dependency 'plants', '~> 0'
You need an authorization token, see this.
Plants.token = 'your token here'
Plants.list_plants # ... If you wish to override the log:
Plants::Log.instance = logger # Your logger hereAll methods return an instance of HTTP::Response
The HTTP timeout is by default 10 seconds, you can override this by:
Plants.timeout = 5 # new value here# List
Plants.list_corrections
# Find
Plants.find_correction('correction')# List
Plants.list_distributions
# Find
Plants.find_distribution('correction')# List
Plants.list_division_classes
# Find
Plants.find_division_class('class')# List
Plants.list_division_orders
# Find
Plants.find_division_order('order')# List
Plants.list_divisions
# Find
Plants.find_division('division')# List
Plants.list_families
# Find
Plants.find_family('family')# List
Plants.list_genera
# Find
Plants.find_genus('genus')# List
Plants.list_kingdoms
# Find
Plants.find_kingdom('kingodm')# List
Plants.list_plants
# Find
Plants.find_plant('plant')
# Search
Plants.search_for_plant('plant')
# List for Genus
Plants.list_plants_for_genus('genus')
# List for Distribution Zone
Plants.list_plants_for_distribution_zone('zone')# List
Plants.list_species
# Find
Plants.find_species('species')
# Search
Plants.search_for_species('species')# List
Plants.list_subkingdoms
# Find
Plants.find_subkingdom('subkingdom')