Official TypeScript client for the Melonly API with type safety and a simple developer experience.
- TypeScript Support - Type definitions for all API endpoints
- No External Dependencies
- Basic Error Handling
- Pagination Support
npm install @melonly-moderation/ts-melonly-clientyarn add @melonly-moderation/ts-melonly-clientpnpm add @melonly-moderation/ts-melonly-clientimport { MelonlyClient } from '@melonly-moderation/ts-melonly-client';
const client = new MelonlyClient({
token: 'your-api-token-here',
});
// Example usage
const serverInfo = await client.getServerInfo();
console.log(serverInfo);const client = new MelonlyClient({
token: 'your-api-token', // Required
// baseUrl?: 'https://api.custom', // Optional
// timeout?: 30000, // Optional
// headers?: { ... } // Optional
});// Get server info
const server = await client.getServerInfo();
// List applications
const apps = await client.getApplications({ page: 1, limit: 10 });
// Get a specific application
const app = await client.getApplication('application-id');Basic error handling is supported. See the API for thrown errors.
You can use environment variables for your API token:
MELONLY_API_TOKEN=your-production-token-hereconst client = new MelonlyClient({
token: process.env.MELONLY_API_TOKEN!,
});# Run tests
npm test# Clone the repository
git clone https://github.com/Melonly-Moderation/ts-melonly-client.git
cd ts-melonly-client
# Install dependencies
npm install
# Build the package
npm run buildContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: https://melonly-api.readthedocs.io/
- Issues: https://github.com/Melonly-Moderation/ts-melonly-client/issues
- Melonly API Documentation: https://apidocs.melonly.xyz/
Made with ❤️ by the Melonly team