@cthos/gw2-api3.0.0-beta.3 • Public • Published
⚠️ 3.0.0 is a breaking change, and changes how the project is compiled / exported. I've not quite made a UMD bundle for this yet.
This is a node module which is designed to facilitate communication with the Guild Wars 2 API.
The goal is to provide some convenience methods around getting things out of the API. This includes ways to cache API call results in memory, localStorage, or whatever storage system you desire. This is useful for the big aggregate lists (for example
gw2 package comes with 2 objects exported.
gw2 is the actual interface to the API with a default storage mechanism of
localStorage. Since this isn't available in all applications, it also provides
memStore, which simply caches things in RAM. Storage can also be disabled by calling
Example (for ^3.0.0)
;;// Set storage system to RAM if no access to localStorageapi.setStoragenew Memstore;// Get daily pve achievement names:; // the true is default, but this will translate the IDs to their objects directly;// Get all character names associated with an account.await api.setAPIKey'YOUR-TOKEN-GOES-HERE';api.getCharacters.then;// Get Character Detailsapi.getCharacters'Zojja'.then;
Example (for 2.2.2)
var gw2 = ;var api = ;// Set storage system to RAM if no access to localStorageapi;// Get daily pve achievement names:api;// Get all character names associated with an account.api;api;// Get Character Detailsapi;
Full API documentation is found on the Wiki.
Their copyright notice is:
© 2015 ArenaNet, LLC. All rights reserved. NCSOFT, the interlocking NC logo, ArenaNet, Guild Wars, Guild Wars Factions, Guild Wars Nightfall, Guild Wars: Eye of the North, Guild Wars 2, Heart of Thorns, and all associated logos and designs are trademarks or registered trademarks of NCSOFT Corporation. All other trademarks are the property of their respective owners.