Getting Started
Prerequisites
In order to work with the library and the Mezon API in general, you must first create a Mezon Bot account.
To use the mezon-sdk, you'll need the following installed on your system:
- Node.js: (Version 18.x or higher recommended)
- npm (Node Package Manager, typically comes with Node.js) or Yarn
- TypeScript: (Version 4.x or higher recommended, if you are working with the SDK's source or want full type support in your project)
Installation
-
Clone the repository (if you need to build from source): If you are contributing or need the latest unreleased changes:
git clone <your-fork-url-or-original-repo-url>/mezon-js.git
cd mezon-js/packages/mezon-sdkFor using as a package, you would typically install it via npm after it's published:
npm install mezon-sdk
# or
yarn add mezon-sdk -
Install dependencies (if building from source): Navigate to the
mezon-sdkdirectory:cd path/to/mezon-sdkInstall the dependencies:
npm install
# or
yarn install -
Build the SDK (if building from source): The
package.jsonspecifies build scripts. Typically:npm run build
# or
yarn buildThis will compile the TypeScript code into JavaScript, usually in a
distdirectory, as configured intsconfig.jsonandtsconfig.esm.json.
Installation instructions will depend on the target environment (e.g., npm for Node.js, CDN for browser). Please refer to the specific installation guide for your platform.