Skip to content

feat: Add listConnections API (DEVX-10074)#297

Merged
dragonmantank merged 1 commit into
mainfrom
DEVX-10074-add-list-connections
May 4, 2026
Merged

feat: Add listConnections API (DEVX-10074)#297
dragonmantank merged 1 commit into
mainfrom
DEVX-10074-add-list-connections

Conversation

@dragonmantank
Copy link
Copy Markdown
Contributor

@dragonmantank dragonmantank commented May 4, 2026

Add GET /v2/project/{apiKey}/session/{sessionId}/connection support:

  • Connection model with connectionId, createdAt, connectionState (enum)
  • ConnectionList response with count, projectId, sessionId, items
  • HttpClient.listConnections() method
  • OpenTok.listConnections(sessionId) public API
  • Tests with WireMock stub and validation

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class support in the Java SDK for the Video API “list connections in a session” endpoint (GET /v2/project/{apiKey}/session/{sessionId}/connection), exposing it via OpenTok.listConnections(sessionId) and validating behavior with WireMock-backed tests.

Changes:

  • Introduces Connection and ConnectionList models to represent the API response.
  • Adds HttpClient.listConnections(sessionId) and wires it into the public OpenTok.listConnections(sessionId) API.
  • Adds a new unit/integration-style test to validate parsing, auth, and argument validation.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/test/java/com/opentok/OpenTokTest.java Adds WireMock stub + assertions for listConnections response parsing and request auth.
src/main/java/com/opentok/util/HttpClient.java Implements the low-level GET call and status-code handling for listing connections.
src/main/java/com/opentok/OpenTok.java Exposes listConnections as a public API and adds an ObjectReader for ConnectionList.
src/main/java/com/opentok/ConnectionList.java New collection wrapper model for the list-connections response metadata + items.
src/main/java/com/opentok/Connection.java New model representing a single connection and its state/timestamps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/java/com/opentok/OpenTok.java Outdated
Comment thread src/main/java/com/opentok/ConnectionList.java
Comment thread src/main/java/com/opentok/Connection.java Outdated
@dragonmantank dragonmantank force-pushed the DEVX-10074-add-list-connections branch 3 times, most recently from ce7b104 to cce94ca Compare May 4, 2026 15:54
Add GET /v2/project/{apiKey}/session/{sessionId}/connection support:
- Connection model with connectionId, createdAt, connectionState (enum)
- ConnectionList response with count, applicationId, sessionId, items
- HttpClient.listConnections() method
- OpenTok.listConnections(sessionId) public API
- Tests with WireMock stub and validation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dragonmantank dragonmantank force-pushed the DEVX-10074-add-list-connections branch from cce94ca to 0195c90 Compare May 4, 2026 15:56
@dragonmantank dragonmantank merged commit e695493 into main May 4, 2026
14 checks passed
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