second commit
This commit is contained in:
@@ -4,7 +4,6 @@ from apiclient import APIClient, HeaderAuthentication, JsonResponseHandler
|
||||
from collection_json import Collection
|
||||
import json
|
||||
|
||||
|
||||
class ApiObject():
|
||||
rel = None
|
||||
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user