Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Add replicant with last events to streamelement service #494

Merged
merged 8 commits into from
Jul 15, 2022

Conversation

hlxid
Copy link
Member

@hlxid hlxid commented Mar 2, 2022

This is my take on replicants (#65) that I've shared on Discord before.
The bundle that wants a replicant creates it in the extension of the bundle and then calls a method on the service client that sets up handlers to feed data into it. That way the replicant is declared in the context of the bundle using the service, the name of the replicant is freely choosable and, most important, static.

To start I've added a replicant to the streamelements service that contains the last sub, last follow, last tip, etc. To show how the replicant can be used I've added a simple graphic to the streamelements-events sample bundle that gets the data from the replicant and displays it using vue.

TODO:

More replicants to other services should be added in followup PRs.

@hlxid hlxid self-assigned this Mar 2, 2022
hlxid added a commit that referenced this pull request Mar 2, 2022
`tsconfig.json` matched *all* tsconfig.json files but it was only meant for the tsconfig in the repository root.
Stumbled on this when I was adding tsconfigs for #494.
hlxid added a commit that referenced this pull request Mar 2, 2022
`tsconfig.json` matched *all* tsconfig.json files but it was only meant for the tsconfig in the repository root.
Stumbled on this when I was adding tsconfigs for #494.
@hlxid hlxid force-pushed the feat/65-replicant-streamelements branch from cd78ea8 to b42e44d Compare March 20, 2022 11:33
hlxid added a commit to codeoverflow-org/nodecg-io-docs that referenced this pull request Jun 20, 2022
Adds documentation on usage of service replicants like the
streamelements replicant that is added in codeoverflow-org/nodecg-io#494.
@hlxid hlxid marked this pull request as ready for review June 20, 2022 11:06
@sebinside sebinside self-requested a review June 20, 2022 11:33
Copy link
Member

@sebinside sebinside left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this approach regarding our discussion in #65 (I would even propose that this example could close that issue, too). The stream elements service is a good choice and the example is easy to understand and follow, regarding replicant usage and overall low-code possibilities with nodecg-io.

@hlxid hlxid linked an issue Jul 15, 2022 that may be closed by this pull request
@hlxid hlxid merged commit 8899bc2 into main Jul 15, 2022
@hlxid hlxid deleted the feat/65-replicant-streamelements branch July 15, 2022 20:49
hlxid added a commit to codeoverflow-org/nodecg-io-docs that referenced this pull request Jul 16, 2022
Adds documentation on usage of service replicants like the
streamelements replicant that is added in codeoverflow-org/nodecg-io#494.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Examine Usage Scenarios for Replicants in Services
2 participants