@grudge/sdk

Client-side sdk for interacting with @grudge/server

Stats

StarsIssuesVersionUpdatedCreatedSize
@grudge/sdk
2.0.103 years ago3 years agoMinified + gzip package size for @grudge/sdk in KB

Readme

@grudge/sdk

Client-side sdk for interacting with @grudge/server

Usage

import sdk from '@grudge/sdk';

// must be done before any query
sdk.configure(token);

// query
const user = await sdk.getUser(userId);
const lobby = await sdk.createLobby(lobbyData);
const currentUser = await sdk.whoAmI();

// listen
sdk.onUserCreated((user) => console.log(`User created`, user));
sdk.onConnecting(() => console.log('connecting'));
sdk.onConnected(() => console.log('socket has connected'));
sdk.onError((error) => console.log(`oops ${error.toString()}`));

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.