Vonage / vonage-dotnet-sdk

Vonage REST API client for .NET, written in C#. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
https://developer.vonage.com/
Apache License 2.0
105 stars 82 forks source link

Support for multiple servers for VoiceClient #569

Open Tr00d opened 7 months ago

Tr00d commented 7 months ago

In certain scenarios, clients want to connect to multiple servers (EU, US, APAC) from the same application. Currently, the request is sent to a single URL, NexmoApiUrl.

Implementation - TBC

We could use a fluent approach to specify a particular server before doing a request.

VoiceClient client = new VoiceClient(...);
VoiceClient usClient = client.WithServer(VoiceServer.US);
VoiceClient euClient = client.WithServer(VoiceServer.EU);
VoiceClient apacClient = client.WithServer(VoiceServer.APAC);