Reference

/display

Updates and returns the new state of the display.

Optional Parameters:

Name Type Description
large_channel string Sets the channel name of the large screen.
This screen is the always visible main screen.
Set to empty to disable (see examples).
small_channel string Sets the channel name of the small screen.
This screen is a small Picture-in-Picture like screen in the top right corner.
Set to empty to disable (see examples).
volume float Sets the volume of the large screen.
Set to 0 or 0.0 to mute.
Values are in the range of 0.0 - 1.0.
Note: The small screen is always muted.
small_scale float Sets the scale (size) of the small screen.
The value is relative to the width of the large screen.
Reasonable values are in the range of 0.2 - 0.5.
It is best to just experiment with this setting.
show_chat bool Sets whether the chat should be shown or not.
Accepts true and false.

Note

All parameters are optional and can be combined. If none are supplied no updates are done and the current state gets returned.

Returns DisplayState.

Examples

/twitch

/twitch/getTopGames

Gets the most popular games on Twitch right now.

No Parameters

Returns Game array.

Examples

/twitch/searchGames

Searches games by query.

Parameters:

Name Type Description
query string What should be searched.
Required

Returns Game array.

Examples

/twitch/getTopStreams

Gets the most popular streams on Twitch right now. Optionally filter by channels, game and language.

Optional Parameters:

Name Type Description
channels string Specify up to 100 channels separated by , that the search should be limited to.
See the examples why that would be useful.
game string Specify a game that the search should be limited to.
language string Specify a language that the search should be limited to.

Note

All parameters are optional and can be combined. If none are supplied the top streams for all channels, games and languages are returned.

Returns Stream array.

Examples

/twitch/getFeaturedStreams

Gets the featured streams on Twitch's homepage.

No Parameters

Returns Stream array.

Examples

JSON Structures (by Example)

DisplayState

{
    "large_channel": "xqcow",
    "small_channel": "",
    "volume": 0.75,
    "small_scale": 0.25,
    "show_chat": true
}

Game

{
    "name": "Grand Theft Auto V",
    "viewers": 118716,
    "box_img_url": "https://static-cdn.jtvnw.net/ttv-boxart/Grand%20Theft%20Auto%20V-272x380.jpg",
    "logo_img_url": "https://static-cdn.jtvnw.net/ttv-logoart/Grand%20Theft%20Auto%20V-240x144.jpg"
}

Stream

{
    "average_fps": 60,
    "started_at": "2019-08-20T19:54:47Z",
    "game": "Fortnite",
    "preview_img_url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_tfue-640x360.jpg",
    "video_height": 1080,
    "viewers": 42870,
    "status": "High Kill Solos",
    "language": "en",
    "mature": false,
    "channel_name": "tfue",
    "channel_display_name": "Tfue",
    "channel_logo_img_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/2470b5c6-a737-4ba6-8987-c28e0ca839e1-profile_image-300x300.jpg"
}

Note

  • The image at the preview_img_url url updates itself every couple of seconds. If the app uses preview images it could also.
  • started_at is an ISO 8601 timestamp.
  • video_height: 1080 = HD, < 1080 = SD, > 1080 = UHD.
  • mature: If the stream is meant for mature audiences (set by the streamer themselves as a guideline).