diablo3api package

Submodules

diablo3api.client module

class diablo3api.client.Diablo3API(api_host='https://us.battle.net/api/d3')[source]

Bases: object

Wrapper Class for the Diablo 3 API

API_HOST = 'https://us.battle.net/api/d3'

diablo3api.resources module

class diablo3api.resources.Artisan(api_host, session)[source]

Bases: diablo3api.resources.Resource

A Resource for the Diablo Artisan. See http://blizzard.github.io/d3-api-docs/#artisan-information/artisan-information-example Currently only “blacksmith”, “jeweler”, and “mystic” are valid Artisans.

blacksmith()[source]

Wrapper method to get data for the Blacksmith

build_url(artisan, resource='data/artisan')[source]

Builds a URL of the form: /api/d3/data/artisan/<artisan-type>

jeweler()[source]

Wrapper method to get data for the Jeweler

mystic()[source]

Wrapper method to get data for the Mystic

resource = 'data/artisan'
exception diablo3api.resources.Diablo3APIError[source]

Bases: exceptions.Exception

class diablo3api.resources.Follower(api_host, session)[source]

Bases: diablo3api.resources.Resource

A Resource for a Diablo Follower. See http://blizzard.github.io/d3-api-docs/#follower-information/follower-information-example Currently only “templar”, “scoundrel”, and “enchantress” are valid Followers

build_url(follower, resource='data/follower')[source]

Builds a URL of the form: /api/d3/data/follower/<follower-type> :param follower: :param resource: :return:

enchantress()[source]

Wrapper method to get data for the Templar

resource = 'data/follower'
scoundrel()[source]

Wrapper method to get data for the Scoundrel

templar()[source]

Wrapper method to get data for the Templar

class diablo3api.resources.Hero(api_host, session)[source]

Bases: diablo3api.resources.Resource

A Resource for the Diablo Hero Profile. A Hero Profile is within a Career profile which is why this class is instantiated under the Profile class. See http://blizzard.github.io/d3-api-docs/#hero-profile/hero-profile-example

build_url(battletag, hero)[source]

Builds a URL of the form: /api/d3/profile/<battletag>/hero/<heroId> :param args: There should be 2 positional Arguments for Battletag and Hero ID. :return:

parent_resource = 'profile'
resource = 'hero'
class diablo3api.resources.Item(api_host, session)[source]

Bases: diablo3api.resources.Resource

A Resource for a Diablo Item. See http://blizzard.github.io/d3-api-docs/#item-information/item-information-example

build_url(item, resource='data/item')[source]

Builds a URL of the form: /api/d3/data/item/<itemId> :param item: :param resource: :return:

resource = 'data/item'
class diablo3api.resources.Profile(*args, **kwargs)[source]

Bases: diablo3api.resources.Resource

A Resource for the Diablo Career Profile. See http://blizzard.github.io/d3-api-docs/#career-profile/career-profile-example

build_url(battletag, resource='profile')[source]

Builds a URL of the form: /api/d3/profile/<battletag>/ :param battletag: :param resource: :return:

resource = 'profile'
class diablo3api.resources.Resource(api_host, session)[source]

Bases: object

Base Class for a Diablo 3 Resource

build_url(resource)[source]

Builds the URL using the base API host and the resource :param resource: :return:

get(*args, **kwargs)[source]

Makes a request to the URL and returns the response as a Python object :param args: :param kwargs: :return:

response(*args, **kwargs)[source]

Returns the full Requests response for the Resource :param args: :param kwargs: :return:

Module contents