Interface TwitchExtensions

All Known Implementing Classes:
TwitchExtensionsCompatibilityLayer

@Deprecated @ScheduledForRemoval(inVersion="2.0.0") public interface TwitchExtensions
Deprecated.
the Extensions API traditionally uses the decommissioned Kraken API. While the module now forwards calls to Helix, please migrate to using Helix directly as this module will be removed in the future.
Twitch - Extensions API
See Also:
  • Method Details

    • createExtensionSecret

      com.netflix.hystrix.HystrixCommand<ExtensionSecretList> createExtensionSecret(String clientId, String jsonWebToken, int activationDelaySeconds)
      Deprecated.
      Creates a new secret for a specified extension, identified by a client ID value assigned to the extension when it is created. Also rotates any current secrets out of service, with enough time for extension clients to gracefully switch over to the new secret.

      Use this function only when you are ready to install the new secret it returns.

      Note: You get the initial secret via the Twitch developer site. Use this endpoint to rotate the secret later, if desired.

      Parameters:
      clientId - The extension's client ID.
      jsonWebToken - Signed JWT created by the EBS, following the requirements documented in “Signing the JWT” (in Building Extensions).
      activationDelaySeconds - The delay period, between the generation of the new secret and its use by Twitch, is specified by this required parameter. Default (and minimum): 300 (5 minutes).
      Returns:
      ExtensionSecretList
    • getExtensionSecret

      com.netflix.hystrix.HystrixCommand<ExtensionSecretList> getExtensionSecret(String clientId, String jsonWebToken)
      Deprecated.
      Retrieves a specified extension’s secret data: a version and an array of secret objects.
      Parameters:
      clientId - The extension is identified by a client ID value assigned to the extension when it is created.
      jsonWebToken - Signed JWT created by the EBS, following the requirements documented in “Signing the JWT” (in Building Extensions).
      Returns:
      ExtensionSecretList
    • revokeExtensionSecrets

      @Deprecated com.netflix.hystrix.HystrixCommand<Void> revokeExtensionSecrets(String clientId, String jsonWebToken)
      Deprecated.
      No migration path in the new Helix API.
      Deletes all secrets associated with a specified extension, identified by a client ID value assigned to the extension when it is created.

      This immediately breaks all clients until both a new Create Extension Secret is executed and the clients manually refresh themselves. Use this only if a secret is compromised and must be removed immediately from circulation.

      Parameters:
      clientId - The client ID identifying the extension when it is created.
      jsonWebToken - Signed JWT created by the EBS, following the requirements documented in “Signing the JWT” (in Building Extensions)
      Returns:
      204 No Content on a successful call
    • getLiveChannelsWithExtensionActivated

      com.netflix.hystrix.HystrixCommand<ChannelList> getLiveChannelsWithExtensionActivated(String clientId, String cursor)
      Deprecated.
      Returns one page of live channels that have installed and activated a specified extension.

      A channel that just went live may take a few minutes to appear in this list, and a channel may continue to appear on this list for a few minutes after it stops broadcasting.

      Parameters:
      clientId - The client ID value assigned to the extension when it is created.
      cursor - Cursor for forward pagination.
      Returns:
      ChannelList
    • getLiveChannelsWithExtensionActivated

      @Deprecated default com.netflix.hystrix.HystrixCommand<ChannelList> getLiveChannelsWithExtensionActivated(String clientId)
      Deprecated.
      use getLiveChannelsWithExtensionActivated(String, String) instead (can pass null for cursor)
      Returns one page of live channels that have installed and activated a specified extension.
      Parameters:
      clientId - The client ID value assigned to the extension when it is created.
      Returns:
      ChannelList
    • setExtensionRequiredConfiguration

      com.netflix.hystrix.HystrixCommand<Void> setExtensionRequiredConfiguration(String clientId, String jsonWebToken, String extensionVersion, String channelId, String requiredConfiguration)
      Deprecated.
      Enable activation of a specified extension, after any required broadcaster configuration is correct.

      This is for extensions that require broadcaster configuration before activation. Use this if, in extension Capabilities, you select Custom/My Own Service.

      You enforce required broadcaster configuration with a required_configuration string in the extension manifest. The contents of this string can be whatever you want. Once your EBS determines that the extension is correctly configured on a channel, use this endpoint to provide that same configuration string, which enables activation on the channel.

      If a future version of the extension requires a different configuration, change the required_configuration string in your manifest. When the new version is released, broadcasters will be required to re-configure that new version.

      Parameters:
      clientId - The extension is identified by a client ID value assigned to the extension when it is created.
      jsonWebToken - Signed JWT created by the EBS, following the requirements documented in “Signing the JWT” (in Building Extensions).
      extensionVersion - The extension version.
      channelId - The channel id for the broadcaster.
      requiredConfiguration - The required configuration.
      Returns:
      204 No Content on a successful call
    • setExtensionConfigurationSegment

      com.netflix.hystrix.HystrixCommand<Void> setExtensionConfigurationSegment(String clientId, String jsonWebToken, ExtensionConfigurationSegment configurationSegment)
      Deprecated.
      Sets a single configuration segment (any type). The segment type is specified by a required body parameter.

      Each segment is limited to 5 KB and can be set at most 20 times per minute. Updates to this data are not delivered to Extensions that have already rendered.

      Note: Your signed JWT must include the exp, user_id, and role fields, documented in JWT Schema. The role value must be external.

      Parameters:
      clientId - The client ID identifying the extension when it is created.
      jsonWebToken - Signed JWT created by the EBS, following the requirements documented in “Signing the JWT” (in Building Extensions).
      configurationSegment - The updated configuration segment.
      Returns:
      204 No Content on a successful call
    • getExtensionChannelConfiguration

      com.netflix.hystrix.HystrixCommand<Map<String,ConfigurationSegment>> getExtensionChannelConfiguration(String clientId, String jsonWebToken, String channelId)
      Deprecated.
      Gets the developer and broadcaster configuration segments for a specified channel.

      Each channel can be retrieved at most 20 times per minute.

      Note: Your signed JWT must include the exp, user_id, and role fields, documented in JWT Schema. The role value must be external.

      Parameters:
      clientId - The client ID identifying the extension when it is created.
      jsonWebToken - Signed JWT created by the EBS, following the requirements documented in “Signing the JWT” (in Building Extensions).
      channelId - The channel id of the broadcaster.
      Returns:
      Map
    • getExtensionConfigurationSegment

      com.netflix.hystrix.HystrixCommand<Map<String,ConfigurationSegment>> getExtensionConfigurationSegment(String clientId, String jsonWebToken, ConfigurationSegmentType segmentType, String channelId)
      Deprecated.
      Gets a broadcaster or developer configuration segment for a specified channel, or the global configuration segment.

      Each segment can be retrieved at most 20 times per minute.

      Note: Your signed JWT must include the exp, user_id, and role fields, documented in JWT Schema. The role value must be external.

      Parameters:
      clientId - The client ID identifying the extension when it is created.
      jsonWebToken - Signed JWT created by the EBS, following the requirements documented in “Signing the JWT” (in Building Extensions).
      segmentType - The segment type.
      channelId - The channel id of the broadcaster (must be null for ConfigurationSegmentType.GLOBAL).
      Returns:
      Map
    • sendExtensionPubSubMessage

      com.netflix.hystrix.HystrixCommand<Void> sendExtensionPubSubMessage(String clientId, String jsonWebToken, String channelId, String message, String targets)
      Deprecated.
      Twitch provides a publish-subscribe system for your EBS to communicate with both the broadcaster and viewers. Calling this endpoint forwards your message using the same mechanism as the send JavaScript helper function. A message can be sent to either a specified channel or globally (all channels on which your extension is active).

      Note: Your signed JWT must include the channel_id and pubsub_perms fields, documented in JWT Schema.

      Parameters:
      clientId - The client ID identifying the extension when it is created.
      jsonWebToken - Signed JWT (Twitch or EBS JWTs are allowed)
      channelId - Either a specific channel's ID or "all"
      message - Your message to be sent.
      targets - Valid values: "broadcast", "global".
      Returns:
      204 No Content on a successful call
    • sendExtensionChatMessage

      com.netflix.hystrix.HystrixCommand<Void> sendExtensionChatMessage(String clientId, String jsonWebToken, String extensionVersion, String channelId, String text)
      Deprecated.
      Sends a specified chat message to a specified channel. The message will appear in the channel’s chat as a normal message. The “username” of the message is the extension name you specified when you created the extension.

      There is a limit of 12 messages per minute, per channel. Extension chat messages use the same rate-limiting functionality as the New Twitch API (see Rate Limits). The maximum message size is 280 characters.

      The channel_id inside the JWT must match the channel ID in the request URL.

      Parameters:
      clientId - The client ID identifying the extension when it is created.
      jsonWebToken - Signed JWT created by the EBS, following the requirements documented in Signing the JWT (in Building Extensions) or Twitch JWT containing the "broadcaster" role.
      extensionVersion - The extension version.
      channelId - The id of the channel to send the message to.
      text - The message to be sent.
      Returns:
      204 No Content on a successful call
    • getExtensionInformation

      @Unofficial com.netflix.hystrix.HystrixCommand<ExtensionInformation> getExtensionInformation(String clientId)
      Deprecated.
      Get Extension Information
      Parameters:
      clientId - The client ID value assigned to the extension when it is created.
      Returns:
      ExtensionInformation
      See Also: