Exemple #1
0
        public async Task <ListResponse <FirmwareDownloadRequest> > GetDownloadRequestsForDeviceAsync(string deviceRepoId, string deviceId)
        {
            var downloadRequestRepo = new FirmwareDownloadRequestRepo(_repoSettings.FirmwareRequestSettings.AccountId, _repoSettings.FirmwareRequestSettings.AccessKey, _adminLogger);
            var requests            = await downloadRequestRepo.GetForDeviceAsync(deviceRepoId, deviceId);

            requests = requests.OrderByDescending(rqst => rqst.Timestamp);
            return(ListResponse <FirmwareDownloadRequest> .Create(requests));
        }
Exemple #2
0
        public Task UpdateDownloadRequestAsync(FirmwareDownloadRequest request)
        {
            var downloadRequestRepo = new FirmwareDownloadRequestRepo(_repoSettings.FirmwareRequestSettings.AccountId, _repoSettings.FirmwareRequestSettings.AccessKey, _adminLogger);

            return(downloadRequestRepo.UpdateRequestAsync(request));
        }
Exemple #3
0
        public Task <FirmwareDownloadRequest> GetDownloadRequestAsync(string id)
        {
            var downloadRequestRepo = new FirmwareDownloadRequestRepo(_repoSettings.FirmwareRequestSettings.AccountId, _repoSettings.FirmwareRequestSettings.AccessKey, _adminLogger);

            return(downloadRequestRepo.GetRequestAsync(id));
        }