Deivu / Uzuki

A RESTful API for @kancolle/data (Kancolle)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uzuki

The ShipGirl Project, Uzuki; (c) Kancolle

Based on my earlier project Hiei

Features

✅ Easy to use

✅ Configurable

✅ Rest based API

✅ Automatic Updates

Downloads

🔗 https://github.com/Deivu/Uzuki/releases

Support

🔗 https://discord.com/invite/FVqbtGu (#development)

Ping or ask for @Sāya#0113

How to host

Download the latest version from Github Releases

Copy a config from examples folder

Run the server by doing java -jar uzuki.jar

Rest Client Example

Node.JS (Javascript)

const Fetch = require('node-fetch');

class Kancolle {
    constructor() {
        this.baseURL = 'http://localhost:1024';
        this.auth = '1234';
    }

    searchShip(ship) {
        return this._fetch('/ship/search', ship);
    }

    _fetch(endpoint, q) {
        const url = new URL(endpoint, this.baseURL);
        url.search = new URLSearchParams({ q }).toString();
        return Fetch(url.toString(), { headers: { 'authorization': this.auth } })
            .then(data => data.json());
    }
}

const client = new Kancolle();
client.searchShip('uzuki')
    .then(data => data.json())
    .then(data => console.log(data));

Made with ❤ by @Sāya#0113

About

A RESTful API for @kancolle/data (Kancolle)

License:MIT License


Languages

Language:Java 99.5%Language:HTML 0.5%