Project

plants

0.0
No release in over a year
Gem to interact with Trefle API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 5
 Project Readme

Plants

Gem to interact with the trefle API.

Install

spec.add_dependency 'plants', '~> 0'

Usage

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 here

Endpoints

All 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

Corrections

# List
Plants.list_corrections

# Find 
Plants.find_correction('correction')

Distributions

# List
Plants.list_distributions

# Find 
Plants.find_distribution('correction')

Division Classes

# List
Plants.list_division_classes

# Find 
Plants.find_division_class('class')

Division Orders

# List
Plants.list_division_orders

# Find 
Plants.find_division_order('order')

Divisions

# List
Plants.list_divisions

# Find 
Plants.find_division('division')

Families

# List
Plants.list_families

# Find 
Plants.find_family('family')

Genus

# List
Plants.list_genera

# Find 
Plants.find_genus('genus')

Kingdoms

# List
Plants.list_kingdoms

# Find 
Plants.find_kingdom('kingodm')

Plants

# 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')

Species

# List
Plants.list_species

# Find 
Plants.find_species('species')

# Search
Plants.search_for_species('species')

Subkingdoms

# List
Plants.list_subkingdoms

# Find 
Plants.find_subkingdom('subkingdom')