Skip to content

Latest commit

 

History

History
166 lines (161 loc) · 5.26 KB

README.md

File metadata and controls

166 lines (161 loc) · 5.26 KB

xboxgamertag

Python module to get data from www.xboxgamertag.com

Usage

Installation

pip install xboxgamertag

Simple example

from xboxgamertag import gamertag

user = Gamertag('WoolDoughnut310') # My gamertag is WoolDoughnut310, by the way

# Get my amount of gamerscore
print(user.gamerscore)

# If you want to see how many games I have played in total
print(user.total_games_played)
class GamertagNotFoundError(Exception):
    pass
class xboxgamertag.Gamertag ( name )

Initializes the Gamertag class and returns an object

BASE_URL = "https://www.xboxgamertag.com"
icon

The url to the profile pic of the user
Returns str

gamertag

The full name of the user
Returns str

gamerscore

The amount of gamerscore the user has achieved in total
Returns int

total_games_played

The total amount of games played by the user
Returns int

games_completed

The total amount of games the user has completed
Returns int

games_played

All the games the user has played
Returns list of PlayedGame objects

class xboxgamertag.PlayedGame ( tr )

Initializes the PlayedGame class and returns an object

icon

The url to the profile pic of the game
Returns str

title

The full name of the game
Returns str

total_earned_gamerscore

The amount of gamerscore the user has achieved in the game in total
Returns int

total_unlocked_achievements

The total amount of achievements unlocked by the user in that game
Returns int