@trendmoon/api-client
v0.1.4
Published
Official TypeScript client for Trendmoon API
Maintainers
Readme
@trendmoon/api-client
Official TypeScript client for Trendmoon API
Installation
npm install @trendmoon/api-clientConfiguration
You need to configure your .env file. See .env.example for required variables.
cp .env.example .env
# Edit the .env file with your API keysQuick Start
import { TrendmoonApiClient } from '@trendmoon/api-client';
import { CategoryService } from '@trendmoon/api-client';
async function main() {
// Initialize the API client
const apiClient = new TrendmoonApiClient();
// Use the services
const service = new CategoryService(apiClient);
const result = await service.getAllCategories();
console.log(result);
}
main().catch(error => console.error('An error occurred:', error));Available Services
This library provides several services to interact with the Trendmoon API:
- CategoryService - Category
- ChatActivityService - ChatActivity
- ChatService - Chat
- CoinService - Coin
- MessageService - Message
- SocialService - Social
- UserService - User
Detailed Documentation
Each service has its own detailed documentation with:
- Complete method descriptions
- Parameters and return types
- Usage examples
- TypeScript interfaces
Click on the links above to access the documentation for each service.
Project Structure
src/
├── api/ # Main API client
├── services/ # Services for each endpoint
├── types/ # TypeScript definitions
└── index.ts # Main entry point
docs/ # Services documentation
tests/ # Unit testsDevelopment
Install Dependencies
npm installRun Tests
npm testGenerate Documentation
# Generate services documentation
./generate_docs.sh
# Generate README.md with links
./generate_readme.shBuild
npm run buildSupport
For any questions or issues, please check the documentation or create an issue.
Version
Current version: 0.1.0
