Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wooldoughnut310/xboxgamertag

Python module to get data from www.xboxgamertag.com
https://github.com/wooldoughnut310/xboxgamertag

data gamertag html python3 requests xbox

Last synced: 21 days ago
JSON representation

Python module to get data from www.xboxgamertag.com

Awesome Lists containing this project

README

        

# xboxgamertag
Python module to get data from www.xboxgamertag.com

## Usage
#### Installation
`pip install xboxgamertag`
#### Simple example
```python
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)
```
```python
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