strimertül v4.0 API

# http/config

General server configuration
ServerConfig:
object {
  • bind:
    string
  • enable_static_server:
    boolean
  • path:
    string
  • kv_password:
    string
}

# loyalty/@create-redeem rpc

Create a new pending redeem
Redeem:
object {
  • Username of who redeemed the reward
    username:
    string
  • Display name of who redeemed the reward
    display_name:
    string
  • Reward that was redeemed
    reward:
    object {
    • Is the reward enabled (redeemable)?
      enabled:
      boolean
    • Reward ID
      id:
      string
    • Name of the reward
      name:
      string
    • Description of the reward
      description:
      string
    • Reward icon URL
      image:
      string
    • How much does is cost
      price:
      int
    • If present, reward requires user input and this field is the help text
      required_info:
      string
    • Time in seconds to wait before this reward can be redeemed again
      cooldown:
      int
    }
  • Time of the redeem
    when:
    datetime
  • If the reward required user input it will be here
    request_text:
    string
}

# loyalty/@remove-redeem rpc

Remove a redeem from the queue
Redeem:
object {
  • Username of who redeemed the reward
    username:
    string
  • Display name of who redeemed the reward
    display_name:
    string
  • Reward that was redeemed
    reward:
    object {
    • Is the reward enabled (redeemable)?
      enabled:
      boolean
    • Reward ID
      id:
      string
    • Name of the reward
      name:
      string
    • Description of the reward
      description:
      string
    • Reward icon URL
      image:
      string
    • How much does is cost
      price:
      int
    • If present, reward requires user input and this field is the help text
      required_info:
      string
    • Time in seconds to wait before this reward can be redeemed again
      cooldown:
      int
    }
  • Time of the redeem
    when:
    datetime
  • If the reward required user input it will be here
    request_text:
    string
}

# loyalty/config

General configuration for the loyalty system
Config:
object {
  • Enable the loyalty system
    enabled:
    boolean
  • Name of the currency
    currency:
    string
  • Settings for distributing currency to online viewers
    points:
    object {
    • How often to distribute points, in seconds
      interval:
      int
    • How many points to award every interval
      amount:
      int
    • Extra points for active chatters
      activity_bonus:
      int
    }
  • Usernames to exclude from currency distribution
    banlist:
    arrayOf [ string ]
}

# loyalty/ev/new-redeem event

On reward redeemed
Redeem:
object {
  • Username of who redeemed the reward
    username:
    string
  • Display name of who redeemed the reward
    display_name:
    string
  • Reward that was redeemed
    reward:
    object {
    • Is the reward enabled (redeemable)?
      enabled:
      boolean
    • Reward ID
      id:
      string
    • Name of the reward
      name:
      string
    • Description of the reward
      description:
      string
    • Reward icon URL
      image:
      string
    • How much does is cost
      price:
      int
    • If present, reward requires user input and this field is the help text
      required_info:
      string
    • Time in seconds to wait before this reward can be redeemed again
      cooldown:
      int
    }
  • Time of the redeem
    when:
    datetime
  • If the reward required user input it will be here
    request_text:
    string
}

# loyalty/goals

List of all goals
arrayOf [
Goal:
object {
  • Is the goal enabled?
    enabled:
    boolean
  • Community goal ID
    id:
    string
  • Name of the community goal
    name:
    string
  • Description of the goal
    description:
    string
  • Goal icon URL
    image:
    string
  • How many points does the goal need to be met in total
    total:
    int
  • How many points have been contributed so far
    contributed:
    int
  • Dictionary of how much every viewer has contributed
    contributors:
    dictionary
    < string,
    int64:
    int
    >
}
]

# loyalty/points/<user>

Point entry for a given user
PointsEntry:
object {
  • Currency balance
    points:
    int
}

# loyalty/redeem-queue

All pending redeems
arrayOf [
Redeem:
object {
  • Username of who redeemed the reward
    username:
    string
  • Display name of who redeemed the reward
    display_name:
    string
  • Reward that was redeemed
    reward:
    object {
    • Is the reward enabled (redeemable)?
      enabled:
      boolean
    • Reward ID
      id:
      string
    • Name of the reward
      name:
      string
    • Description of the reward
      description:
      string
    • Reward icon URL
      image:
      string
    • How much does is cost
      price:
      int
    • If present, reward requires user input and this field is the help text
      required_info:
      string
    • Time in seconds to wait before this reward can be redeemed again
      cooldown:
      int
    }
  • Time of the redeem
    when:
    datetime
  • If the reward required user input it will be here
    request_text:
    string
}
]

# loyalty/rewards

List of available rewards
arrayOf [
Reward:
object {
  • Is the reward enabled (redeemable)?
    enabled:
    boolean
  • Reward ID
    id:
    string
  • Name of the reward
    name:
    string
  • Description of the reward
    description:
    string
  • Reward icon URL
    image:
    string
  • How much does is cost
    price:
    int
  • If present, reward requires user input and this field is the help text
    required_info:
    string
  • Time in seconds to wait before this reward can be redeemed again
    cooldown:
    int
}
]

# strimertul/@log rpc

Add a log entry
ExternalLog:
object {
  • level:
    enum ( debug | info | warn | error )
  • message:
    string
  • data:
    dictionary
    < string, unknown >
}

# strimertul/version

Strimertul version (semantic version, e.g. v3.4.0-alpha.1)
string

# twitch/alerts/config

Configuration of chat alerts
Config:
object {
  • follow:
    object {
    • Enable chat message alert on follow
      enabled:
      boolean
    • List of message to write on follow, one at random will be picked
      messages:
      arrayOf [ string ]
    • If true, send as announcement
      announce:
      boolean
    }
  • subscription:
    object {
    • Enable chat message alert on subscription
      enabled:
      boolean
    • List of message to write on subscription, one at random will be picked
      messages:
      arrayOf [ string ]
    • If true, send as announcement
      announce:
      boolean
    • variations:
      arrayOf [
      subscriptionVariation:
      object {
      • Minimum streak to get this message
        min_streak * :
        int
      • If true, only gifted subscriptions will get these messages
        is_gifted * :
        boolean
      • List of message to write on subscription, one at random will be picked
        messages:
        arrayOf [ string ]
      }
      ]
    }
  • gift_sub:
    object {
    • Enable chat message alert on gifted subscription
      enabled:
      boolean
    • List of message to write on gifted subscription, one at random will be picked
      messages:
      arrayOf [ string ]
    • If true, send as announcement
      announce:
      boolean
    • variations:
      arrayOf [
      giftSubVariation:
      object {
      • Minimum cumulative amount to get this message
        min_cumulative * :
        int
      • If true, only anonymous gifts will get these messages
        is_anonymous * :
        boolean
      • List of message to write on gifted subscription, one at random will be picked
        messages:
        arrayOf [ string ]
      }
      ]
    }
  • raid:
    object {
    • Enable chat message alert on raid
      enabled:
      boolean
    • List of message to write on raid, one at random will be picked
      messages:
      arrayOf [ string ]
    • If true, send as announcement
      announce:
      boolean
    • variations:
      arrayOf [
      raidVariation:
      object {
      • Minimum number of viewers to get this message
        min_viewers * :
        int
      • List of message to write on raid, one at random will be picked
        messages:
        arrayOf [ string ]
      }
      ]
    }
  • cheer:
    object {
    • Enable chat message alert on cheer
      enabled:
      boolean
    • List of message to write on cheer, one at random will be picked
      messages:
      arrayOf [ string ]
    • If true, send as announcement
      announce:
      boolean
    • variations:
      arrayOf [
      cheerVariation:
      object {
      • Minimum amount to get this message
        min_amount * :
        int
      • List of message to write on cheer, one at random will be picked
        messages:
        arrayOf [ string ]
      }
      ]
    }
}

# twitch/auth-keys

User access token for the twitch subsystem
AuthResponse:
object {
  • access_token:
    string
  • refresh_token:
    string
  • expires_in:
    int
  • scope:
    arrayOf [ string ]
  • Time:
    datetime
}

# twitch/chat/@send-message rpc

Send chat message with extra options (as reply, whisper, etc)
WriteMessageRequest:
object {
  • Chat message to send
    message:
    string
  • If specified, send as reply to a message ID
    reply_to:
    string
  • If specified, send as whisper to user ID
    whisper_to:
    string
  • If true, send as announcement
    announce:
    boolean
}

