public static async Task DownloadFileExample()
        {
            // first we need to locate a node
            const int telematicsNodeID = 0;

            // Then we can get that node's file listing
            GetTelematicsNodeFilesResponse fileResponse = await DataExchangeAPI.GetTelematicsNodeFiles(telematicsNodeID);

            if (fileResponse.Success)
            {
                // Now we can download that file using the ID
                string   fileID   = fileResponse.Data[0].ID;
                FileInfo fileInfo = await DataExchangeAPI.GetDownloadFilesWithoutConversion(telematicsNodeID, fileID);

                if (fileInfo.Exists)
                {
                    ProcessStartInfo startInfo = new ProcessStartInfo
                    {
                        Arguments = fileInfo.Directory.FullName,
                        FileName  = fileInfo.Name
                    };

                    Process.Start(startInfo);
                }
            }

            await Task.CompletedTask;
        }
예제 #2
0
        public static async Task <GetTelematicsNodeFilesResponse> GetTelematicsNodeFilesExample(int nodeId)
        {
            TelematicsV2 telematicsV2 = new TelematicsV2(publicKey, privateKey, userKey);
            GetTelematicsNodeFilesResponse response = await telematicsV2.GetTelematicsNodeFiles(nodeId);

            return(response);
        }