@fs-open-source/amity-nodejs-sdk
v1.0.8
Published
Wrapper for Amity API as a NodeJS SDK
Downloads
4
Readme
NODEJS SDK for AMITY SOCIAL API
Welcome to the unofficial NODEJS SDK repository! This SDK is designed to simplify the integration and interaction with the AMITY SOCIAL REST API. It provides an easy-to-use set of functions and classes that abstract away the complexities of making API requests, handling responses, and managing authentication.
Table of Contents
Supported APIs
Below is a table with a key of the supported API functions covered in this SDK and the key that matches it. |Functions |Supported | | :--- | :---: | |Authentication|Full| |Follow|Partial| |Community|Partial| |UsersV3|Partial| |Sessions|Full|
Updated info on what APIs we currently support will be available in our latest releases
Installation
To get started with the AMITY SOCIAL SDK, you can simply install it using npm (https://en.wikipedia.org/wiki/Npm). Here's how you can do it using [example package manager]:
npm install @fs-open-source/amity-nodejs-sdk
Or if you're using yarn:
yarn add @fs-open-source/amity-nodejs-sdk
Usage
Using the AMITY SOCIAL SDK in your project is straightforward. First, import the SDK into your code:
const { AmityClient } = requir('@fs-open-source/amity-nodejs-sdk');
Authentication
Before you start making API requests, you'll need to set up authentication. The AMITY SOCIAL SDK supports various authentication methods, including API keys and OAuth tokens. The following list of environment variables need to be set for access to APIs requiring secure tokens.
X_SERVER_KEY
AMITY_BEARER_TOKEN
AMITY_API_KEY
Please refer to our official documentation for Amity (https://api-docs.amity.co/) more information on authentication methods and how to set them up.
Examples
Creating user token for authentication
// Creating user info
const userId = '123456';
const resource = await AmityClient.Authentication.getAuthenticationToken(userId);
console.log('Resource:', resource);
Contributing
We welcome contributions from the community! If you'd like to contribute to the AMITY SOCIAL SDK, please follow these steps:
- Fork the repository and create a new branch.
- Make your changes, add new features, or fix issues.
- Write tests to cover your changes if applicable.
- Submit a pull request explaining your changes and their benefits.
License
This SDK is released under the [Your License Name] License. See LICENSE for more details.
If you have any questions, feel free to contact us at through email here or visit our website https://farosoft.io. We're here to help!