Chat Game API: all communication with Server in one place
npm install @chat-game/apiChat Game API: all communication with Server in one place
``shell`
npm i @chat-game/api
Import from lib. Init it as a new class, provide Bearer Token. Use available typed methods.
`ts
import { ChatGameAPI } from '@chat-game/api'
const api = new ChatGameAPI('
const test = await api.method()
if (test instanceof Error) {
// Some error
}
``
See CHANGELOG.md