Skip to content

Add events REST endpoint #3

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zSoulweaver
Copy link
Contributor

@zSoulweaver zSoulweaver commented Jun 4, 2025

Adds missing Events REST endpoint.

Wasn't sure what to call the Event type to not conflict with the exist Event type already available in the global context, have decided on EventSubscription but happy for better suggestions. Additionally Kick sends a very slim response when subscribing to events, figured EventSubscriptionResult is good enough here.

Also moves existing types from webhooks.ts into events.ts to better align with Kick's API docs

@fb-sean
Copy link
Owner

fb-sean commented Jun 4, 2025

@zSoulweaver what do you think about naming all that "WebhookEvent"? and in genral prefix it with "Webhook"?

@zSoulweaver
Copy link
Contributor Author

@zSoulweaver what do you think about naming all that "WebhookEvent"? and in genral prefix it with "Webhook"?

Was trying to think ahead with websockets, when that ever comes, as the subscription endpoint has the option to set the method in the body. It currently only accepts webhook, but I dare say there might be a websocket there one day. I also don't see them maintaining two different event structures for webhooks and websockets.

Although I did just notice that I left WebhookUser in there instead of EventUser.

The event types also don't seem to be typed to the spec correctly either.

Additionally, I was thinking of branching the event structures into their own folder, similar to have we already have rest and payloads, introducing an events folder maybe.

@fb-sean
Copy link
Owner

fb-sean commented Jun 7, 2025

@zSoulweaver what do you think about naming all that "WebhookEvent"? and in genral prefix it with "Webhook"?

Was trying to think ahead with websockets, when that ever comes, as the subscription endpoint has the option to set the method in the body. It currently only accepts webhook, but I dare say there might be a websocket there one day. I also don't see them maintaining two different event structures for webhooks and websockets.

Although I did just notice that I left WebhookUser in there instead of EventUser.

The event types also don't seem to be typed to the spec correctly either.

Additionally, I was thinking of branching the event structures into their own folder, similar to have we already have rest and payloads, introducing an events folder maybe.

Seems fine to me ^^

@fb-sean
Copy link
Owner

fb-sean commented Jun 7, 2025

seems like that there is a conflict tho

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.

2 participants