forked from platypush/platypush
Merge branch 'master' into 391/improve-youtube-support
This commit is contained in:
commit
81fb1a47c3
2 changed files with 13 additions and 0 deletions
Binary file not shown.
|
@ -360,6 +360,19 @@ class YoutubePlugin(Plugin):
|
||||||
json={'playlistId': id},
|
json={'playlistId': id},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@action
|
||||||
|
def is_subscribed(self, channel_id: str) -> bool:
|
||||||
|
"""
|
||||||
|
Check if the user is subscribed to a channel.
|
||||||
|
|
||||||
|
:param channel_id: YouTube channel ID.
|
||||||
|
:return: True if the user is subscribed to the channel, False otherwise.
|
||||||
|
"""
|
||||||
|
return self._request(
|
||||||
|
'subscribed',
|
||||||
|
params={'channelId': channel_id},
|
||||||
|
).get('subscribed', False)
|
||||||
|
|
||||||
@action
|
@action
|
||||||
def subscribe(self, channel_id: str):
|
def subscribe(self, channel_id: str):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue