0.3.0 ā€¢ Published 1 year ago

@freshworks/api-sdk v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Freshworks API SDK

Node.js SDK for working with Freshworks HTTP APIs. Currently supports Freshteam and partially supports Freshservice.

Installation

npm install --save @freshworks/api-sdk

Supported product APIs

ProductStatus
Freshteamāœ…
FreshservicešŸ

šŸ - Partially supported services

Get started

This section depicts example of using different API capabilities offered with examples

Freshteam

This section depicts example of interacting with Freshteam API

const { Freshteam } = require("@freshworks/api-sdk");

const ft = new Freshteam(domain, apiKey);

Call a method, e.g., list all employees (who match a search criteria):

const res = await ft.employees.list({ first_name: "Arthur", last_name: "Dent" });
// Access the response body as an Array of `Employee` objects
const employees = res.json();

Freshservice

This section depicts example of interacting with Freshservice API

const { Freshservice } = require("@freshworks/api-sdk");

const fs = new Freshservice(domain, apiKey);

Call a method, e.g., fetch a Freshservice Ticket

// Get a tick with given ticket ID
const res = await fs.tickets.get(14000239432);
// Access the response body as a `Ticket` object
const ticket = res.json();

Documentation


License

MIT