private ReportingClient(string baseUrl, IRestConnection restConnection) { restConnection.Setup(baseUrl, null); Device = new DeviceClient(baseUrl, restConnection); Network = new NetworkClient(baseUrl, restConnection); }
/// <summary> /// Logs in with the specified network. Note that you can be logged in with only one device or one network for any <see cref="ReportingClient"/> instance. /// </summary> /// <param name="networkId">Unique network identifier</param> /// <param name="networkKey">Api key of the network, or any of the encosing networks, or the enclosing service</param> public void SetNetwork(string networkId, string networkKey) { _restConnection.Setup(_baseUrl, new Dictionary <string, string> { { "X-NetworkId", networkId }, { "X-NetworkKey", networkKey } }); }
private OccasionallyConnectionClient(string baseUrl, string deviceId, string apiKey, IRestConnection restConnection) { _restConnection = restConnection; _restConnection.Setup(baseUrl, new Dictionary <string, string> { { "X-DeviceId", deviceId }, { "X-ApiKey", apiKey } }); }
/// <summary> /// Logs in with the specified device. Note that you can be logged in with only one device or one network for any <see cref="ReportingClient"/> instance. /// </summary> /// <param name="deviceId">Unique device identifier</param> /// <param name="deviceKey">Api key of the device, or any of the encosing networks, or the enclosing service</param> public void SetDevice(string deviceId, string deviceKey) { _restConnection.Setup(_baseUrl, new Dictionary <string, string> { { "X-DeviceId", deviceId }, { "X-DeviceKey", deviceKey } }); }
private ManagementClient(string baseUrl, IRestConnection restConnection) { restConnection.Setup(baseUrl, null); User = new UserManagementClient(baseUrl, restConnection); Company = new CompanyManagementClient(restConnection); Service = new ServiceManagementClient(restConnection); Network = new NetworkManagementClient(restConnection); Device = new DeviceManagementClient(restConnection); TelemetryDataSinksMetadata = new TelemetryDataSinksMetadataClient(restConnection); }