maplestory-openapi
Version:
This JavaScript library enables the use of the MapleStory OpenAPI of Nexon.
803 lines (796 loc) • 38.3 kB
JavaScript
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var axios = require('axios');
require('../../../node_modules/buffer/index.js');
var character = require('./dto/character/character.js');
var characterAbility = require('./dto/character/characterAbility.js');
var characterAndroidEquipment = require('./dto/character/characterAndroidEquipment.js');
var characterBasic = require('./dto/character/characterBasic.js');
var characterBeautyEquipment = require('./dto/character/characterBeautyEquipment.js');
var characterCashItemEquipment = require('./dto/character/characterCashItemEquipment.js');
var characterDojang = require('./dto/character/characterDojang.js');
var characterHexaMatrix = require('./dto/character/characterHexaMatrix.js');
var characterHexaMatrixStat = require('./dto/character/characterHexaMatrixStat.js');
var characterHyperStat = require('./dto/character/characterHyperStat.js');
var characterImage$1 = require('./dto/character/characterImage.js');
var characterItemEquipment = require('./dto/character/characterItemEquipment.js');
var characterLinkSkill = require('./dto/character/characterLinkSkill.js');
var characterPetEquipment = require('./dto/character/characterPetEquipment.js');
var characterPopularity = require('./dto/character/characterPopularity.js');
var characterPropensity = require('./dto/character/characterPropensity.js');
var characterSetEffect = require('./dto/character/characterSetEffect.js');
var characterSkill = require('./dto/character/characterSkill.js');
var characterStat = require('./dto/character/characterStat.js');
var characterSymbolEquipment = require('./dto/character/characterSymbolEquipment.js');
var characterVMatrix = require('./dto/character/characterVMatrix.js');
var guild = require('./dto/guild/guild.js');
var guildBasic = require('./dto/guild/guildBasic.js');
var union = require('./dto/union/union.js');
var unionArtifact = require('./dto/union/unionArtifact.js');
var unionRaider = require('./dto/union/unionRaider.js');
var characterImage = require('../common/enum/characterImage.js');
var mapleStoryApi = require('../common/mapleStoryApi.js');
var index = require('../../../_virtual/index.js_commonjs-exports.js');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
/**
* MapleStory OpenAPI client for MSEA.<br>
* This is an implementation of <a href="https://openapi.nexon.com/game/maplestorysea">MapleStory API</a>
*/
class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
subUrl = 'maplestorysea';
timezoneOffset = 480;
constructor(apiKey) {
super(apiKey);
}
//#region Character Information Retrieval
/**
* Retrieves the character identifier (ocid).
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param characterName Character name
*/
async getCharacter(characterName) {
const path = `${this.subUrl}/v1/id`;
const { data } = await this.client.get(path, {
params: {
character_name: characterName,
},
});
return new character.CharacterDto(data);
}
/**
* Retrieves basic character information.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterBasic(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/basic`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterBasic.CharacterBasicDto(data);
}
/**
* Retrieves character image information.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param imageOptions Image options
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterImage(ocid, imageOptions, dateOptions) {
const { date, characterImage: path } = await this.getCharacterBasic(ocid, dateOptions);
const action = imageOptions?.action ?? characterImage.CharacterImageAction.Stand1;
const emotion = imageOptions?.emotion ?? characterImage.CharacterImageEmotion.Default;
const wmotion = imageOptions?.wmotion ?? characterImage.CharacterImageWeaponMotion.Default;
const actionFrame = imageOptions?.actionFrame ?? 0;
const emotionFrame = imageOptions?.emotionFrame ?? 0;
const width = 96;
const height = 96;
const x = imageOptions?.x ?? null;
const y = imageOptions?.y ?? null;
const query = {
action: `${action}.${actionFrame}`,
emotion: `${emotion}.${emotionFrame}`,
wmotion,
width,
height,
x,
y,
};
const urlImageToBase64 = async (path, query) => {
const { data, headers } = await axios__default["default"].get(path, {
params: query,
responseType: 'arraybuffer',
});
const base64 = index.__exports.Buffer.from(data, 'binary').toString('base64');
const mimeType = headers['content-type'];
return `data:${mimeType};base64,${base64}`;
};
const [originImage, image] = await Promise.all([
urlImageToBase64(path),
urlImageToBase64(path, query),
]);
return new characterImage$1.CharacterImageDto({
date,
originUrl: path,
originImage,
image,
action,
emotion,
wmotion,
actionFrame,
emotionFrame,
width,
height,
x,
y,
});
}
/**
* Retrieves popularity information of a character.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterPopularity(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/popularity`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterPopularity.CharacterPopularityDto(data);
}
/**
* Retrieves comprehensive character stats information.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterStat(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/stat`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterStat.CharacterStatDto(data);
}
/**
* Retrieves Hyper Stat information.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterHyperStat(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/hyper-stat`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterHyperStat.CharacterHyperStatDto(data);
}
/**
* Retrieves traits information.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterPropensity(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/propensity`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterPropensity.CharacterPropensityDto(data);
}
/**
* Retrieves Ability information.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterAbility(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/ability`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterAbility.CharacterAbilityDto(data);
}
/**
* Retrieves information about equipped equipment, excluding cash items.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterItemEquipment(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/item-equipment`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterItemEquipment.CharacterItemEquipmentDto(data);
}
/**
* Retrieves equipped cash item information.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterCashItemEquipment(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/cashitem-equipment`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterCashItemEquipment.CharacterCashItemEquipmentDto(data);
}
/**
* Retrieves information about equipped symbols.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterSymbolEquipment(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/symbol-equipment`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterSymbolEquipment.CharacterSymbolEquipmentDto(data);
}
/**
* Retrieves information about equipped set item effects.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterSetEffect(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/set-effect`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterSetEffect.CharacterSetEffectDto(data);
}
/**
* Retrieves information about equipped hair, face, and skin.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterBeautyEquipment(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/beauty-equipment`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterBeautyEquipment.CharacterBeautyEquipmentDto(data);
}
/**
* Retrieves equipped android information.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterAndroidEquipment(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/android-equipment`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterAndroidEquipment.CharacterAndroidEquipmentDto(data);
}
/**
* Retrieves information about equipped pets, including pet skills and equipment.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterPetEquipment(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/pet-equipment`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterPetEquipment.CharacterPetEquipmentDto(data);
}
/**
* Retrieves information about character skills and Hyper Skills.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param characterSkillGrade Job advancement tier to query <a href="https://openapi.nexon.com/game/maplestorysea/?id=45">Available values</a>
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterSkill(ocid, characterSkillGrade, dateOptions) {
const path = `${this.subUrl}/v1/character/skill`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
character_skill_grade: characterSkillGrade,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterSkill.CharacterSkillDto(data);
}
/**
* Retrieves information about equipped Link Skills.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterLinkSkill(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/link-skill`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterLinkSkill.CharacterLinkSkillDto(data);
}
/**
* Retrieves V Matrix slot and equipped Node information.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterVMatrix(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/vmatrix`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterVMatrix.CharacterVMatrixDto(data);
}
/**
* Retrieves information about HEXA Nodes equipped in the HEXA Matrix.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterHexaMatrix(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/hexamatrix`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterHexaMatrix.CharacterHexaMatrixDto(data);
}
/**
* Retrieves information about HEXA stats configured in the HEXA Matrix.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterHexaMatrixStat(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/hexamatrix-stat`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterHexaMatrixStat.CharacterHexaMatrixStatDto(data);
}
/**
* Retrieves the character's highest record information in Mu Lung Garden.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getCharacterDojang(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/dojang`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new characterDojang.CharacterDojangDto(data);
}
//#endregion
//#region Union Information Retrieval
/**
* Retrieves Union level and Union rank information.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getUnion(ocid, dateOptions) {
const path = `${this.subUrl}/v1/user/union`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new union.UnionDto(data);
}
/**
* Retrieves detailed information about raid member effects and capture effects deployed in the Union.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getUnionRaider(ocid, dateOptions) {
const path = `${this.subUrl}/v1/user/union-raider`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new unionRaider.UnionRaiderDto(data);
}
/**
* Retrieves Union Artifact information.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param ocid Character identifier
* @param dateOptions Reference date for query (SGT)
*/
async getUnionArtifact(ocid, dateOptions) {
const path = `${this.subUrl}/v1/user/union-artifact`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new unionArtifact.UnionArtifactDto(data);
}
//#endregion
//#region Guild Information Retrieval
/**
* Retrieves information for the guild identifier (oguild_id).
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param guildName Guild name
* @param worldName World name
*/
async getGuild(guildName, worldName) {
const path = `${this.subUrl}/v1/guild/id`;
const { data } = await this.client.get(path, {
params: {
guild_name: guildName,
world_name: worldName,
},
});
return new guild.GuildDto(data);
}
/**
* Retrieves guild basic information.
* - MapleStory game data can be verified approximately 15 minutes after updates.
* - Data is available starting from April 20, 2025.
* - Historical data can be queried by specifying the desired date, and data from the previous day can be accessed starting at 2 AM the next day. (For example, when querying data for December 22, data from 00:00 to 24:00 on December 22 will be retrieved.)
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
* - This API provides data for MapleStory SEA.
* @param guildId Guild identifier
* @param dateOptions Reference date for query (SGT)
*/
async getGuildBasic(guildId, dateOptions) {
const path = `${this.subUrl}/v1/guild/basic`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 4,
day: 20,
})
: undefined;
const query = {
oguild_id: guildId,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new guildBasic.GuildBasicDto(data);
}
}
exports.MapleStoryApi = MapleStoryApi;