Skip to content

Commit a3c9c4e

Browse files
committed
add bits to v5
1 parent 9a2e2b2 commit a3c9c4e

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# -*- encoding: utf-8 -*-
2+
# https://dev.twitch.tv/docs/v5/reference/bits/
3+
4+
from twitch import keys
5+
from twitch.queries import V5Query as Qry
6+
from twitch.queries import query
7+
8+
9+
@query
10+
def cheermotes(channel_id=None):
11+
q = Qry('bits/actions')
12+
q.add_param(keys.CHANNEL_ID, channel_id, None)
13+
return q

resources/lib/twitch/keys.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
BROADCAST_TYPE = 'broadcast_type'
1111
BROADCASTS = 'broadcasts'
1212
CHANNEL = 'channel'
13+
CHANNEL_ID = 'channel_id'
1314
COMMUNITIES = 'communities'
1415
COMMUNITY_ID = 'community_id'
1516
CURSOR = 'cursor'

0 commit comments

Comments
 (0)