hello-tractor-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

HT SDK

npm version

Overview

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.

Features

  • 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.

Getting Started

Installation

You can install it via npm:

npm install hello-tractor-sdk

Usage

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));

Sample Integration with Next.js

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>;
}

Documentation

This package is part of the Hello Tractor API ecosystem. For more information, please refer to the official documentation.

/hello-tractor-sdk/

    Package Sidebar

    Install

    npm i hello-tractor-sdk

    Weekly Downloads

    1

    Version

    1.0.8

    License

    UNLICENSED

    Unpacked Size

    23.1 kB

    Total Files

    46

    Last publish

    Collaborators

    • ht-developers