1.5.0 • Published 4 months ago

@siamf/teamdesk v1.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

@siamf/teamdesk

A Node.js TeamDesk API client for placing API requests directly to TeamDesk from Node.js. It supports almost all teamdesk api method and query params

  • Small Size
  • All Available Teamdesk Method
  • Place request or create URI
  • Edge runtime support

Installation

$ npm i @siamf/teamdesk
import { initTeamdesk } from "@siamf/teamdesk";

type Table = "Table 1" | "Table 2";

const teamdesk = initTeamdesk<Table>({
    baseUrl: "https://teamdesk.net/secure/api/v2", //Teamdesk Base URL
    databaseNo: 96301, //Teamdesk Database Number
    token: "teamdesk api token", //Teamdesk API token
});

interface Generated {
    id?: string;
    name?: string;
    description?: string;
    culture?: string;
    timeZone?: string;
    logo?: number;
}

//Generate URL
const url = teamdesk.describeTable.uri({
    table: "Table 1"
})
console.log(url);

//Place API Request
const { data, error } = await teamdesk.describeTable.request<Generated>({
    table: "Table 2"
});

console.log(data);
console.log(error);

Documentations

Please see the teamdesk API docs for details use.

Stay in touch

1.5.0

4 months ago

1.2.8

4 months ago

1.2.7

4 months ago

1.2.6

4 months ago

1.2.5

5 months ago

1.2.3

5 months ago

1.2.1

6 months ago

1.2.0

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago