public static async Task <GetFieldResponse> GetTelematicsNodeFieldsExample(int nodeId) { TelematicsV2 telematicsV2 = new TelematicsV2(publicKey, privateKey, userKey); GetFieldResponse response = await telematicsV2.GetTelematicsNodeFields(nodeId); return(response); }
public void GetField(string name, GetFieldResponse response, FieldNotFound fail = null) { if(response != null && type == Type.OBJECT) { int index = keys.IndexOf(name); if(index >= 0) { response.Invoke(list[index]); return; } } if(fail != null) fail.Invoke(name); }
/// <summary> /// The GET TelematicsNodeV2/{telematicsNodeId}/Fields endpoint retrieves a list of fields associated with the provided telematics node. /// </summary> /// <param name="nodeId"></param> /// <returns></returns> public async Task <GetFieldResponse> GetTelematicsNodeFields(int nodeId) { Dictionary <string, string> headers = ApiUtilities.BuildHeaders(UserKey, PublicKey, PrivateKey, $"telematicsnodev2/{nodeId}/fields"); HttpResponseMessage response = await Api.Get($"telematicsnodev2/{nodeId}/fields", headers); GetFieldResponse result = await Api.DeserializeContent <GetFieldResponse>(response); return(result); }
public void GetField(string name, GetFieldResponse response, FieldNotFound fail = null) { if (response != null && IsObject) { int num = keys.IndexOf(name); if (num >= 0) { response(list[num]); return; } } fail?.Invoke(name); }
public void GetField(string name, GetFieldResponse response, FieldNotFound fail = null) { if (response != null && this.IsObject) { int num = this.keys.IndexOf(name); if (num >= 0) { response(this.list[num]); return; } } if (fail != null) { fail(name); } }
private void GetField(string name, GetFieldResponse response, FieldNotFound fail = null) { if (response != null && IsObject) { int index = keys.IndexOf(name); if (index >= 0) { response.Invoke(list[index]); return; } } if (fail != null) { fail.Invoke(name); } }
public void GetField(string name, GetFieldResponse response, FieldNotFound fail = null) { if (response != null && IsObject) { int index = keys.IndexOf(name); if (index >= 0) { response.Invoke(list[index]); return; } } if (fail != null) fail.Invoke(name); }
// Default parameters fix public void GetField(string name, GetFieldResponse response) { GetField(name, response, null); }
public void GetField (string name, GetFieldResponse response, FieldNotFound fail) { if (response != null && type == JSONType.OBJECT) { int index = keys.IndexOf(name); if (index >= 0) { response.Invoke(list[index]); return; } } if(fail != null) { fail.Invoke(name); } }
public void GetField (string name, GetFieldResponse response) { GetField(name, response, null); }
public static async Task <GetFieldResponse> GetTelematicsNodeFieldsExample(int nodeId) { GetFieldResponse response = await DataExchangeAPI.GetTelematicsNodeFields(nodeId); return(response); }