TwitchApi.Moderation.GetBannedEvents (TwitchApi v0.1.2) View Source

⛔ This module is autogenerated please do not modify manually.

Example request from twitch api docs:

descriptions:

Returns all bans and un-bans for broadcaster 198704263.

requests:

curl -X GET 'https://api.twitch.tv/helix/moderation/banned/events?broadcaster_id=198704263'
-H'Authorization: Bearer cfabdegwdoklmawdzdo98xt2fo512y'
-H'Client-Id: uo6dggojyb8d6soh92zknwmi5ej1q2'

Example response from twitch api docs:

descriptions:

responses:

{"data":[{"id":"1IPFqAb0p0JncbPSTEPhx8JF1Sa","event_type":"moderation.user.ban","event_timestamp":"2019-03-13T15:55:14Z","version":"1.0","event_data":{"broadcaster_id":"198704263","broadcaster_login":"racageneg","broadcaster_name":"racageneg","user_id":"424596340","user_login":"quotrok","user_name":"quotrok","expires_at":"","reason":"Does not like pineapple on pizza.","moderator_id":"141981764","moderator_login":"twitchdev","moderator_name":"TwitchDev"}},{"id":"1IPFsDv5cs4mxfJ1s2O9Q5flf4Y","event_type":"moderation.user.unban","event_timestamp":"2019-03-13T15:55:30Z","version":"1.0","event_data":{"broadcaster_id":"198704263","broadcaster_login":"racageneg","broadcaster_name":"racageneg","user_id":"424596340","user_login":"quotrok","user_name":"quotrok","expires_at":"","reason":"Does not like pineapple on pizza.","moderator_id":"141981764","moderator_login":"twitchdev","moderator_name":"TwitchDev"}},...],"pagination":{"cursor":"eyJiIjpudWxsLCJhIjp7IkN1cnNvciI6IjE5OTYwNDI2MzoyMDIxMjA1MzE6MUlQRnFtbHU5VzJxNG1YWGpVTHlNOHpYMHJiIn19"}}

Link to this section Summary

Types

Cursor for forward pagination: tells the server where to start fetching the next set of results in a multi-page response. This applies only to queries without user_id. If a user_id is specified, it supersedes any cursor/offset combinations. The cursor value specified here is from the pagination response field of a prior query.

Provided broadcaster_id must match the user_id in the OAuth token.

Maximum number of objects to return.Maximum: 100.Default: 20.

Filters the results to only include users being banned or un-banned in the specified channel based on their user ID.Multiple user IDs can be provided, e.g. /moderation/banned/events?broadcaster_id=1&user_id=2&user_id=3Maximum: 100.

Map containing the user needed information for the fetch of the required user OAuth access token. You will be able to choose from one way or the other for fetching previously OAuth access tokens. :user_id field contains the user ID from twitch, e.g. 61425548 or "61425548" :user_name field constains the user name from twitch, e.g. "hiimkamiyuzu"

Functions

Description:

Returns all user ban and un-ban events for a channel.

Link to this section Types

Specs

after_query_param() :: %{after_query_param: String.t()}

Cursor for forward pagination: tells the server where to start fetching the next set of results in a multi-page response. This applies only to queries without user_id. If a user_id is specified, it supersedes any cursor/offset combinations. The cursor value specified here is from the pagination response field of a prior query.

Specs

broadcaster_id() :: %{broadcaster_id: String.t()}

Provided broadcaster_id must match the user_id in the OAuth token.

Specs

first() :: %{first: String.t()}

Maximum number of objects to return.Maximum: 100.Default: 20.

Specs

user_id() :: %{user_id: String.t()}

Filters the results to only include users being banned or un-banned in the specified channel based on their user ID.Multiple user IDs can be provided, e.g. /moderation/banned/events?broadcaster_id=1&user_id=2&user_id=3Maximum: 100.

Specs

user_info() :: %{user_id: integer() | binary()} | %{user_name: binary()}

Map containing the user needed information for the fetch of the required user OAuth access token. You will be able to choose from one way or the other for fetching previously OAuth access tokens. :user_id field contains the user ID from twitch, e.g. 61425548 or "61425548" :user_name field constains the user name from twitch, e.g. "hiimkamiyuzu"

Link to this section Functions

Specs

call(broadcaster_id() | user_id() | after_query_param() | first(), user_info()) ::
  {:ok, Finch.Response.t()} | {:error, Exception.t()}

Description:

Returns all user ban and un-ban events for a channel.

Required authentication:

Required authorization:

OAuth token requiredRequired Scope: moderation:read