Skip to content

Latest commit

 

History

History
83 lines (62 loc) · 1.63 KB

Guide.md

File metadata and controls

83 lines (62 loc) · 1.63 KB

Guide

Please read guide at docs.

This document is provided for convenience only, and may not be up to date.

Latest: 1.1.0 Guide: 0.1.0

General

Create a new AzurAPI class

const client = new AzurAPI(/* options [optional]: { source (data source) [default = "local"]: "uncached" | "local", autoupdate (fetch new data or not) [default = true]: boolean, rate (rate of fetching new data) [default  = 3600000]: number }  */);

Update the data

<AzurAPI>.updater.update();

Data accessor classes

<AzurAPI>.ships
<AzurAPI>.equipments
<AzurAPI>.chapters
<AzurAPI>.voicelines
<AzurAPI>.barrages

Note: All functions in accessor classes return arrays.

Base API

Search fuse

<AzurAPI>.<accessor>.fuze(/* name: string */);

Get by id

<AzurAPI>.<accessor>.id(/* id: string */);

Get by search query

<AzurAPI>.<accessor>.get(/* query: string */);

Perform a filter operation

<AzurAPI>.<accessor>.filter(/* predicate: function */);

Perform a map operation

<AzurAPI>.<accessor>.map(/* callbackfn: function */);

Perform a forEach operation

<AzurAPI>.<accessor>.forEach(/* callbackfn: function */);

Perform an every operation

<AzurAPI>.<accessor>.every(/* predicate: function */);

Perform a some operation

<AzurAPI>.<accessor>.some(/* predicate: function */);

Extentions - Ships

Get ship by name/language

.ships.name(/* name: string, language: 'en' | 'cn' | 'jp' | 'kr' */);

.ships.hull(/* name: string */);


> TODO: Rattley will write the rest later