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

@@ -1,2 +0,0 @@
token="u2SqDq78FumVvhkt1D-V1CQ2ZIaB-nUVlzGwd1YhGtA"
team_id = 7644001

View File

@@ -1,21 +1,18 @@
import unittest
from credentials import team_id as TEAM_ID
from credentials import token as TOKEN
from teamsnap import TeamSnap
from teamsnap.models import Item
from teamsnap.api import Team, Event, Availability, Me, ApiObject
import teamsnap
TEAM_ID = 7644001
EVENT_1 = 239261604
from os import getenv
c = TeamSnap(token=TOKEN)
es = Event.search(c, team_id=TEAM_ID)
q1 = c.query("events", "search", team_id=TEAM_ID)
team = c.teams.get(TEAM_ID)
event = Item(client=c, rel="events", id=EVENT_1)
# event = c.events.get(239261604)
col = c.get_collection(rel="events", id=EVENT_1)
print(event.data)
TEAMSNAP_TOKEN = getenv('TEAMSNAP_TOKEN')
TEAMSNAP_TEAM = getenv('TEAMSNAP_TEAM')
TEAMSNAP_EVENT = getenv('TEAMSNAP_EVENT')
c = TeamSnap(token=TEAMSNAP_TOKEN)
es = Event.search(c, team_id=TEAMSNAP_TEAM)
q1 = c.query("events", "search", team_id=TEAMSNAP_TEAM)
team = c.teams.get(TEAMSNAP_TEAM)
event = c.events.get(TEAMSNAP_EVENT)
col = c.get_collection(rel="events", id=TEAMSNAP_TEAM)
pass
# q2 = c.events.search(team_id=TEAM_ID)
# a = c.availabilities.search(event_id=q2[0]['id'])