0.13.0 • Published 9 months ago

@sama-communications/sdk v0.13.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

SAMA SDK

A SDK client for interacting with the SAMA chat server from Web/Node.js apps

Demo

This is a demo app to test all these methods https://app.samacloud.io/demo

API documentation

See all available methods api/api.ts

Installation

npm install @sama-communications/sdk

Usage

import { SAMAClient } from "@sama-communications/sdk";

const config = {
  endpoint: {
    ws: "wss://your-websocket-url"
    http: "https://your-websocket-url.com"
  }
}

const client = new SAMAClient(config);

client
  .connect()
  .then(() => {
    console.log("Connected to the server");
  })
  .catch((error) => {
    console.error("Failed to connect to the server:", error);
  });

client
  .userLogin({ login: "user_login", password: "user_password" })
  .then((response) => {
    console.log("User logged in:", response);
  })
  .catch((error) => {
    console.error("Failed to log in:", error);
  });

  ...

Have an issue?

Join our Discord for quick answers to your questions or write your question in the issues tab

Community and support

Join our community for support and discussions:

License

Apache 2.0

Changelog

CHANGELOG

0.13.0

9 months ago

0.12.1

11 months ago

0.12.0

11 months ago

0.11.0

11 months ago

0.10.0

11 months ago