1.0.8 • Published 11 months ago

hello-tractor-sdk v1.0.8

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
11 months ago

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.

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago