-
Notifications
You must be signed in to change notification settings - Fork 1
player
The player function allows for easy and simple retrieval of a player's Vainglory history with their id.
The player function requires one parameter and has two optional parameters.
List of Parameters:
The player's id. Reference: https://developer.vainglorygame.com/docs#get-a-single-player
Default: "na"
Options: "na", "eu", "sg", "ea", "sa"
The player's region. Reference: https://developer.vainglorygame.com/docs#regions
Default: False
Options: True, False
If data should be returned as an object.
Getting player's history with player_id:
>>> import gamelocker
>>> api = gamelocker.Vainglory(api_key)
>>> player_id = "99b050b8-cd6b-11e5-b233-06eb725f8a76" # Reference: https://developer.vainglorygame.com/docs#get-a-single-player
>>> data = api.player(player_id)
Getting player's history from a specific region:
>>> import gamelocker
>>> api = gamelocker.Vainglory(api_key)
>>> player_id = "99b050b8-cd6b-11e5-b233-06eb725f8a76" # Reference: https://developer.vainglorygame.com/docs#get-a-single-player
>>> data = api.player(player_id, "eu")
Getting player's history as an object:
>>> import gamelocker
>>> api = gamelocker.Vainglory(api_key)
>>> player_id = "99b050b8-cd6b-11e5-b233-06eb725f8a76" # Reference: https://developer.vainglorygame.com/docs#get-a-single-player
>>> data = api.player(player_id, toObject=True)
You can find example code here.
How data is received & given:
This is the JSON we get and process from gamelocker: open
This is the dictionary you get from calling on player: open