The HT SDK is a TypeScript-based software development kit designed to interface with Hello Tractor's API, allowing developers to build integrations and services around tractor bookings and management. This SDK provides a simple and robust interface for accessing available tractors, fetching tractor details, and more.
- API Integration: Easily interact with Hello Tractor's API to manage tractors.
- TypeScript Support: Strongly typed for safer and more reliable code.
- Flexible Authentication: Initialize the SDK with an API key to authenticate requests.
- Modular Design: Use only the parts of the SDK you need.
You can install it via npm:
npm install hello-tractor-sdk
After installation, you can use the SDK in your project:
import { HTSDK } from "hello-tractor-sdk";
const sdk = HTSDK.init("YOUR-API-KEY");
sdk
.getAvailableTractors()
.then((tractors) => console.log(tractors))
.catch((error) => console.error(error));
If you're using Next.js, you can easily integrate the SDK:
import { useEffect } from "react";
import { HTSDK } from "hello-tractor-sdk";
export default function Home() {
useEffect(() => {
const sdk = HTSDK.init("YOUR-API-KEY");
sdk
.getAvailableTractors()
.then((tractors) => console.log(tractors))
.catch((error) => console.error(error));
}, []);
return <div>Welcome to the Tractor Booking Page</div>;
}
This package is part of the Hello Tractor API ecosystem. For more information, please refer to the official documentation.