diff options
| author | Pinapelz <donaldshan1@outlook.com> | 2023-05-04 16:20:16 -0700 |
|---|---|---|
| committer | Pinapelz <donaldshan1@outlook.com> | 2023-05-04 16:20:16 -0700 |
| commit | 5cabfb535913f45e031013e9e7b98e65cacf4dcd (patch) | |
| tree | 2b8f0b4f73dc2a8edcc949bcf500cc0fede14a3f | |
| parent | ed1e2cbe77f93307f0f3bff736e14695a6c59163 (diff) | |
Implemented retrieving active channels in an organization
| -rw-r--r-- | webapi/holodex.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/webapi/holodex.py b/webapi/holodex.py index 9ecad60..89fcc14 100644 --- a/webapi/holodex.py +++ b/webapi/holodex.py @@ -12,6 +12,7 @@ class HolodexAPI(WebAPI): self.member_count = member_count self.organization = organization self._inactive_channels = [] + self._active_channels = [] def get_data_all_channels(self) -> list: """ @@ -28,6 +29,7 @@ class HolodexAPI(WebAPI): offset += 100 for channel in data: if channel['inactive'] is False: + self._active_channels.append(channel['id']) channel['description'] = self.get_channel_description(channel['id']) filtered_data.append(channel) else: @@ -53,3 +55,9 @@ class HolodexAPI(WebAPI): """ data = self._download_url(f"channels/{channel_id}") return data['description'] + + def get_active_channels(self) -> list: + """ + Gets the list of active channels + """ + return self._active_channels |
