perenual
v1.0.2
Published
The `Perenual SDK` is a fully typed Node.js client designed to seamlessly integrate with the Perenual APIs, providing structured and easy-to-use methods for retrieving plant-related data. Whether you're building a gardening app, a plant care guide, or an
Readme
Perenual SDK
The Perenual SDK is a fully typed Node.js client designed to seamlessly integrate with the Perenual APIs, providing structured and easy-to-use methods for retrieving plant-related data. Whether you're building a gardening app, a plant care guide, or an agriculture-related tool, this SDK simplifies API interactions and ensures type safety for robust development.
Features
🔹 Fully Typed – Built with TypeScript for enhanced developer experience and type safety. 🌱 Comprehensive Plant Data – Fetch details on thousands of plant species. 🦠 Disease Identification – Access categorized plant disease data. 📖 Guides & Hardiness Info – Get expert recommendations on plant care and climate adaptability. ⚡ Simple & Efficient – Easy initialization and usage with minimal setup.
Installation
To install the SDK, use npm or yarn:
npm install perenualor
yarn install perenualInitialization
First, you need to initialize the PerenualClient with your API key and version:
import Perenual from 'perenual';
const PerenualClient = new Perenual({
key: "you-api-key",
});Functions
Here is a list of the functions available in the Perenual SDK, along with usage examples
| Property | Definition |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| PerenualClient.Species.List() | Plant List API provides a comprehensive list of plants with essential details. |
| PerenualClient.Species.Details() | Plant Details API provides in-depth information about a specific plant. |
| PerenualClient.Plant.DiseaseList() | The Plant Disease List API provides a categorized list of plant diseases. |
| PerenualClient.Plant.Guides() | The Plant Guides API provides useful guidance on plant care. |
| PerenualClient.Plant.Hardiness() | The Plant Hardiness API provides data on a plant’s ability to withstand different climate conditions. |
Usage
Here is a list of the functions available in the PerenualClient SDK, along with usage examples
await PerenualClient.Species.List({
page: "1",
order: "asc",
})