Skip to content

GuillaumeRochette/gw2apy

Repository files navigation

Guild Wars 2 API Python Wrapper

Build Status Latest Version Supported Python versions

Installation

  • Pre-requisites: Python >= 3.6
  • Install the package from PyPi directly:
pip install gw2apy

Quickstart

  • Create a client:
from gw2apy.client import Client

client = Client()

You can specify an API key to access authenticated endpoints, such as bank content or wallet:

client = Client(api_key="YOUR_API_KEY")
  • Create an endpoint, e.g. Items:
from gw2apy.endpoints import Items

items_endpoint = Items(client=client)
  • Request data from the endpoint:
# Returns the list of ids for all available items.
items_ids = items_endpoint.endpoint()

# Return the item associated to an id.
item = items_endpoint.id(id=28445)

# Return a list of item given a list of ids.
items = items_endpoint.ids(ids=[28445, 12452])

# Return a list of all the items.
all_items = items_endpoint.all()

Credits

This package is inspired from:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages