@trendmoon/api-client
Version:
Official TypeScript client for Trendmoon API
112 lines (76 loc) • 2.29 kB
Markdown
Official TypeScript client for Trendmoon API
```bash
npm install @trendmoon/api-client
```
You need to configure your `.env` file. See `.env.example` for required variables.
```bash
cp .env.example .env
```
```typescript
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));
```
This library provides several services to interact with the Trendmoon API:
- **[CategoryService](docs/CategoryService.md)** - Category
- **[ChatActivityService](docs/ChatActivityService.md)** - ChatActivity
- **[ChatService](docs/ChatService.md)** - Chat
- **[CoinService](docs/CoinService.md)** - Coin
- **[MessageService](docs/MessageService.md)** - Message
- **[SocialService](docs/SocialService.md)** - Social
- **[UserService](docs/UserService.md)** - User
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.
```
src/
├── api/
├── services/
├── types/
└── index.ts
docs/
tests/
```
```bash
npm install
```
```bash
npm test
```
```bash
./generate_docs.sh
./generate_readme.sh
```
```bash
npm run build
```
For any questions or issues, please check the documentation or create an issue.
Current version: 0.1.0