feat(video): Add the list connections response#610
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #610 +/- ##
=========================================
Coverage 98.93% 98.93%
- Complexity 3610 3622 +12
=========================================
Files 542 545 +3
Lines 7987 8004 +17
Branches 443 443
=========================================
+ Hits 7902 7919 +17
Misses 64 64
Partials 21 21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds support for listing connections in Vonage Video sessions. The implementation follows the established patterns in the video package and includes comprehensive test coverage.
Changes:
- Added
listConnections()method to VideoClient to retrieve all connections from a video session - Created
Connectionclass to represent individual connection data - Created
ConnectionStateenum to represent connection states (CONNECTING, CONNECTED, DISCONNECTED) - Created
ListConnectionsResponseclass to wrap the API response - Added comprehensive test coverage including unit tests and endpoint tests
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/vonage/client/video/VideoClient.java | Added listConnections endpoint and public method |
| src/main/java/com/vonage/client/video/ListConnectionsResponse.java | Response model extending ListResourceResponse with projectId and sessionId fields |
| src/main/java/com/vonage/client/video/Connection.java | Entity class representing a connection with id, state, and creation timestamp |
| src/main/java/com/vonage/client/video/ConnectionState.java | Enum defining connection states with custom capitalization pattern |
| src/test/java/com/vonage/client/video/VideoClientTest.java | Added test methods and loadJsonResource helper for testing list connections functionality |
| src/test/java/com/vonage/client/video/ListConnectionsResponseTest.java | Comprehensive tests for ListConnectionsResponse deserialization |
| src/test/resources/com/vonage/client/video/list-connections-response.json | Test fixture with sample connection data |
| src/test/resources/com/vonage/client/video/list-connections-response-full.json | Test fixture with placeholders for parameterized testing |
| CHANGELOG.md | Updated with new feature entry |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/test/resources/com/vonage/client/video/list-connections-response.json
Outdated
Show resolved
Hide resolved
|
@dragonmantank I've opened a new pull request, #611, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * Use Jsonable.fromString() for ConnectionState consistency Co-authored-by: dragonmantank <108948+dragonmantank@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: dragonmantank <108948+dragonmantank@users.noreply.github.com>
…sponse.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
See title
Contribution Checklist