public static async Task <GetEquipmentRegisterResponse> RegisterExample() { TelematicsV2 telematicsV2 = new TelematicsV2(publicKey, privateKey, userKey); GetEquipmentRegisterResponse response = await telematicsV2.GetEquipmentRegister(); return(response); }
public static async Task RegisterExample() { GetEquipmentRegisterResponse response = await DataExchangeAPI.GetEquipmentRegister(); if (response.Success) { Process.Start(response.Url); } await Task.CompletedTask; }
/// <summary> /// The GET TelematicsNodeV2/Equipment/Register endpoint retrieves a url that redirects the user to the Data Exchange 2.0 Registration page. /// There the user may register with the enabled equipment manufacturers. /// </summary> /// <returns></returns> public async Task <GetEquipmentRegisterResponse> GetEquipmentRegister() { Dictionary <string, string> headers = ApiUtilities.BuildHeaders(UserKey, PublicKey, PrivateKey, "telematicsnodev2/equipment/register"); HttpResponseMessage response = await Api.Get("telematicsnodev2/equipment/register", headers); GetEquipmentRegisterResponse result = await Api.DeserializeContent <GetEquipmentRegisterResponse>(response); System.Diagnostics.Process.Start(@"C:\Program Files\Internet Explorer\IExplore.exe", result.Url); return(result); }