PUBG API wrapper module
Project description
PUBG API Wrapper for Pandas
This package is under development; thus, some features may not work correctly or exist.
Installation
You can install this module using pip (pip3)
pip install pubgapi-ku
Components
Modules
1. API Connector
The module contains Connector class which has functions to get raw JSON data using PUBG API provided by PUBG Developer Portal (https://developer.pubg.com/). All data which can be collected using this module can also be collected by the DataWrapper class, which provides data as Pandas DataFrame type using Connector class internally. Therefore, there is no need to necessarily use API Connector module and Connector class in most cases.
Usage
To use Connector class, you must generate a PUBG API key. Refer instruction of PUBG Developer Portal (https://documentation.pubg.com/en/getting-started.html)
from pubgapiku import api_connector
conn = Connector(<your_api_key>)
sample_matches = conn.sample_matches()
Functions
- sample_matches(self) -> dict|None Return a dictionary(dict)-type containing a list of sample matches within 24 hours in UTC When the API request was not successful (the response code was not 200), the function returns None
- players(self, **kargs) -> dict|None
Return a dictionary-type value containing players information
When the API request was not successful (the response code was not 200), the function returns None
- Keyword arguments
- ids:list[str] Filters by player IDs
- names:list[str] Filters by player names
- Keyword arguments
- match(self, match_id:str) -> dict|None
Return a dictionary-type value containing a match's information
When the API request was not successful (the response code was not 200), the function returns None
- Argument
- match_id:str The ID of the match for which you want to collect information
- Argument
- telemetry_addr(self, match_data:dict) -> str|None
Return the address of telemetry data of a match from the match's data
When the address of telemetry data was not found, the function return None
- Argument
- match_data:dict A match data which is obtained from match function
- Argument
- get_telemetry(self, addr:str) -> dict|None
Return a dictionary-type value containing a match's telemetry data of the target match
When the request was not successful (the response code was not 200), the function returns None
- Argument
- addr:str The address of the target telemetry data obtained from telemetry_addr function
- Argument
2. Data Wrapper
The module contains DataWrapper class, which has functions to get PUBG data from PUBG API as Pandas DataFrame data type Since DataWrapper class works based on Collector class, a PUBG API key is also needed to use DataWrapper class
Usage
Functions
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pubgapi_ku-0.13.tar.gz.
File metadata
- Download URL: pubgapi_ku-0.13.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
318453bea3f8a1709d49f46d226086989f2298ffba0a7ce72e84f6b6a5724ca9
|
|
| MD5 |
e066956b7c721e94bdc55052c16538ba
|
|
| BLAKE2b-256 |
af9207178cb560f3a9e5034533fc5d24b1562f4eb930ef1c41c955115e563f24
|
File details
Details for the file pubgapi_ku-0.13-py3-none-any.whl.
File metadata
- Download URL: pubgapi_ku-0.13-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1ebc5857cc7e8788a8aa41b59872bc7b3d85c438f77c936ce19cb0bec35f6e3
|
|
| MD5 |
bd955e42c62cffe28826dcb90057ab74
|
|
| BLAKE2b-256 |
e93fa0a2c6ad09ee495ead5803922f9ac3a18a4f0a567228b62cd12d63ae59b5
|