Skip to content

Latest commit

 

History

History
96 lines (73 loc) · 5 KB

README.md

File metadata and controls

96 lines (73 loc) · 5 KB

GuildWars2API

A Python wrapper to simplify use of the official Guild Wars 2 API.

[TOC]

Installation

  1. Clone the repository
  2. Navigate to the local copy of the repository in command line
  3. Run python setup.py install to set up the library (For users with more complex Python installations, see Python documentation)
  4. When importing, use from guildwars2api.client import GuildWars2API

Sample code

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)

Supported API Version 2 Endpoints

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

#####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

Supported API Version 1 Endpoints

As of 10/27/15, the following v1 endpoints are available:

#####Dynamic Events

#####Guilds

#####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

#####Miscellaneous

  • build: Returns the current build id
  • colors: Returns a list of dyes in the game
  • files: Returns commonly requested assets

License

CC SA

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/.