Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding text to widget #6

Open
Strooss opened this issue Mar 20, 2024 · 1 comment
Open

Adding text to widget #6

Strooss opened this issue Mar 20, 2024 · 1 comment

Comments

@Strooss
Copy link

Strooss commented Mar 20, 2024

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

@c4ldas
Copy link
Contributor

c4ldas commented Mar 20, 2024

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants