<commit_before>================================
Diablo III Web Api Python Client
================================

.. image:: https://secure.travis-ci.org/sammyrulez/diablo-api-py.png?branch=master

Introduction
============
this is a Python module to query Diablo 3 public data (see https://github.com/Blizzard/d3-api-docs)
The Diablo 3 API resources are not publicly available: this implememntation is based on the actual doc.


Installation
============

::

    pip install git+https://github.com/sammyrulez/diablo-api-py.git

Usage
=====

::

    #import module
    import diablo
    #instantiate a client for a specific host and player
    c = diablo.Client('host', 'battletag_name', 'battletag_number')
    #read career data
    career = c.career_profile()

The career object has the same structure as the json returned from the same api call https://github.com/Blizzard/d3-api-docs#career-profile-example.

Attributes name differs from the json fields: '-' has been replaced with '_' to match python syntax.

'heros' and 'last_hero_played' attributes have 'Lazy' object in which details are loaded from the remote service only if you invoke them<commit_msg>Update master<commit_after>================================
Diablo III Web Api Python Client
================================

.. image:: https://secure.travis-ci.org/sammyrulez/diablo-api-py.png?branch=master

Introduction
============
This is a Python module to query Diablo 3 public data (see https://github.com/Blizzard/d3-api-docs).
The Diablo 3 API resources are not publicly available: this implementation is based on the actual doc.


Installation
============

::

    pip install git+https://github.com/sammyrulez/diablo-api-py.git

Usage
=====

::

    #import module
    import diablo
    #instantiate a client for a specific host and player
    c = diablo.Client('host', 'battletag_name', 'battletag_number')
    #read career data
    career = c.career_profile()

The career object has the same structure as the json returned from the same api call https://github.com/Blizzard/d3-api-docs#career-profile-example.

Attributes name differs from the json fields: '-' has been replaced with '_' to match python syntax.

'heros' and 'last_hero_played' attributes have 'Lazy' object in which details are loaded from the remote service only if you invoke them
{'fraction_non_alphanumeric': 0.1575107296137339, 'fraction_numerical': 0.0034334763948497852, 'mean_word_length': 4.459016393442623, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2421465', 'n_tokens_mistral': 666, 'n_tokens_neox': 645, 'n_words': 240}