A Python wrapper to simplify use of the official Guild Wars 2 API.
[TOC]
- Clone the repository
- Navigate to the local copy of the repository in command line
- Run
python setup.py install
to set up the library (For users with more complex Python installations, see Python documentation) - When importing, use
from guildwars2api.client import GuildWars2API
from guildwars2api.client import GuildWars2API
# Set wrapper to Version 1 endpoints
api = GuildWars2API(api_version='v1')
# Print the number of ongoing WvW matches
matches = api.matches.get()
print("Matches", len(matches))
# Set wrapper to Version 2 endpoints
api = GuildWars2API(api_version='v2')
# Get the details of a specific task with the following inputs:
# continent_id, floor_id, region_id, map_id, and task_id
tasks = api.continents.floors.regions.maps.tasks.get(1, 1, 1, 26, 554)
As of 10/27/15, the following v2 endpoints are available:
#####Items
- items: Returns information about items
- materials: Returns information about materials
- recipes: Returns information about recipes
- recipes/search: A search interface for recipes
- skins: Returns information about skins
#####Game Mechanics
- specializations: Returns information about specializations
- traits: Returns information about traits
#####Map Information
- continents: Returns a list of continents and information about each continent
- floors: Returns detailed information about a map floor
- maps: Returns information about maps in the game
#####Miscellaneous
- build: Returns the current build id
- colors: Returns information about dye colors
- files: Returns commonly requested assets
As of 10/27/15, the following v1 endpoints are available:
#####Dynamic Events
- event_names: Returns a list of localized event names
- map_names: Returns a list of localized map names
- world_names: Returns a list of localized world names
- event_details: Returns detailed information about events
#####Guilds
- guild_details: Returns detailed information about a guild
#####Items
- items: Returns a list of discovered items
- item_details: Returns detailed information about an item
- recipes: Returns a list of discovered recipes
- recipe_details: Returns detailed information about a recipe
- skins: Returns a list of skins
- skin_details: Returns detailed information about a skin
#####Map Information
- continents: Returns a list of continents and information about each continent
- maps: Returns a list of maps in the game
- map_floor: Returns detailed information about a map floor
#####World vs. World
- wvw/matches: Returns the currently running WvW matches
- wvw/match_details: Returns details about a WvW match
- wvw/objective_names: Returns a list of WvW objective names
#####Miscellaneous
- build: Returns the current build id
- colors: Returns a list of dyes in the game
- files: Returns commonly requested assets
GuildWars2API by Daniel Ng is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/.