guildwars2-ts
TypeScript icon, indicating that this package has built-in type declarations

1.1.5 • Public • Published

Typescript API Wrapper for GuildWars 2

NPM version License

This project is a third-party package, and is strictly not affiliated with GuildWars2, ArenaNet, or NCSoft.

When used, no data is saved by, or sent to the developers, including but not limited to the logs, api tokens, or any objects returned by the endpoints.

Available Endpoints (GuildWars 2)

Full support of all endpoints listed in the API:2 Wiki page

Request Example

import { GW2Api, ApiLanguage } from "guildwars2-ts";

const api: GW2Api = new GW2Api({
	// Token is not required for all of the endpoints
	token: "YOUR-TOKEN-HERE",
	language: ApiLanguage.English,
	rateLimitRetry: true
});

(async () => {
	// Obtain names of all characters on the account
	await api.account.get().then(console.log);
	// Obtain details about each of them
	await api.characters.get().then((characters) => {
		characters.forEach(async (character) => {
			await api.characters.getCore(character).then(console.log);
		});
	});
})();

Contibutions

If you find any kinds of errors in the program code, or wish to add/update any of the functionality provided by this project, please feel free to open a pull request. Validation error logs are extremely helpful, so please include them in the request

Package Sidebar

Install

npm i guildwars2-ts

Weekly Downloads

6

Version

1.1.5

License

ISC

Unpacked Size

1.32 MB

Total Files

7

Last publish

Collaborators

  • dinckelman