Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.

players

Christian Cuevas edited this page Jul 16, 2017 · 9 revisions

What is the players function?

The players function allows for easy and simple retrieval of multiple players Vainglory history with their in-game name.

Usage:

The players function requires one parameter and has two optional parameters.

List of Parameters:

Parameters:

  • args

Args to filter with. Reference: https://developer.vainglorygame.com/docs#get-a-collection-of-players

  • region

Default: "na"
Options: "na", "eu", "sg", "ea", "sa"
The players region. Reference: https://developer.vainglorygame.com/docs#regions

  • toObject

Default: False
Options: True, False
If data should be returned as an object.

Examples

Getting players history with args:

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

Getting players history from a specific region:

   >>> 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, "eu")

Getting players history as an object:

   >>> 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, toObject=True)

Example Code

You can find example code here.

Data Samples

How data is received & given:

Before Wrapper

This is the JSON we get and process from gamelocker: open

After Wrapper

This is the dictionary you get from calling on players: open