Python wrapper for the Battlegrounds Developer API
Project description
Python wrapper for the Battlegrounds Developer API
==================================================
`Battlegrounds Developer API Docs <https://developer.playbattlegrounds.com/docs/en/introduction.html>`_
************
Installation
************
.. code-block:: bash
pip install pubg
***************
Usage
***************
Setup
=====
.. code-block:: python
from pubg import Battlegrounds, Region
battlegrounds = Battlegrounds(api_key='API_KEY', region=Region.pc_na)
Match Data
==========
.. code-block:: python
matches = battlegrounds.matches()
print(matches.id)
print(matches.created_at)
print(matches.duration)
for roster in matches.rosters:
print(roster.id)
for participant in roster.participants:
print(participant.id)
print(participant.actor)
print(participant.shard_id)
print(roster.won)
print(roster.shard_id)
for asset in matches.assets:
print(asset.id)
print(asset.title_id)
print(asset.shard_id)
print(asset.name)
print(asset.description)
print(asset.created_at)
print(asset.filename)
print(asset.content_type)
print(asset.url)
print(matches.game_mode)
print(matches.patch_version)
print(matches.title_id)
print(matches.shard_id)
Status
======
.. code-block:: python
status = Battlegrounds.status()
print(status.id)
print(status.released_at)
print(status.version)
More will be available as I get more information about the API
Platform: UNKNOWN
Classifier: Development Status :: 1 - Planning
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
==================================================
`Battlegrounds Developer API Docs <https://developer.playbattlegrounds.com/docs/en/introduction.html>`_
************
Installation
************
.. code-block:: bash
pip install pubg
***************
Usage
***************
Setup
=====
.. code-block:: python
from pubg import Battlegrounds, Region
battlegrounds = Battlegrounds(api_key='API_KEY', region=Region.pc_na)
Match Data
==========
.. code-block:: python
matches = battlegrounds.matches()
print(matches.id)
print(matches.created_at)
print(matches.duration)
for roster in matches.rosters:
print(roster.id)
for participant in roster.participants:
print(participant.id)
print(participant.actor)
print(participant.shard_id)
print(roster.won)
print(roster.shard_id)
for asset in matches.assets:
print(asset.id)
print(asset.title_id)
print(asset.shard_id)
print(asset.name)
print(asset.description)
print(asset.created_at)
print(asset.filename)
print(asset.content_type)
print(asset.url)
print(matches.game_mode)
print(matches.patch_version)
print(matches.title_id)
print(matches.shard_id)
Status
======
.. code-block:: python
status = Battlegrounds.status()
print(status.id)
print(status.released_at)
print(status.version)
More will be available as I get more information about the API
Platform: UNKNOWN
Classifier: Development Status :: 1 - Planning
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pubg-0.0.3.tar.gz
(3.0 kB
view details)
File details
Details for the file pubg-0.0.3.tar.gz
.
File metadata
- Download URL: pubg-0.0.3.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dd948ed070e1b8f42aab1042b356e6ac7e43c172fc736bcf2e08653aeaa82b5 |
|
MD5 | 5cef1565e5e9c2e6cea4bee708b00873 |
|
BLAKE2b-256 | 9bb965578a17adca4d03555f32c9f4b82903afbc27add4ce704952e918571f20 |