Skip to content

Adding text to widget #6

Open
Open

Description

@Strooss

What is the endpoint (how) to add a text to a widget

Activity

  1. c4ldas commented on Mar 20, 2024

    @c4ldas
    Contributor

    There isn't an endpoint to add a text to a widget.
    You would need to get the current overlay and all widgets in there, and send the whole information with the modification to the overlay again.

    1 - Get the ID of the overlay you want to change from your overlay list
    https://dev.streamelements.com/docs/api-docs/b642d46bee583-channel

    2 - Get the details of your specific overlay
    https://dev.streamelements.com/docs/api-docs/af02de52998ec-channel-overlay-id

    3 - Modify what you want from the code you obtained from step above and send it back (Same endpoint as above, but using PUT request)
    Send the whole overlay information (with your modified data) as the body of the request
    https://dev.streamelements.com/docs/api-docs/af02de52998ec-channel-overlay-id

    4 - Reload the overlay (this is optional)
    https://dev.streamelements.com/docs/api-docs/8727ec48e284e-channel-reload

    If you want to do it via websocket, send the body to overlay:update, like:

    socket.emit('overlay:update', entireOverlayModified)

    I would recommend that you try it in a test overlay to see how it works, in order not to corrupt your original one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions