Skip to content

More Get Methods

Saya edited this page Apr 24, 2020 · 6 revisions

More Get Methods

Saratoga also have additional get methods for your convenience. Pretty much the method name explains what the method will return, but for a quick tip, methods that starts with getAll will return an array, while methods that starts with get only will return a single entry.

Ship Getters

Ship getters are methods from Saratoga#ships

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

const client = new Saratoga();

client.ships.getAllByClass(shipClass);
client.ships.getAllByNationality(nationality);
client.ships.getAllByHullType(hullType);
client.ships.getAllByRarity(rarity);
client.ships.getById(id);
client.ships.searchShipByName(name, limit = 10);

Ship Return Data Example. If an method returns an array, then expect an array of this data

{
  wikiUrl: 'https://azurlane.koumakan.jp/Saratoga',
  id: '074',
  names: {
    en: 'Saratoga',
    code: 'USS Saratoga',
    cn: '萨拉托加',
    jp: 'サラトガ',
    kr: '새러토가'
  },
  class: 'Lexington',
  nationality: 'Eagle Union',
  hullType: 'Aircraft Carrier',
  thumbnail: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/skins/074/thumbnail.png',
  rarity: 'Elite',
  stars: { stars: '★★☆☆☆', value: 2 },
  stats: {
    level120Retrofit: {
      health: '7122',
      armor: 'Medium',
      reload: '130',
      luck: '66',
      firepower: '0',
      torpedo: '0',
      evasion: '57',
      speed: '33',
      antiair: '353',
      aviation: '442',
      oilConsumption: '12',
      accuracy: '92',
      antisubmarineWarfare: '0'
    },
    level120: {
      health: '6912',
      armor: 'Medium',
      reload: '110',
      luck: '66',
      firepower: '0',
      torpedo: '0',
      evasion: '57',
      speed: '33',
      antiair: '303',
      aviation: '397',
      oilConsumption: '12',
      accuracy: '92',
      antisubmarineWarfare: '0'
    },
    level100Retrofit: {
      health: '6326',
      armor: 'Medium',
      reload: '116',
      luck: '66',
      firepower: '0',
      torpedo: '0',
      evasion: '34',
      speed: '33',
      antiair: '316',
      aviation: '401',
      oilConsumption: '12',
      accuracy: '83',
      antisubmarineWarfare: '0'
    },
    level100: {
      health: '6116',
      armor: 'Medium',
      reload: '96',
      luck: '66',
      firepower: '0',
      torpedo: '0',
      evasion: '34',
      speed: '33',
      antiair: '266',
      aviation: '356',
      oilConsumption: '12',
      accuracy: '83',
      antisubmarineWarfare: '0'
    },
    baseStats: {
      health: '1183',
      armor: 'Medium',
      reload: '41',
      luck: '66',
      firepower: '0',
      torpedo: '0',
      evasion: '13',
      speed: '33',
      antiair: '57',
      aviation: '75',
      oilConsumption: '4',
      accuracy: '32',
      antisubmarineWarfare: '0'
    }
  },
  slots: {
    '1': {
      type: 'Fighters',
      minEfficiency: 120,
      maxEfficiency: 120,
      kaiEfficiency: 125
    },
    '2': {
      type: 'Dive Bombers',
      minEfficiency: 115,
      maxEfficiency: 130,
      kaiEfficiency: 140
    },
    '3': {
      type: 'Dive Bombers',
      minEfficiency: 115,
      maxEfficiency: 130,
      kaiEfficiency: 140
    }
  },
  enhanceValue: { firepower: 0, torpedo: 0, aviation: 63, reload: 8 },
  scrapValue: { coin: 9, oil: 3, medal: 4 },
  skills: [
    {
      icon: 'https://azurlane.koumakan.jp/w/images/2/2f/Skill_10180.png',
      names: [Object],
      description: 'Every 20 (10) seconds, provides supporting fire with 20.3 cm guns (damage based on skill level).Barrage preview (gif)',
      color: 'pink'
    },
    {
      icon: 'https://azurlane.koumakan.jp/w/images/a/a4/Skill_3020.png',
      names: [Object],
      description: 'When launching an airstrike: increases Escort Fleet damage by 5% (15%) for 8 seconds. Does not stack with the same skill.',
      color: 'gold'
    },
    {
      icon: 'https://azurlane.koumakan.jp/w/images/4/4a/Skill_11400.png',
      names: [Object],
      description: 'When launching an airstrike: 40% (70%) chance to launch additional planes (damage based on skill level and Aviation stat) that inflict flood and burn damage on hit.',
      color: 'pink'
    }
  ],
  limitBreaks: [
    [ 'Number of Fighters +1', 'Dive Bomber Efficiency +3%' ],
    [
      'Hangar Capacity +1',
      'Number of Dive Bombers +1',
      'Dive Bomber Efficiency +5%'
    ],
    [ 'Number of Dive Bombers +1', 'Dive Bomber Efficiency +7%' ]
  ],
  fleetTech: {
    statsBonus: { collection: [Object], maxLevel: [Object] },
    techPoints: { collection: 12, maxLimitBreak: 25, maxLevel: 18, total: 55 }
  },
  retrofit: true,
  retrofitId: '3074',
  retrofitProjects: {
    A: {
      name: 'Hull Improvement Ⅰ',
      attributes: [Array],
      materials: [Array],
      coins: 400,
      level: 1,
      levelBreakLevel: 0,
      levelBreakStars: '★★☆☆☆',
      recurrence: 1,
      require: []
    },
    B: {
      name: 'Reload Enhancement Ⅰ',
      attributes: [Array],
      materials: [Array],
      coins: 600,
      level: 5,
      levelBreakLevel: 0,
      levelBreakStars: '★★☆☆☆',
      recurrence: 1,
      require: [Array]
    },
    C: {
      name: 'Air Elite Ⅰ',
      attributes: [Array],
      materials: [Array],
      coins: 800,
      level: 20,
      levelBreakLevel: 1,
      levelBreakStars: '★★★☆☆',
      recurrence: 1,
      require: [Array]
    },
    D: {
      name: 'Anti-Air Enhancement Ⅰ',
      attributes: [Array],
      materials: [Array],
      coins: 1000,
      level: 25,
      levelBreakLevel: 1,
      levelBreakStars: '★★★☆☆',
      recurrence: 1,
      require: [Array]
    },
    E: {
      name: 'Bombing Elite Ⅰ',
      attributes: [Array],
      materials: [Array],
      coins: 1200,
      level: 35,
      levelBreakLevel: 2,
      levelBreakStars: '★★★★☆',
      recurrence: 1,
      require: [Array]
    },
    F: {
      name: 'Aviation Enhancement Ⅰ',
      attributes: [Array],
      materials: [Array],
      coins: 1500,
      level: 40,
      levelBreakLevel: 2,
      levelBreakStars: '★★★★☆',
      recurrence: 1,
      require: [Array]
    },
    G: {
      name: 'Hull Improvement Ⅱ',
      attributes: [Array],
      materials: [Array],
      coins: 1800,
      level: 50,
      levelBreakLevel: 2,
      levelBreakStars: '★★★★☆',
      recurrence: 2,
      require: [Array]
    },
    H: {
      name: 'Reload Enhancement Ⅱ',
      attributes: [Array],
      materials: [Array],
      coins: 2000,
      level: 55,
      levelBreakLevel: 2,
      levelBreakStars: '★★★★☆',
      recurrence: 2,
      require: [Array]
    },
    I: {
      name: 'Bombing Elite Ⅱ',
      attributes: [Array],
      materials: [Array],
      coins: 2500,
      level: 70,
      levelBreakLevel: 3,
      levelBreakStars: '★★★★★',
      recurrence: 2,
      require: [Array]
    },
    J: {
      name: 'Aviation Enhancement Ⅱ',
      attributes: [Array],
      materials: [Array],
      coins: 3000,
      level: 75,
      levelBreakLevel: 3,
      levelBreakStars: '★★★★★',
      recurrence: 2,
      require: [Array]
    },
    K: {
      name: 'Modernization',
      attributes: [Array],
      materials: [Array],
      coins: 4000,
      level: 85,
      levelBreakLevel: 3,
      levelBreakStars: '★★★★★',
      recurrence: 1,
      require: [Array]
    },
    L: {
      name: 'Tactical Learning',
      attributes: [Array],
      materials: [Array],
      coins: 3000,
      level: 90,
      levelBreakLevel: 3,
      levelBreakStars: '★★★★★',
      recurrence: 1,
      require: [Array]
    }
  },
  construction: {
    constructionTime: '03:40:00',
    availableIn: {
      light: false,
      heavy: false,
      aviation: true,
      limited: false,
      exchange: false
    }
  },
  gallery: [],
  misc: {
    artist: 'Saru(猴妈)',
    web: { name: '浅井猴猴_Saru', url: 'http://weibo.com/p/1005051054234800' },
    pixiv: {
      name: 'Saru',
      url: 'https://www.pixiv.net/member.php?id=1422579'
    },
    twitter: { name: 'Saru', url: 'https://twitter.com/saru_1127' },
    voice: {
      name: 'Sumire Uesaka',
      url: 'https://en.wikipedia.org/wiki/Sumire_Uesaka'
    }
  },
  skins: [
    {
      name: 'Default',
      image: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/skins/074/Default/image.png',
      background: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/backgrounds/MainDayBG.png',
      chibi: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/skins/074/Default/chibi.png',
      info: [Object]
    },
    {
      name: 'Retrofit',
      image: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/skins/074/Retrofit/image.png',
      background: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/backgrounds/MainDayBG.png',
      chibi: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/skins/074/Retrofit/chibi.png',
      info: [Object]
    },
    {
      name: 'Seven Seas of Rest',
      image: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/skins/074/Seven_Seas_of_Rest/image.png',
      background: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/backgrounds/Skin_BG_106.png',
      chibi: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/skins/074/Seven_Seas_of_Rest/chibi.png',
      info: [Object]
    },
    {
      name: 'Hibiscus-scented Idol',
      image: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/skins/074/Hibiscusscented_Idol/image.png',
      background: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/backgrounds/MainDayBG.png',
      chibi: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/skins/074/Hibiscusscented_Idol/chibi.png',
      info: [Object]
    },
    {
      name: 'Virtual Idol',
      image: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/skins/074/Virtual_Idol/image.png',
      background: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/backgrounds/Skin_BG_210.png',
      chibi: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/skins/074/Virtual_Idol/chibi.png',
      info: [Object]
    },
    {
      name: 'Superstar of the Blue Seas',
      image: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/skins/074/Superstar_of_the_Blue_Seas/image.png',
      background: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/backgrounds/MainDayBG.png',
      chibi: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/skins/074/Superstar_of_the_Blue_Seas/chibi.png',
      info: [Object]
    }
  ]
}

