public BeeNodeClient( string baseUrl = "http://localhost/", int?gatewayApiPort = 1633, int?debugApiPort = 1635, GatewayApiVersion gatewayApiVersion = GatewayApiVersion.v3_0_0, DebugApiVersion debugApiVersion = DebugApiVersion.v2_0_0) { httpClient = new HttpClient(); if (debugApiPort is not null) { DebugApiUrl = new Uri(BuildBaseUrl(baseUrl, debugApiPort.Value)); DebugClient = new BeeDebugClient(httpClient, DebugApiUrl, debugApiVersion); } if (gatewayApiPort is not null) { GatewayApiUrl = new Uri(BuildBaseUrl(baseUrl, gatewayApiPort.Value)); GatewayClient = new BeeGatewayClient(httpClient, GatewayApiUrl, gatewayApiVersion); } }
// Constructors. public BeeDebugClient(HttpClient httpClient, Uri baseUrl, DebugApiVersion apiVersion) { if (baseUrl is null) { throw new ArgumentNullException(nameof(baseUrl)); } beeDebugClient_1_2_0 = new BeeDebugClient_1_2_0(httpClient) { BaseUrl = baseUrl.ToString() }; beeDebugClient_1_2_1 = new BeeDebugClient_1_2_1(httpClient) { BaseUrl = baseUrl.ToString() }; beeDebugClient_2_0_0 = new BeeDebugClient_2_0_0(httpClient) { BaseUrl = baseUrl.ToString() }; CurrentApiVersion = apiVersion; }