All Projects → PandaXcentric → game_apis

PandaXcentric / game_apis

Licence: MIT license
This repository is for integrating with different apis to allow you to pull player or game data

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to game apis

Mecha
🚀 Debugger and plugin loader for the League of Legends client
Stars: ✭ 48 (+100%)
Mutual labels:  league-of-legends, leagueoflegends, league-api
LeagueAPI
League of Legends API & Data Framework in Swift
Stars: ✭ 50 (+108.33%)
Mutual labels:  league-of-legends, leagueoflegends, league-api
graphql-pubg
GraphQL wrapper for the PUBG API (deprecated)
Stars: ✭ 52 (+116.67%)
Mutual labels:  pubg, pubgapi, pubg-api
runeterra
Legends of Runeterra deck code encoder/decoder in JavaScript
Stars: ✭ 45 (+87.5%)
Mutual labels:  league-of-legends, leagueoflegends, league-api
legendary-rune-maker
An automation app for League of Legends
Stars: ✭ 75 (+212.5%)
Mutual labels:  league-of-legends, leagueoflegends
steam community market
Get item prices and volumes from the Steam Community Market using Python 3
Stars: ✭ 24 (+0%)
Mutual labels:  dota2, pubg
league-bot
A League of Legends bot to level up accounts. For best results use the settings required settings in the code/README. This bot is designed for Windows computers.
Stars: ✭ 19 (-20.83%)
Mutual labels:  league-of-legends, leagueoflegends
LeagueReplayParser
C# library which can read some data from a .rofl file, and start a replay in the client. (no longer actively maintained)
Stars: ✭ 20 (-16.67%)
Mutual labels:  league-of-legends, leagueoflegends
KBotExt
Application that sends custom requests to League of Legends LCU api
Stars: ✭ 86 (+258.33%)
Mutual labels:  league-of-legends, leagueoflegends
fortnitepy
Async python library for interacting with Fortnite's API and XMPP services.
Stars: ✭ 118 (+391.67%)
Mutual labels:  fortnite, fortnite-stats
pubg-typescript-api
TypeScript wrapper on official PUBG API.
Stars: ✭ 11 (-54.17%)
Mutual labels:  pubg, pubg-api
Camille
C# Riot API Library. Thread safe, automatic retries, autogenerated nightly releases.
Stars: ✭ 82 (+241.67%)
Mutual labels:  league-of-legends, league-api
MindCorpViewer
League Of Legends Model Viewer
Stars: ✭ 19 (-20.83%)
Mutual labels:  league-of-legends, leagueoflegends
leagueoflegends
A command-line interface for League of Legends Esports.
Stars: ✭ 28 (+16.67%)
Mutual labels:  riot, leagueoflegends
EpicResearch
Research about Epic Games' non-documented API
Stars: ✭ 181 (+654.17%)
Mutual labels:  fortnite, fortnite-api
fortnite-basic-api
Basic Fortnite API for stats with async/await, and basic communicator
Stars: ✭ 46 (+91.67%)
Mutual labels:  fortnite, fortnite-stats
node-epicgames-fortnite-client
Unofficial javascript client for Fortnite.
Stars: ✭ 55 (+129.17%)
Mutual labels:  fortnite, fortnite-stats
OddAutoWalker
League of Legends External Orb Walker
Stars: ✭ 56 (+133.33%)
Mutual labels:  league-of-legends, league-api
python-fortnite-api-wrapper
The Python Fortnite API Wrapper
Stars: ✭ 42 (+75%)
Mutual labels:  fortnite, fortnite-api
ChromaLeague
Java open-source Razer Chroma keyboard integration for League of Legends
Stars: ✭ 34 (+41.67%)
Mutual labels:  league-of-legends, leagueoflegends

game_apis

This repository is for integrating with different apis to allow you to pull player or game data

Install

You can install the api via pip via the command:
sudo python3 -m pip install game-apis

or if you are on windows:
pip install game-apis

Once it's installed you can do
from game_apis.rest import Rest

Config

There are 2 ways to do the config. The preferred way is to read from a config.yaml file as described below. Another way to do it is to pass a json to the Rest class with the same structure as the config.yaml file described below. Here's a simple example:

config_json = {'riot': {'key_id': '<hand enter key before running>'}}
riot = Rest(config_json).Riot

To use some of the REST Apis you need your keys in a config file (e.g. a file called config.yaml). You have the option of importing the config file locally with the local_config=True flag when instantiating an api, otherwise the path is relative to the directory where the api is installed.
Here's an example of the Rest Config:

opendota:
  key_id: null
riot:
  key_id: null
pubg:
  key_id: null
egb:
  key_id: null
  key_secret: null
riotesports:
  key_id: null
fortnitetracker:
  key_id: null

And an example of calling the api with a config file in the same directory as your project:
riot = Rest('config.yaml', local_config=True).Riot

A good way to see what should be in the config is by looking at the base class that loads the config file and seeing what keys it expects. Normally it'll look for the ID of the child class, which is a field on that child class, and then have the parameters that class needs as children of it in the confg.

The same thing is true for data_flow. You have the ID of the class lowercased (ID = 'AZUREBLOB_CREDS') and then as children of that in the config the fields it uses, for example self.config['account_name']. In this case you'd want:

  azureblob_creds:
    account_name: null

Run tests

To run all unit tests in a file do:
python3 -m unittest test.rest.test_open_dota

To run a specific unit test do:
python3 -m unittest test.rest.test_open_dota.TestOpenDota.test_get_lane_roles

Using API

Initialize the rest class with
api = Rest('<path to config.yaml>')

You can find the implemented apis with
api.lookup

An example usage of this repo is

from game_apis.rest import Rest

riot = Rest('config.yaml').Riot
hello = riot.hello_world()
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].