-
Notifications
You must be signed in to change notification settings - Fork 19
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
get multiple data feed by symbols #1820
Conversation
WalkthroughWalkthroughThe recent changes enhance the API's functionality by allowing the retrieval of the latest feeds for multiple symbols. The endpoint and function names have been updated to reflect this new capability. Additionally, the initialization settings now enable route printing, and the test cases have been adjusted to validate the new multiple symbol handling logic. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API
participant Controller
participant DataService
Client->>+API: GET /latest-data-feeds/:symbols
API->>+Controller: getLatestMultipleFeeds
Controller->>+DataService: Fetch data for each symbol
DataService-->>-Controller: Returns data array
Controller-->>-API: Returns aggregated results
API-->>-Client: Response with data array
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- node/pkg/dal/api/controller.go (2 hunks)
- node/pkg/dal/api/route.go (1 hunks)
- node/pkg/dal/tests/api_test.go (1 hunks)
- node/pkg/dal/utils/initializer/initializer.go (1 hunks)
Additional comments not posted (1)
node/pkg/dal/api/route.go (1)
13-13
: Route parameter update: Verify consistency across the codebase.The route parameter has been changed from
:symbol
to:symbols
to reflect the ability to handle multiple symbols. This is a significant change and should be verified across the entire codebase to ensure that all references to this endpoint have been updated accordingly.Verification successful
Route parameter update verified: No inconsistencies found.
The change from
:symbol
to:symbols
has been correctly applied, and there are no outdated references to the old route parameter in the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to the old and new route parameters. rg --type go -A 5 $'/latest-data-feeds/:symbol' rg --type go -A 5 $'/latest-data-feeds/:symbols'Length of output: 478
Script:
#!/bin/bash # Description: Verify all references to the old and new route parameters across the entire codebase. rg -A 5 '/latest-data-feeds/:symbol' rg -A 5 '/latest-data-feeds/:symbols'Length of output: 458
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! I'd like to suggest renaming function getLatestFeeds
into getAllLatestFeeds
, and your new function into getLatestFeeds
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- node/pkg/dal/api/controller.go (3 hunks)
- node/pkg/dal/api/route.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- node/pkg/dal/api/controller.go
- node/pkg/dal/api/route.go
Description
Related issue: #1777
getLatestFeed
api togetLatestMutlipleFeeds
Updated docs
Type of change
Please delete options that are not relevant.
Checklist before requesting a review
Deployment