1.23.1 • Published 5 months ago

knockoutcity-sdk v1.23.1

Weekly downloads
-
License
GNU GPLv3
Repository
-
Last release
5 months 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.23.0

5 months ago

1.23.1

5 months ago

1.21.0

1 year ago

1.20.1

1 year ago

1.22.0

11 months ago

1.20.0

1 year ago

1.19.0

1 year ago

1.18.0

1 year ago

1.17.0

1 year ago

1.15.0

1 year ago

1.16.1

1 year ago

1.16.0

1 year ago

1.14.2

1 year ago

1.14.1

1 year ago

1.14.0

1 year ago

1.13.0

1 year ago

1.12.1

1 year ago

1.12.0

1 year ago

1.9.1

1 year ago

1.9.0

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.9.3

1 year ago

1.9.2

1 year ago

1.11.0

1 year ago

1.10.0

1 year ago

1.6.2

1 year ago

1.7.0

1 year ago

1.6.1

1 year ago

1.6.0

1 year ago

1.5.0

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.0-alpha.1

2 years ago

1.0.0-alpha.0

2 years ago