1.19.0 • Published 10 days ago

knockoutcity-sdk v1.19.0

Weekly downloads
-
License
GNU GPLv3
Repository
-
Last release
10 days ago

KnockoutCity SDK

Version License

A developer friendly unofficial SDK for the private server build of KnockoutCity.

Note
This project is currently in alpha and is undergoing heavy development.

Features

  • Authenticate with a private server (with some limitations)
  • Listening to various Server Events (e.g. group joins, invites, ...)
  • Sending various Commands to the Server (e.g. group invites, match making, ...)

Limitations

  • Authentication is currently only possible to private servers. For authentication proxy servers (e.g. KOCity-Proxy) you can use the KnockoutCity Auth Client to get the credentials.
  • Joining Gameserver is currently not possible but will hopefully become a feature when the VNET0 Protocol has been reverse engineered.

Installation

Use your prefered package manager to install knockoutcity-sdk.

# NPM
npm install knockoutcity-sdk

# Yarn
yarn knockoutcity-sdk

# PNPM
pnpm install knockoutcity-sdk

Usage

// Using required
const kocSDK = require('knockoutcity-sdk');

// Using import
import * as kocSDK from 'knockoutcity-sdk'
// or
import { ... } from 'knockoutcity-sdk'

Also make sure to check the examples for detailed examples on the usage and possibilities of this sdk.

Connecting to a Server

import { authenticate, KOCWebsocketClient } from 'knockoutcity-sdk';

const BASE_URL = 'http://127.0.0.1:23600';

const kocWebsocketClient = new KOCWebsocketClient(BASE_URL);
const { token } = await authenticate(BASE_URL, 'USERNAME');

// ... register listeners

await kocWebsocketClient.connect(token);

// ... emit events

Listening to Events

kocWebsocketClient.on('EVENT NAME', (data) => {
  // ...
});

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

GNU GPLv3

1.19.0

10 days ago

1.18.0

12 days ago

1.17.0

13 days ago

1.15.0

18 days ago

1.16.1

18 days ago

1.16.0

18 days ago

1.14.2

21 days ago

1.14.1

23 days ago

1.14.0

23 days ago

1.13.0

23 days ago

1.12.1

30 days ago

1.12.0

30 days ago

1.9.1

1 month ago

1.9.0

1 month ago

1.8.1

1 month ago

1.8.0

1 month ago

1.9.3

1 month ago

1.9.2

1 month ago

1.11.0

1 month ago

1.10.0

1 month ago

1.6.2

1 month ago

1.7.0

1 month ago

1.6.1

1 month ago

1.6.0

1 month ago

1.5.0

1 month ago

1.4.1

1 month ago

1.4.0

1 month ago

1.3.1

1 month ago

1.3.0

1 month ago

1.2.1

1 month ago

1.2.0

1 month ago

1.1.1

1 month ago

1.1.0

1 month ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.0-alpha.1

11 months ago

1.0.0-alpha.0

11 months ago