gamecore-sdk
v0.1.4
Published
TypeScript SDK for the GameCore gamification API
Readme
@gamecore/sdk
TypeScript SDK for the GameCore gamification API.
Installation
npm install @gamecore/sdk
# or
pnpm add @gamecore/sdkQuick Start
import { client } from '@gamecore/sdk';
import { healthCheck, createUser, getUser } from '@gamecore/sdk';
// Configure the client
client.setConfig({
baseUrl: 'https://your-gamecore-api.com/v1',
headers: {
'x-api-key': 'your-api-key',
},
});
// Create a user
const { data: user } = await createUser({
body: {
externalId: 'user-123',
displayName: 'John Doe',
},
});
// Get a user
const { data } = await getUser({
path: { id: 'user-123' },
});Features
- Users — Create, update, and manage user profiles
- Points — Award points with triggers, boosts, and levels
- Achievements — Define and track achievements
- Streaks — Track user activity streaks
- Leaderboards — Rank users across dimensions
- Metrics — Track custom events and metrics
- Attributes — Define custom attributes for users and entities
- Notifications — Send email and push notifications
- Webhooks — Subscribe to real-time events
- Experiments — Run A/B experiments
API Reference
See the full API documentation at your deployed Swagger UI (/docs).
