Request a New Connection
Requesting a New Connection
Overview
The requestConnection method in the b.well SDK facilitates the user's ability to request a new connection be made available by submitting a request with specific details.
Method Signature
suspend fun requestConnection(request: RequestConnectionRequest): OperationOutcomerequest: ARequestConnectionRequestobject containing details of the connection to be established.OperationOutcome: Indicates the result of the connection request.
Example Usage
val newConnection = RequestConnectionRequest.Builder()
.city() // Specify the city (optional)
.institution() // Specify the institution (optional)
.provider() // Specify the provider (optional)
.state() // Specify the state (optional)
.build()
val result = BWellSdk.connection.requestConnection(newConnection)
// Handle the OperationOutcome of the requestThis code demonstrates how to build a RequestConnectionRequest with optional parameters like city, institution, provider, and state, and use it to request a new connection.
Best Practices
- Ensure that necessary details are provided in the
RequestConnectionRequestfor accurate connection request information. - While the SDK treats the request parameters as optional, it is best for the client application to enforce at least the
institutionparameter. - Analyze the
OperationOutcometo understand the success or failure of the request.
Updated about 2 months ago
