Skip to content

Commit

Permalink
updating readme
Browse files Browse the repository at this point in the history
  • Loading branch information
one-m1nd committed Feb 28, 2024
1 parent eff3daf commit 35061b5
Showing 1 changed file with 113 additions and 2 deletions.
115 changes: 113 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,124 @@
# Plants

Gem to interact with the [trefle](https://docs.trefle.io/reference) API.


## Install
`spec.add_dependency 'plants', ~> 0`

## Usage
You need an authorization token, [see this](https://docs.trefle.io/docs/guides/getting-started).
```ruby
Plants.token = 'your token here'
Plants.list_plants # ...
```

### Endpoints
#### Corrections
```ruby
# List
Plants.list_corrections

# Find
Plants.find_correction('correction')
```

#### Distributions
```ruby
# List
Plants.list_distributions

# Find
Plants.find_distribution('correction')
```

#### Division Classes
```ruby
# List
Plants.list_division_classes

# Find
Plants.find_division_class('class')
```

#### Division Orders
```ruby
# List
Plants.list_division_orders

# Find
Plants.find_division_order('order')
```

#### Divisions
```ruby
# List
Plants.list_divisions

# Find
Plants.find_division('division')
```

#### Families
```ruby
# List
Plants.list_families

# Find
Plants.find_family('family')
```

#### Genus
```ruby
# List
Plants.list_genera

# Find
Plants.find_genus('genus')
```

#### Kingdoms
```ruby
# List
Plants.list_kingdoms

# Find
Plants.find_kingdom('kingodm')
```

#### Plants
```ruby
# 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
```ruby
# List
Plants.list_species

# Find
Plants.find_species('species')

# Search
Plants.search_for_species('species')
```

#### Subkingdoms
```ruby
# List
Plants.list_subkingdoms

# Find
Plants.find_subkingdom('subkingdom')
```

0 comments on commit 35061b5

Please sign in to comment.