From c89a233a96142ce01ecd5e1372c3fdce45c6601f Mon Sep 17 00:00:00 2001 From: Harmon Date: Wed, 17 Nov 2021 08:06:27 -0600 Subject: [PATCH] Add Space.ended_at and Space.topic_ids --- tweepy/space.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tweepy/space.py b/tweepy/space.py index 49c3cd2..93f2a80 100644 --- a/tweepy/space.py +++ b/tweepy/space.py @@ -9,9 +9,10 @@ from tweepy.utils import parse_datetime class Space(HashableID, DataMapping): __slots__ = ( - "data", "id", "state", "created_at", "host_ids", "lang", "is_ticketed", - "invited_user_ids", "participant_count", "scheduled_start", - "speaker_ids", "started_at", "title", "updated_at" + "data", "id", "state", "created_at", "ended_at", "host_ids", "lang", + "is_ticketed", "invited_user_ids", "participant_count", + "scheduled_start", "speaker_ids", "started_at", "title", "topic_ids", + "updated_at" ) def __init__(self, data): @@ -23,6 +24,10 @@ class Space(HashableID, DataMapping): if self.created_at is not None: self.created_at = parse_datetime(self.created_at) + self.ended_at = data.get("ended_at") + if self.ended_at is not None: + self.ended_at = parse_datetime(self.ended_at) + self.host_ids = data.get("host_ids", []) self.lang = data.get("lang") self.is_ticketed = data.get("is_ticketed") @@ -41,6 +46,8 @@ class Space(HashableID, DataMapping): self.title = data.get("title") + self.topic_ids = data.get("topic_ids", []) + self.updated_at = data.get("updated_at") if self.updated_at is not None: self.updated_at = parse_datetime(self.updated_at) -- 2.25.1