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

feat(integrations): extra life variables #2343

Merged
merged 11 commits into from
Jan 9, 2024
Merged

feat(integrations): extra life variables #2343

merged 11 commits into from
Jan 9, 2024

Conversation

Firebottle
Copy link
Collaborator

@Firebottle Firebottle commented Jan 7, 2024

Handles #2229

Description of the Change

This adds several new variables specifically for extra life. All of these have a "easy mode" where it'll just output a string with the information for easy display. However, you can also pass an argument to just get the JSON back for advanced usage.

extraLifeInfo = allows a user to basically get any extra life profile info. This includes things like goal amounts, avatarURL, etc.
extraLifeMilestones = allows the user to get milestone information.
extraLifeDonations = allows the user to get donation information.
extraLifeIncentives = allows the user to get incentive information.

Applicable Issues

  • All of these work, but I believe milestones and incentives could be made much better than what I have here.
  • The node module has a "where" filter in it's docs, but I could never get a call to go through using it. If we could figure that out the code could be simplified quite a bit.

Testing

Chat commands with each of these variables.

@Firebottle Firebottle self-assigned this Jan 7, 2024
Copy link
Member

@ebiggz ebiggz left a comment

Choose a reason for hiding this comment

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

Awesome work on this!!

I would suggest an organizational tweak: move these variables into the /integrations/builtin/extralife area and have the extralife integration register them on init (similar to how the other integrations do with their effects & variables)

Additionally, as a quality-of-life improvement, we can take advantage of the participant ID that the users already provide in Settings > Integrations > ExtraLife so they don't have to provide it for every $variable. I think being able to provide a custom ID is cool, so perhaps we make the participant ID the last argument of each variable, making it easier to have it be optional and default to configured participant ID.

You can get the configured participant ID like so:

if (!participantId) {
    participantId = integrationManager.getIntegrationAccountId("extralife");
}

@ebiggz ebiggz changed the title extra life variables feat(integrations): extra life variables Jan 7, 2024
@Firebottle Firebottle requested a review from ebiggz January 8, 2024 21:17
Copy link
Member

@ebiggz ebiggz left a comment

Choose a reason for hiding this comment

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

Looks fantastic!

@ebiggz ebiggz enabled auto-merge (squash) January 9, 2024 16:23
@ebiggz ebiggz merged commit 5134ce4 into v5 Jan 9, 2024
2 checks passed
@ebiggz ebiggz deleted the v5-extra-life-variables branch January 9, 2024 16:24
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

Successfully merging this pull request may close these issues.

None yet

2 participants