-
Couldn't load subscription status.
- Fork 5.5k
Rumble - New Live Stream #16285
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
Rumble - New Live Stream #16285
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
WalkthroughThis pull request updates the Rumble component by bumping the package version, adding a new dependency, and correcting configuration details in the package manifest. The main application file now employs a modular API request approach with the introduction of Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant App as RumbleApp
participant Axios
Client->>App: getData()
App->>App: _makeRequest()
App->>App: _baseUrl()
App->>Axios: Send API request with full URL and API key
Axios-->>App: Return response
App-->>Client: Return data
sequenceDiagram
participant Runner
participant NewLive as NewLiveStreamModule
participant DB as Database
participant RumbleAPI as Rumble API
Runner->>NewLive: run()
NewLive->>DB: _getLastTs()
NewLive->>RumbleAPI: Request livestream data
RumbleAPI-->>NewLive: Livestream data
NewLive->>NewLive: Compare timestamps for new event
alt New livestream detected
NewLive->>DB: _setLastTs() updated
NewLive->>Runner: Emit livestream event with metadata
else No new livestream
NewLive->>Runner: No event emitted
end
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/rumble/rumble.app.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/rumble/sources/new-live-stream/test-event.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/rumble/sources/new-live-stream/new-live-stream.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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: 0
🧹 Nitpick comments (2)
components/rumble/sources/new-live-stream/test-event.mjs (1)
1-25: Test event structure looks appropriate but contains future dateThe test event structure properly represents a Rumble livestream with all necessary fields. However, note that the
created_ondate is set to April 2025, which is in the future. While this doesn't affect functionality, consider using a past or current date for more realistic testing scenarios.- "created_on": "2025-04-14T17:07:27+00:00", + "created_on": "2023-04-14T17:07:27+00:00",components/rumble/sources/new-live-stream/new-live-stream.mjs (1)
43-49: Consider adding error handling for potentially undefined livestream propertiesThe code assumes that all livestreams have a
created_onproperty. Consider adding additional checks to ensure robustness.for (const livestream of livestreams) { - const ts = Date.parse(livestream.created_on); + if (!livestream?.created_on) continue; + const ts = Date.parse(livestream.created_on); if (livestream?.is_live && ts > lastTs) { const meta = this.generateMeta(livestream); this.$emit(livestream, meta); maxTs = Math.max(ts, maxTs); } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
components/rumble/package.json(2 hunks)components/rumble/rumble.app.mjs(1 hunks)components/rumble/sources/new-live-stream/new-live-stream.mjs(1 hunks)components/rumble/sources/new-live-stream/test-event.mjs(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Verify TypeScript components
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
🔇 Additional comments (9)
components/rumble/package.json (2)
3-3: Version increment looks goodThe version has been incremented appropriately from 0.0.1 to 0.1.0, which properly reflects the addition of new functionality in this package.
14-16: Dependencies addition looks goodThe addition of "@pipedream/platform" as a dependency is appropriate as it's being used in the component files for axios and constants.
components/rumble/sources/new-live-stream/new-live-stream.mjs (3)
5-21: Component configuration looks appropriateThe component is properly set up with the required metadata, properties, and deduplication settings. The timer setup with the default polling interval from the platform constants follows best practices.
22-36: Methods for state management and metadata generation look goodThe timestamp handling methods ensure proper tracking of processed events, and the metadata generation method creates appropriate event metadata from livestream data.
37-53: Run logic handles livestream detection properlyThe run method correctly fetches livestream data, filters for new live streams based on timestamp comparison, emits events with appropriate metadata, and updates the last processed timestamp.
components/rumble/rumble.app.mjs (4)
1-1: Import from platform package is appropriateThe axios import from the @pipedream/platform package aligns with the added dependency in package.json.
8-10: Base URL method implementation looks goodThe _baseUrl method provides a clean way to centralize the API endpoint URL.
11-25: API request method is well-structuredThe _makeRequest method provides a good abstraction for API calls, properly including the authentication key and allowing for additional parameters and options.
26-31: getData method works properly with the new-live-stream componentThis method effectively uses the _makeRequest abstraction to fetch livestream data, which is then consumed by the new-live-stream source component.
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!
Resolves #16272
Summary by CodeRabbit
New Features
Refactor
Chores