🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

azurlane

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azurlane - npm Package Compare versions

Comparing version

to
1.1.0

9

lib/index.d.ts

@@ -103,2 +103,11 @@ /// <reference types="node" />

/**
* @since 1.1.0
*
* Get information about a ship by id
*
* @param {string} id The id of the ship
* @returns {Promise<IShip>}
*/
getShipById(id: string): Promise<IShip>;
/**
* @since 0.0.1

@@ -105,0 +114,0 @@ *

@@ -58,2 +58,24 @@ 'use strict';

/**
* @since 1.1.0
*
* Get information about a ship by id
*
* @param {string} id The id of the ship
* @returns {Promise<IShip>}
*/
async getShipById(id) {
try {
const response = await axios.get(`${this.baseUrl}/ship?id=${id}`, this._axiosOptions);
return response.data.ship;
}
catch (error) {
if (error.response && error.response.data) {
throw new ApiError(error.response.data);
}
else {
throw error;
}
}
}
/**
* @since 0.0.1

@@ -60,0 +82,0 @@ *

2

package.json
{
"name": "azurlane",
"version": "1.0.0",
"version": "1.1.0",
"description": "Api wrapper for the azur lane api",

@@ -5,0 +5,0 @@ "main": "lib/index",

@@ -54,2 +54,23 @@ import axios, { AxiosRequestConfig } from "axios";

/**
* @since 1.1.0
*
* Get information about a ship by id
*
* @param {string} id The id of the ship
* @returns {Promise<IShip>}
*/
public async getShipById(id: string): Promise<IShip> {
try {
const response = await axios.get<IShipResponse>(`${this.baseUrl}/ship?id=${id}`, this._axiosOptions);
return response.data.ship;
} catch (error) {
if (error.response && error.response.data) {
throw new ApiError(error.response.data);
} else {
throw error;
}
}
}
/**
* @since 0.0.1

@@ -56,0 +77,0 @@ *

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet