1.6.0 • Published 4 years ago

azurlane v1.6.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

AzurLane

Api wrapper for my azur lane api

Example

const { AzurLane, Category } = require("azurlane");
const azurlane = new AzurLane();

async function main() {
    // Get specific ship by name, in this case "Akagi"
    const ship = await azurlane.getShipByName("Akagi");
    console.log(`${ship.names.en}'s rarity is ${ship.rarity}`); // IJN Akagi's rarity is Super Rare

    // Get an array of ships with rarity "Super Rare"
    const ships = await azurlane.getShips(Category.RARITY, "Super Rare");
    for (let i = 0; i < ships.length; i++) {
        console.log(`[${ships[i].id}] = ${ships[i].name}`); // [036] = San Diego
    }
}

// Also catches any api errors that might occur like 400, 429, 500 http errors
// Api errors extend the default error class, have a look at https://azurlane-api.github.io/AzurLane/classes/apierror.html for information
main().catch(console.error);

Docs

I recommend looking at the api docs to see what data is returned before spamming the api with useless requests only to see what it actually returns.

Support

discord

1.6.0

4 years ago

1.5.0

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.0.10

4 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago