second commit

This commit is contained in:
2022-05-04 08:46:35 -05:00
parent 2e9ec4e70a
commit b6e28aa16a
9 changed files with 35 additions and 38 deletions

View File

@@ -4,7 +4,6 @@ from apiclient import APIClient, HeaderAuthentication, JsonResponseHandler
from collection_json import Collection
import json
class ApiObject():
rel = None

View File

@@ -1,21 +0,0 @@
from dataclasses import dataclass
from typing import Optional
from teamsnap.api import TeamSnap
from urllib.parse import urljoin
class Item:
id: int
type: str
data: dict = {}
def __init__(self, client:TeamSnap, rel, id, data: dict = {}):
self._client = client
self.type = rel
self.id = id
self._data = data
@property
def data(self):
if self._data: return self._data
else:
return self._client.get_item(self.type, self.id)