Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
maplestory-openapi
Advanced tools
This JavaScript library enables the use of the MapleStory OpenAPI provided by Nexon.
This JavaScript library enables the use of the MapleStory OpenAPI provided by Nexon.
Packages written in other languages can be found HERE.
(한국어 문서는 이쪽입니다.)
Install the latest version of the JavaScript/TypeScript library in your npm project:
npm install maplestory-openapi@1.1.0 # Replace with the latest version
const {MapleStoryApi, MapleStoryApiError} = require('maplestory-openapi'); // CommonJS
import {MapleStoryApi, MapleStoryApiError} from 'maplestory-openapi'; // ESM
const {MapleStoryApi, MapleStoryApiError} = require('maplestory-openapi');
const apiKey = '{Your API Key}';
const api = new MapleStoryApi(apiKey);
api.getCubeResult(1000, {
year: 2023,
month: 10,
day: 15
})
.then((dto) => {
const {count, cubeHistories, nextCursor} = dto;
console.log('You used ' + count + ' cubes.');
})
.catch((e) => {
if (e instanceof MapleStoryApiError) {
// handle MapleStoryApiError
} else {
// handle other errors
}
console.log(e);
});
Handle MapleStoryApiError
to safely make calls, ensuring that specific Status defined in the MapleStory OpenAPI Guide are not encountered.
While MapleStoryApi
is designed to prevent the occurrence of certain Status, exceptions may arise due to developer mistakes.
Therefore, it's recommended to use MapleStoryApiError
for exception handling based on the Status list described in the table below.
Status | Message |
---|---|
400 | Request format error (incorrect parameter input) |
401 | Unauthorized service (unsupported service, service type) |
403 | Unauthorized AccessToken usage |
429 | AccessToken's request allowance (Rate Limit) exceeded |
500 | Internal server error |
504 | Internal server processing timeout |
FAQs
This JavaScript library enables the use of the MapleStory OpenAPI of Nexon.
The npm package maplestory-openapi receives a total of 652 weekly downloads. As such, maplestory-openapi popularity was classified as not popular.
We found that maplestory-openapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.