summaryrefslogtreecommitdiff
path: root/ffxiv/pystone/character.py
diff options
context:
space:
mode:
Diffstat (limited to 'ffxiv/pystone/character.py')
-rw-r--r--ffxiv/pystone/character.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/ffxiv/pystone/character.py b/ffxiv/pystone/character.py
new file mode 100644
index 0000000..200baeb
--- /dev/null
+++ b/ffxiv/pystone/character.py
@@ -0,0 +1,20 @@
+from typing import List, Optional, Tuple
+
+from requests import Session
+
+from pystone.definition import Definition
+
+
+class Character:
+ def __init__(self, *, definitions: List[Definition]):
+ self.definitions = {(x.name): x for x in definitions}
+
+ def __getattr__(self, name):
+ if name in self.definitions:
+ return self.definitions[name]
+
+ def to_json(self):
+ json = {}
+ for definition in self.definitions.values():
+ json.update(definition.to_json())
+ return json