UNPKG

verdantly

Version:

Node.js client for accessing plant species and variety data from the Verdantly API

70 lines (43 loc) 1.33 kB
# Verdantly Node.js Client The official Node.js client for accessing plant variety and species data from the Verdantly API. --- ## Installation ```bash npm install verdantly ``` --- ## Getting Started You'll need a valid API key from [RapidAPI](https://rapidapi.com/verdantly-team-verdantly-team-default/api/verdantly-gardening-api). ```ts import { VerdantlyClient } from 'verdantly'; const client = new VerdantlyClient({ apiKey: 'your-api-key' }); ``` --- ## Example Usage ```ts const results = await client.searchPlantVarietiesByFilter({ category: "fruit", waterRequirement: "low" }); for (const plant of results.data) { console.log(plant.name); } ``` More examples available in [`examples/starter`](./examples/starter). --- ## Supported Endpoints - `searchPlantVarietiesByName(query: string, page?: number)` - `searchPlantVarietiesByFilter(filters: object, page?: number)` - `searchPlantSpeciesByName(query: string, page?: number)` - `searchPlantSpeciesByFilter(filters: object, page?: number)` --- ## TypeScript Support All client responses are fully typed, with built-in TypeScript definitions included in the package. --- ## Project Structure - `src/` client source code - `examples/starter/` starter project - `dist/` compiled output (after build) --- ## License MIT © Verdantly