Channel feed¶
-
class
twitch.api.channel_feed.
ChannelFeed
¶ This class provides methods for easy access to Twitch Channel Feed API.
-
classmethod
get_posts
(channel_id, limit, cursor, comments)¶ Gets posts from a specified channel feed.
Parameters: - channel_id (string) – Channel ID
- limit (int) – Maximum number of objects to return. Default 10. Maximum 100.
- cursor (string) – Cursor of the next page
- comments (int) – Number of comments to return. Default 5. Maximum 5.
-
classmethod
get_post
(channel_id, post_id, comments)¶ Gets a specified post from a specified channel feed.
Parameters: - channel_id (string) – Channel ID
- post_id (string) – Post ID
- comments (int) – Number of comments to return. Default 5. Maximum 5.
>>> from twitch import TwitchClient >>> client = TwitchClient('<my client id>') >>> post = client.channel_feed.get_post('12345', '12345', comments=0)
-
classmethod
create_post
(channel_id, content, share)¶ Creates a post in a specified channel feed.
Parameters: - channel_id (string) – Channel ID
- content (string) – Content of the post
- share (boolean) – When set to true, the post is shared on the channel’s Twitter feed.
-
classmethod
delete_post
(channel_id, post_id)¶ Deletes a specified post in a specified channel feed.
Parameters: - channel_id (string) – Channel ID
- post_id (string) – Post ID
-
classmethod
create_reaction_to_post
(channel_id, post_id, emote_id)¶ Creates a reaction to a specified post in a specified channel feed.
Parameters: - channel_id (string) – Channel ID
- post_id (string) – Post ID
- emote_id (string) – Emote ID
-
classmethod
delete_reaction_to_post
(channel_id, post_id, emote_id)¶ Deletes a specified reaction to a specified post in a specified channel feed.
Parameters: - channel_id (string) – Channel ID
- post_id (string) – Post ID
- emote_id (string) – Emote ID
-
classmethod
get_post_comments
(channel_id, post_id, limit, cursor)¶ Gets all comments on a specified post in a specified channel feed.
Parameters: - channel_id (string) – Channel ID
- post_id (string) – Post ID
- limit (int) – Maximum number of objects to return. Default 10. Maximum 100.
- cursor (string) – Cursor of the next page
-
classmethod
create_post_comment
(channel_id, post_id, content)¶ Creates a comment to a specified post in a specified channel feed.
Parameters: - channel_id (string) – Channel ID
- post_id (string) – Post ID
- content (string) – Content of the comment
-
classmethod
delete_post_comment
(channel_id, post_id, comment_id)¶ Deletes a specified comment on a specified post in a specified channel feed.
Parameters: - channel_id (string) – Channel ID
- post_id (string) – Post ID
- comment_id (string) – Comment ID
-
classmethod
create_reaction_to_comment
(channel_id, post_id, comment_id, emote_id)¶ Creates a reaction to a specified comment on a specified post in a specified channel feed.
Parameters: - channel_id (string) – Channel ID
- post_id (string) – Post ID
- comment_id (string) – Comment ID
- emote_id (string) – Emote ID
-
classmethod
delete_reaction_to_comment
(channel_id, post_id, comment_id, emote_id)¶ Deletes a reaction to a specified comment on a specified post in a specified channel feed.
Parameters: - channel_id (string) – Channel ID
- post_id (string) – Post ID
- comment_id (string) – Comment ID
- emote_id (string) – Emote ID
-
classmethod