MapleStory.OpenAPI
2.1.0
See the version list below for details.
dotnet add package MapleStory.OpenAPI --version 2.1.0
NuGet\Install-Package MapleStory.OpenAPI -Version 2.1.0
<PackageReference Include="MapleStory.OpenAPI" Version="2.1.0" />
paket add MapleStory.OpenAPI --version 2.1.0
#r "nuget: MapleStory.OpenAPI, 2.1.0"
// Install MapleStory.OpenAPI as a Cake Addin #addin nuget:?package=MapleStory.OpenAPI&version=2.1.0 // Install MapleStory.OpenAPI as a Cake Tool #tool nuget:?package=MapleStory.OpenAPI&version=2.1.0
MapleStory OpenAPI C# Library
This C# library enables the use of the MapleStory OpenAPI of Nexon.
Packages written in other languages can be found HERE.
(한국어 문서는 이쪽입니다.)
Installation
Install the latest version of the C# library in your NuGet project:
<PackageReference Include="MapleStory.OpenAPI" Version="2.1.0" />
Usage
API Key
Before using the library, register your application and obtain an api key from the Nexon Open API Console.
Sample Code
using MapleStory.OpenAPI;
var apiKey = "{Your API Key}";
var api = new MapleStoryAPI(apiKey);
var dateTimeOffset = new DateTimeOffset(2023, 10, 15, 0, 0, 0, TimeSpan.FromHours(9));
// run your code
try
{
var response = await api.GetCubeHistory(1000, dateTimeOffset);
var count = response.Count;
var cubeHistory = response.CubeHistory;
var nextCursor = response.NextCursor;
Console.WriteLine("You used " + count + " cubes.");
}
// exception handling
catch (MapleStoryAPIException e)
{
// handle MapleStoryApiException
}
catch (HttpRequestException e)
{
// handle HttpRequestException
}
Exception Handling
Handle MapleStoryAPIException
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 MapleStoryAPIException
for exception handling based on the MapleStoryAPIErrorCode
list described in the table below.
ErrorCode | Description |
---|---|
OPENAPI00001 | Internal server error |
OPENAPI00002 | Access denied |
OPENAPI00003 | Invalid identifier |
OPENAPI00004 | Request format error (incorrect parameter input) |
OPENAPI00005 | Invalid api key |
OPENAPI00006 | Invalid api path |
OPENAPI00007 | Request allowance (Rate Limit) exceeded |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Newtonsoft.Json (>= 13.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.7.2 | 92 | 10/3/2024 |
2.7.1 | 114 | 8/14/2024 |
2.7.0 | 105 | 7/19/2024 |
2.6.1 | 91 | 7/8/2024 |
2.6.0 | 103 | 6/14/2024 |
2.5.0 | 141 | 4/9/2024 |
2.4.1 | 127 | 2/21/2024 |
2.4.0 | 129 | 1/26/2024 |
2.3.2 | 157 | 1/9/2024 |
2.3.1 | 127 | 1/4/2024 |
2.3.0 | 115 | 12/31/2023 |
2.2.0 | 126 | 12/27/2023 |
2.1.1 | 141 | 12/24/2023 |
2.1.0 | 118 | 12/23/2023 |
2.0.0 | 126 | 12/14/2023 |
1.1.0 | 148 | 12/3/2023 |
1.0.1 | 129 | 11/28/2023 |
1.0.0 | 134 | 11/18/2023 |