Skip to content

Commit 015aff0

Browse files
committed
add _by_id to videos for additional video information ie. restrictions
1 parent 6db1514 commit 015aff0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

resources/lib/twitch/api/v5/videos.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from twitch import keys
55
from twitch.api.parameters import BroadcastType, Period
66
from twitch.queries import V5Query as Qry
7+
from twitch.queries import HiddenApiQuery as HQry
78
from twitch.queries import query
89

910

@@ -35,3 +36,12 @@ def get_followed(limit=10, offset=0, broadcast_type=BroadcastType.HIGHLIGHT):
3536
q.add_param(keys.OFFSET, offset, 0)
3637
q.add_param(keys.BROADCAST_TYPE, BroadcastType.validate(broadcast_type))
3738
return q
39+
40+
41+
# required scope: none
42+
# undocumented / unsupported
43+
@query
44+
def _by_id(video_id):
45+
q = HQry('videos/{video_id}')
46+
q.add_urlkw(keys.VIDEO_ID, video_id)
47+
return q

0 commit comments

Comments
 (0)