Getting Started
Learn how to install and set up the Unchange SDK
Installation
Install the Unchange SDK using your preferred package manager:
npm install unchange-sdkpnpm add unchange-sdkyarn add unchange-sdkbun add unchange-sdkQuick Start
Initialize the SDK with your API key and project ID:
import { Unchange } from 'unchange-sdk';
const client = new Unchange({
apiKey: 'your-api-key',
projectId: 'your-project-id',
});Using a Custom Base URL
If you're using a self-hosted instance or a different environment, you can specify a custom base URL:
const client = new Unchange({
apiKey: 'your-api-key',
projectId: 'your-project-id',
baseUrl: 'https://your-custom-domain.com',
});Basic Usage
Fetching Changelogs
Get all changelogs for your project:
const changelogs = await client.changelogs.list();
console.log(changelogs);Getting the Latest Changelog
Retrieve the most recent changelog:
const latest = await client.changelogs.getLatest();
console.log(latest);Managing Users
Create a new user to track their changelog interactions:
await client.users.create('user-123');Acknowledging Changelogs
Mark a changelog as seen by a specific user:
await client.changelogs.acknowledge('changelog-id', 'user-123');