Skip to content

firesquadio/nodejs-api-sdk

Repository files navigation

@firesquad/api-sdk

Properly integrate your Nodejs apps with firesquad usign this SDK.

Firesquad

Quick Start

For getting started, Create an API Integration on Firesquad. After that, you can use this firesquad package:

import { Firesquad, ConversationContentMessageType } from "@firesquad/api-sdk";

export const fs = new Firesquad(
  "https://<your-account>.api.firesquad.io",
  "<your-api-id>",
  "<your-api-key>"
);

/* You can use firesquad methods after creating the instance, such as: */
fs.PostConversationItem(
  {
    internal: false,
    content: {
      message: [
        {
          type: ConversationContentMessageType.Paragraph,
          children: [{ text: "Hello, World!" }],
        },
      ],
    },
  },
  "<your-conversation-id>"
)
  /* And wait for the response */
  .then((response) => console.log(response));