@track-my-tennis/sdk
v0.1.2
Published
SDK for Track My Tennis - Provides services for managing players, clubs, matches, and tournaments
Downloads
8
Maintainers
Readme
@track-my-tennis/sdk
TypeScript SDK for Track My Tennis - Provides core services for managing players, clubs, matches, and tournaments across the Track My Tennis ecosystem.
Installation
npm install @track-my-tennis/sdkUsage
Importing Services
// Import individual services
import { PlayerService, ClubService, MatchService, TournamentService } from '@track-my-tennis/sdk';
// Or import from subpath
import { PlayerService } from '@track-my-tennis/sdk/services';Using the SDK
import { PlayerService } from '@track-my-tennis/sdk';
// Services expect their dependencies injected via constructor
// Example with a player repository implementation
const playerRepository = new PlayerRepository();
const clubRepository = new ClubRepository();
const playerService = new PlayerService(playerRepository, clubRepository);
const players = await playerService.getAllPlayers();Dependencies
This SDK depends on:
- @track-my-tennis/types: Pure TypeScript type definitions (published on npm)
Available Services
- PlayerService: Manage players, affiliations, and player-related operations
- ClubService: Manage clubs and club information
- MatchService: Manage matches, scores, and match results
- TournamentService: Manage tournaments, editions, categories, and contexts
Scripts
build: Compile TypeScript to JavaScriptbuild:watch: Watch for changes and recompileclean: Remove built artifactsprepare: Runs before npm publish
License
Proprietary. All rights reserved. See LICENSE for details.
