-
Notifications
You must be signed in to change notification settings - Fork 1
Vainglory
Apart from being an actual game Vainglory is a class in the gamelocker module. This class allows easy and simple retrieval of data from Mad Glory's gamelocker.
The Vainglory class contains everything and anything you'll need to retrieve data from gamelocker.
List of functions inside Vainglory:
The Vainglory class makes it easy and simple to retrieve the following data from Mad Glory's gamelocker.
The player function allows for easy and simple retrieval of a player's Vainglory history.
Example of usage:
>>> 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)
For a more detailed view please visit here.
The players function allows for easy and simple retrieval of multiple players Vainglory history.
Example of usage:
>>> import gamelocker
>>> api = gamelocker.Vainglory(api_key)
>>> args = {'filter[playerNames]': 'ClarkthyLord,AmethystCrow,BryceHi'} # Reference: https://developer.vainglorygame.com/docs#get-a-collection-of-players
>>> data = api.players(args)
For a more detailed view please visit here.
The match function allows easy and simple retrieval of a Vainglory match.
Example of usage:
>>> import gamelocker
>>> api = gamelocker.Vainglory(api_key)
>>> match_id = "dabda056-28a0-11e7-9456-063bc004098b" # Reference: https://developer.vainglorygame.com/docs#get-a-single-match
>>> data = api.match(match_id)
For a more detailed view please visit here.
The matches function allows for easy and simple retrieval of multiple Vainglory matches.
Example of usage:
>>> import gamelocker
>>> api = gamelocker.Vainglory(api_key)
>>> args = {'filter[createdAt-start]': '2017-01-22T00:00:00Z', 'page[limit]': '50', 'filter[playerNames]': 'ClarkthyLord', 'sort': '-createdAt'} # Reference: https://developer.vainglorygame.com/docs#get-a-collection-of-matches
>>> data = api.matches(args)
For a more detailed view please visit here.
The telemetry function allows for easy and simple retrieval of a matches telemetry data.
Example of usage:
>>> import gamelocker
>>> api = gamelocker.Vainglory(api_key)
>>> url = "https://gl-prod-us-east-1.s3.amazonaws.com/assets/semc-vainglory/na/2017/04/24/03/56/0d49a1f0-28a2-11e7-8720-0242ac11000a-telemetry.json"
>>> data = api.telemetry(url)
For a more detailed view please visit here.
The samples function allows for easy and simple retrieval of random Vainglory matches.
Example of usage:
>>> import gamelocker
>>> api = gamelocker.Vainglory(api_key)
>>> args = {"page[limit]": 50, "sort": "-createdAt"} # Reference: https://developer.vainglorygame.com/docs#samples
>>> data = api.samples(args)
For a more detailed view please visit here.
The dict_to_object function allows for dictionaries to be easily converted to objects.
Example of usage:
>>> import gamelocker
>>> api = gamelocker.Vainglory(api_key)
>>> dictionary = {"id"="123456789", "name"="ClarkthyLord"}
>>> data = api.dict_to_object(dictionary)
For a more detailed view please visit here.