Skip to content
Saya edited this page Jan 30, 2020 · 1 revision

Saratoga

The ShipGirl Project. Saratoga. (c) Azurlane for Saratoga.

Saratoga is an open source library that stores, fetches, updates, and outputs Shipgirl related data from Azur Lane.

Inspired by AzurApi-JS; Saratoga aims to give you most of the functionality + ability to hot reload your data without restarting your service.

This homepage will contain the most basic way of using this library.

Basic example of getting a shipfu

const { createServer } = require('http');

const { Saratoga } = require('saratoga');

const client = new Saratoga();

const onRequest = (req, res) => {
  if (!client.ready) {
    res.write('Saratoga is not yet ready!');
  } else {
    res.write(client.ships.getByEnglishName('Saratoga'));
  }
  res.end();
};

createServer(onRequest)
  .listen(8080);

Basic example of getting an equipment

const { createServer } = require('http');

const { Saratoga } = require('saratoga');

const client = new Saratoga();

const onRequest = (req, res) => {
  if (!client.ready) {
    res.write('Saratoga is not yet ready!');
  } else {
    res.write(client.equipments.getByEnglishName('四联装130mm副炮Mle1932'));
  }
  res.end();
};

createServer(onRequest)
  .listen(8080);