Equipment Getters

Equipment getters are methods from Saratoga#equipments

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

const client = new Saratoga();

client.equipments.getAllByCategory(category);
client.equipments.getAllByNationality(nationality);
client.equipments.searchByEquipmentName(name, limit = 10);

> Equipment Return Data Example `If an method returns an array, then expect an array of this data`
```js
{
  wikiUrl: 'https://azurlane.koumakan.jp/Quadruple_130mm_(Mle_1932)',
  category: 'Destroyer Guns',
  names: {
    en: '四联装130mm副炮Mle1932',
    cn: '四联装130mm副炮Mle1932',
    jp: '130mm副砲Mle1932',
    kr: '130mm 부포 Mle 1932'
  },
  type: { focus: 'Firepower', name: 'DD Gun' },
  nationality: 'Vichya Dominion',
  image: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/equipments/Quadruple_130mm_Mle_1932.png',
  fits: {
    destroyer: 'primary',
    lightCruiser: 'secondary',
    heavyCruiser: 'secondary',
    monitor: 'secondary',
    largeCruiser: 'secondary',
    battleship: 'secondary',
    battlecruiser: 'secondary',
    aviationBattleship: null,
    aircraftCarrier: null,
    lightCarrier: null,
    repairShip: null,
    submarine: 'primary',
    submarineCarrier: null
  },
  misc: {
    obtainedFrom: 'Historical equipment on Dunkerque. Currently unobtainable.',
    notes: 'No notes',
    animation: 'https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/equipments.animation/Quadruple_130mm_Mle_1932.gif'
  },
  tiers: {
    T0: { tier: 'T0', rarity: 'Rare', stars: [Object], stats: [Object] }
  }
}
Clone this wiki locally