made GameProfile printable
This commit is contained in:
parent
1bcb79392e
commit
46ef53496c
1 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
import json
|
||||
from math import sqrt
|
||||
from enum import Enum
|
||||
from dataclasses import dataclass
|
||||
|
@ -32,6 +33,12 @@ class GameProfile:
|
|||
id : str
|
||||
name : str
|
||||
|
||||
def __str__(self):
|
||||
return json.dumps(self.as_dict(), indent=2)
|
||||
|
||||
def __repr__(self):
|
||||
return f"GameProfile(id='{self.id}', name='{self.name}')"
|
||||
|
||||
def as_dict(self):
|
||||
return {
|
||||
"id": self.id,
|
||||
|
|
Loading…
Reference in a new issue