Skip to main content

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
  • 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
  • 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
  • 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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pubgapi_ku-0.14.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pubgapi_ku-0.14-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file pubgapi_ku-0.14.tar.gz.

File metadata

  • Download URL: pubgapi_ku-0.14.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for pubgapi_ku-0.14.tar.gz
Algorithm Hash digest
SHA256 d42c3eeffbb81c648b7d6c1200cc0899257b11912d78dd5ee51eb32032a09d4f
MD5 3cb772607cc6aa09f71943a939797a4a
BLAKE2b-256 5d87a43a0995fc75504efcd2c15db38cb109d00ce5a18d6e488db5a002abda73

See more details on using hashes here.

File details

Details for the file pubgapi_ku-0.14-py3-none-any.whl.

File metadata

  • Download URL: pubgapi_ku-0.14-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for pubgapi_ku-0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 233925d2e50b9fe53ecfbda4e8f489194ab991431ca34d34b5a73d1493590003
MD5 5f368232e10cf3d6c56af0b96f9ff6c2
BLAKE2b-256 44d2e7e050082e118a53220d3516456f6ea3742670a7a621390c4f5298e385a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page