Incorporate pyteamsnap changes

This commit is contained in:
2022-06-25 09:06:43 -05:00
parent 266ea66971
commit a15ea940a2
4 changed files with 15 additions and 10 deletions

View File

@@ -13,7 +13,8 @@ def image_generator(request, team_id, event_id):
TOKEN = current_teamsnap_user.socialtoken_set.order_by("-expires_at").first().token
from pyteamsnap.api import Event, TeamSnap
from pyteamsnap.client import TeamSnap
from pyteamsnap.objects import Event
client = TeamSnap(token=TOKEN)
@@ -24,7 +25,7 @@ def image_generator(request, team_id, event_id):
def get_matchup_image(request, team_id, event_id, dimensions=None, background=None):
import io
from pyteamsnap.api import Location, Opponent, Team
from pyteamsnap.objects import Location, Opponent, Team
from .utils.gen_image import Location as ImagegenLocation
from .utils.gen_image import Team as ImagegenTeam
@@ -43,7 +44,8 @@ def get_matchup_image(request, team_id, event_id, dimensions=None, background=No
current_teamsnap_user.socialtoken_set.order_by("-expires_at").first().token
)
from pyteamsnap.api import Event, TeamSnap
from pyteamsnap.client import TeamSnap
from pyteamsnap.objects import Event
teamsnap = TeamSnap(token=ts_token)