1.6.1 • Published 1 year ago

@bakaso/fkclient v1.6.1

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
1 year ago

fkclient.js

A wrapper library for Foxtan API.

Installation

Note: pnpm can be substituted by npm, yarn or any package manager you choose.

pnpm add @bakaso/fkclient

Usage

Most of the API calls go through a websocket connection and are asynchronous. The general workflow is:

// Import the library
import FKClient from "@bakaso/fkclient"

// Initialise the API client with the API endpoint address
const client = new FKClient("http://127.0.0.1:6749")

// Subscribe to the message types you wish to handle
client.addInMessageListener(
	// Filter function
	msg => "boards" === msg.what.request,
	// Handler
	msg => console.log("Received a reply message regarding some boards:", msg.data)
)

// Make your requests
client.board.requestMany()

For more usage examples, see the example app.

Running the example app

# Clone this repository
git clone https://github.com/BakaSolutions/fkclient.js.git
cd fkclient.js

# Install the dependencies
pnpm install

# Run the example app
pnpm dev
1.6.1

1 year ago

1.6.0

1 year ago

1.5.0

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.1.0

4 years ago