# twitch/chat/activity

Number of chat messages in the last minute
int

# twitch/chat/chatter-account

User access token for the chat account (if not using the main one)
AuthResponse:
object {
  • access_token:
    string
  • refresh_token:
    string
  • expires_in:
    int
  • scope:
    arrayOf [ string ]
  • Time:
    datetime
}

# twitch/chat/config

Configuration for chat-related features
Config:
object {
  • Global command cooldown in seconds
    command_cooldown:
    int
}

# twitch/chat/custom-commands

Chat custom commands
dictionary
< string,
CustomCommand:
object {
  • Command description
    description:
    string
  • Minimum access level needed to use the command
    access_level:
    enum ( everyone | subscriber | vip | moderators | streamer )
  • Response template (in Go templating format)
    response:
    string
  • Is the command enabled?
    enabled:
    boolean
  • How to respond to the user
    response_type:
    enum ( chat | reply | whisper | announce )
}
>

# twitch/config

General configuration for the Twitch subsystem
Config:
object {
  • Enable subsystem
    enabled:
    boolean
  • Twitch API App Client ID
    api_client_id:
    string
  • Twitch API App Client Secret
    api_client_secret:
    string
}

# twitch/ev/eventsub-event/[event-name] event

On Eventsub event [event-name] received
NotificationMessagePayload:
object {
  • subscription:
    object {
    • id:
      string
    • type:
      string
    • version:
      string
    • status:
      string
    • condition:
      object {
      • broadcaster_user_id:
        string
      • from_broadcaster_user_id:
        string
      • moderator_user_id:
        string
      • to_broadcaster_user_id:
        string
      • reward_id:
        string
      • client_id:
        string
      • extension_client_id:
        string
      • user_id:
        string
      }
    • transport:
      object {
      • method:
        string
      • callback:
        string
      • secret:
        string
      • session_id:
        string
      }
    • created_at:
      object {
      • Time:
        datetime
      }
    • cost:
      int
    }
  • event:
    arrayOf [
    uint8:
    int
    ]
  • date:
    datetime
}

# twitch/eventsub-history/[event-name] history

Last eventsub notifications received for [event-name]
arrayOf [
NotificationMessagePayload:
object {
  • subscription:
    object {
    • id:
      string
    • type:
      string
    • version:
      string
    • status:
      string
    • condition:
      object {
      • broadcaster_user_id:
        string
      • from_broadcaster_user_id:
        string
      • moderator_user_id:
        string
      • to_broadcaster_user_id:
        string
      • reward_id:
        string
      • client_id:
        string
      • extension_client_id:
        string
      • user_id:
        string
      }
    • transport:
      object {
      • method:
        string
      • callback:
        string
      • secret:
        string
      • session_id:
        string
      }
    • created_at:
      object {
      • Time:
        datetime
      }
    • cost:
      int
    }
  • event:
    arrayOf [
    uint8:
    int
    ]
  • date:
    datetime
}
]

# twitch/stream-info

List of active twitch streams (1 element if live, 0 otherwise)
arrayOf [
Stream:
object {
  • id:
    string
  • user_id:
    string
  • user_login:
    string
  • user_name:
    string
  • game_id:
    string
  • game_name:
    string
  • tag_ids:
    arrayOf [ string ]
  • tags:
    arrayOf [ string ]
  • is_mature:
    boolean
  • type:
    string
  • title:
    string
  • viewer_count:
    int
  • started_at:
    datetime
  • language:
    string
  • thumbnail_url:
    string
}
]

# twitch/timers/config

Configuration of chat timers
Config:
object {
  • List of timers as a dictionary
    timers:
    dictionary
    < string,
    ChatTimer:
    object {
    • Enable the timer
      enabled:
      boolean
    • Timer name (must be unique)
      name:
      string
    • Minimum chat messages in the last 5 minutes for timer to trigger
      minimum_chat_activity:
      int
    • Minimum amount of time (in seconds) that needs to pass before it triggers again
      minimum_delay:
      int
    • Messages to write (randomly chosen)
      messages:
      arrayOf [ string ]
    • If true, send as announcement
      announce:
      boolean
    }
    >
}