I propose to modify your request as follows:
Unauthenticated
- Endpoint: https://api.twitch.tv/kraken/channels/{TestChannel}/BanInfo
- Method: GET
- Pupose: Allows any user to check their timeout/ban against a channel - This endpoint is restricted to the current user, it checks the current users credentials against the test channel for timeout/ban status
- Fields
a) Datetime of ban/timeout
b) Length of timeout (0/null for ban)
Authenticated
[List of users]
- Endpoint: https://api.twitch.tv/kraken/channels/{TestChannel}/BanInfo?limit=100&offset=0
- Method: GET
- Required Scope: channel_blocks_read
- Purpose: Gets a list of all users banned/timeout (paged)
- Fields (All fields related to banned/timed out user
a) UserID
b) Channel name
c) Datetime of ban/timeout creation (UTC)
d) Ban type (timeout, ban)
e) Length (0/null for ban)
(Dropped ‘Active’, this endpoint should not track historical bans IMO)
[Single User]
- Endpoint: https://api.twitch.tv/kraken/channels/{TestChannel}/BanInfo/{CheckUser}
- Method: GET
- Required Scope: channel_blocks_read
- Purpose: Checks if designated user is timed out/banned, null if the user is not timed out/banned (NULL if not timedout/banned)
- Fields (All fields related to banned/timed out user
a) UserID
b) Channel name
c) Datetime of ban/timeout creation (UTC)
d) Ban type (timeout, ban)
e) Length (0/null for ban)
(Dropped ‘Active’, this endpoint should not track historical bans IMO)
[Timeout/Ban new user]
- Endpoint: https://api.twitch.tv/kraken/channels/{TestChannel}/BanInfo
- Method: POST
- Required Scope: channel_blocks_write
- Purpose: Bans / times out a user from the channel
- Input data:
a) Channel Name
b) Ban type (timeout/ban)
c) Length (If timeout, 0/null for ban)
A possible edit to the Timeout/Ban POST request would be taking a List(ban user json object) so that you can bulk ban users. Practical use for this would likely be mostly related to events? Ideally the timeout/ban endpoint could take a twitch user id, or channel name based on something like (_id=####, name=somename) [one or the other needs to be populated, not both]
Reasoning for using channel_blocks_(read|write): Currently the users ignore list uses user_blocks_(read, write) so an ignored user for a ‘channel’ is timeout/banned.