Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

310 Commits

Repository files navigation

azurapi-js-setup

Setup for azurapi-js

Function

  • Updates ships.json, ship-list.json, equipments.json with fresh data

Usage

To update your own copy

  • Fetch https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/version-info.json. application/json
  • Check respective version numbers from ships/equipments.
    • Example: ships['version-number']
  • If it is greater than the version number on your local copy. You need to update from either
    • https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/ships.json
    • https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/equipments.json
  • Overwrite your local copy, and reload it into your program

    Cloning

  • Clone this repository
  • Update your local copy with
constazurlane=require("./index.js");azurlane.refreshShips(true);azurlane.refreshEquipments(true);azurlane.refreshChapter(true);azurlane.refreshShipImages();azurlane.refreshEQImages();azurlane.publishShips();azurlane.publishEQ();
  • Bewared that this update program will use up a lot of bandwidth and processing power
  • To rely on local cache, remove all the true parameters

JSON Types

When a single ship's info is extracted, it is of Ship type

Typescript Definition for ships.json

exporttypeUrl=string;exporttypeStat=|"health"|"armor"|"reload"|"luck"|"firepower"|"torpedo"|"evasion"|"speed"|"antiair"|"aviation"|"oilConsumption"|"accuracy"|"antisubmarineWarfare"|"oxygen"|"ammunition"|"huntingRange";exportconstisStat=(str: string)=>["health","armor","reload","luck","firepower","torpedo","evasion","speed","antiair","aviation","oilConsumption","accuracy","antisubmarineWarfare","oxygen","ammunition","huntingRange",].includes(str);exporttypeShipID=string;exporttypeRarity=|"Normal"|"Rare"|"Epic"|"Super Rare"|"Ultra Rare"|"Priority"|"Decisive"|"Unreleased";exporttypeLimitBreak=string[];exporttypeShipNames={// Ship's namecode: string;en: string;cn: string;jp: string;kr: string;};exporttypeShipStats={baseStats: Stats;level100: Stats;level120: Stats;level100Retrofit?: Stats;level120Retrofit?: Stats;};exporttypeFleetTech={// fleet tech stuffstatsBonus: {collection?: Bonus;maxLevel?: Bonus;};techPoints: {collection: number;maxLimitBreak: number;maxLevel: number;total: number;};};exportclassShip{wikiUrl: Url;// An valid, full url to its wiki pageid: ShipID;// ID of ship, provided by the wiki (not in game id)names: ShipNames;thumbnail: Url;hexagon: [number,number,number,number,number,number];class: string;// Ship's classnationality: string;// Ship's nationalityhullType: string;// Ship type (Destroyer etc)rarity: Rarity;// Super Rare, hopefullystars: {stars: string;value: number;};stats: ShipStats;slots: [Slot,Slot,Slot];enhanceValue: {firepower: number;torpedo: number;aviation: number;reload: number};scrapValue: {coin: number;oil: number;medal: number;};skills: Skill[];skins: Skin[];gallery: GalleryItem[];limitBreaks: LimitBreak[];// first layer = breaks, second layer = bonusdevLevels: DevLevel[];fleetTech: FleetTech;unreleased?: boolean;retrofit: boolean;// if the ship is retrofittableretrofitId: string;// the id after retrofitretrofitHullType: string;// if the ship changes typeretrofitProjects: {[id: string]: RetrofitProject};construction: {constructionTime: string;availableIn: {light: boolean;heavy: boolean;aviation: boolean;limited: boolean;exchange: boolean;};};obtainedFrom: {obtainedFrom?: string;// source, etc "Available in Medal Exchange for \"Medal\" 80."fromMaps: string[];// map ids, etc "1-1" "10-2"};misc: {artist?: Artist;web?: Artist;pixiv?: Artist;twitter?: Artist;voice?: Artist;};}exporttypeBonus={// on collectionapplicable: string[];// applicable ship types (i.e. Destroyer)stat: Stat;// name of stat to enhancebonus: string;// human-readable version of how much to enhance};exporttypeStats={[kinStat]?: string;};exporttypeSlot={type: string;kaiEfficiency?: number;minEfficiency: number;maxEfficiency: number;};exporttypeSkill={icon: Url;names: {en: string;cn: string;jp: string;};description: string;color: string;};exporttypeSkinInfo={enClient?: string;cnClient?: string;jpClient?: string;cost?: number;obtainedFrom: string;live2dModel: boolean;};exportinterfaceSkin{name: string;chibi: Url;image: Url;cn?: Url;// censoredbg?: Url;// with backgroundnobg?: Url;// without background (only used internally)background: Url;// scenery backgroundinfo: SkinInfo;}exporttypeGalleryItem={description: string;// self-explanatoryurl: Url;// the image url};exporttypeArtist={name: string;url: Url;};exporttypeProjectID=string;exporttypeRetrofitProject={id: ProjectID;grade: string;attributes: string[];materials: string[];coins: number;level: number;levelBreakLevel: number;levelBreakStars: string;recurrence: number;require: ProjectID[];};exporttypeDevLevel={level: string;buffs: string[];};

voice_lines.json

classShip{Default: Array<Line>;// [Skin Name]: Array<Line>; // note: the skin name is directly from the wiki page// ...}classLine{event: string;// the event (touch etc) nameen?: string;// the line in englishzh?: string;// the line in chinesejp?: string;// the line in japaneseaudio?: string;// the line's audio url, file type = "audio/ogg"}

Join our discord!

Discord server

Credits

Data is obtained from the official Azur Lane Wiki

About

Setup for azurapi-js

Resources

Stars

26 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages