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(event): Add event list API #2601

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

Conversation

earthpyy
Copy link

Hi, Ruby newbie here. This is my first Ruby and Lago contribution so, if there is any suggestion, I'd be much appreciated!

Roadmap Task

👉 https://getlago.canny.io/feature-requests/p/retrieve-and-filter-events

Context

Currently, REST API does not provide the endpoint to list all events (as in the Developer -> Events page). This pull request aim to expose the event list to the REST API to let the user retrieve and filter events.

Description

This pull request add supports for:

  • Adding GET /api/v1/events endpoint
  • Filtering events by code, external_subscription_id, timestamp_from, and timestamp_to

I'm also planning to checkout the front-end side to add these kinds of filter into the UI later as well.

Copy link
Contributor

@ancorcruz ancorcruz left a comment

Choose a reason for hiding this comment

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

Hi @earthpyy,

Thank you for your contribution and welcome to Ruby and Lago! 🎉 We’re really excited to have you onboard and appreciate your efforts on this feature.

Your implementation of the GET /api/v1/events endpoint looks great, and we’re glad to see how you’ve incorporated filtering by code, external_subscription_id, timestamp_from, and timestamp_to. These additions will definitely improve the flexibility of the API and address the request from the roadmap.

Before we merge, there are just a couple of improvements around the tests that we’ve highlighted with messages. If you could address those, we’ll be all set to move forward! Let us know if you need any help with the changes or have any questions — we’re happy to assist.

Looking forward to your potential contributions on the front-end side as well! Keep up the great work! 😊

spec/requests/api/v1/events_controller_spec.rb Outdated Show resolved Hide resolved
spec/queries/events_query_spec.rb Show resolved Hide resolved
@earthpyy
Copy link
Author

earthpyy commented Sep 23, 2024

Hi @ancorcruz, thanks for the review! I've already updated the tests from your suggestion.

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