예제 #1
0
        public async Task <AllocationBase> AddAsync <T>(T allocation, string endpoint)
            where T : AllocationBase
        {
            var response = await _client.PutAsync(endpoint, new List <T> {
                allocation
            }).ConfigureAwait(false);

            var result = await HandleResponseAsync <T>(response).ConfigureAwait(false);

            return(result.Allocations.FirstOrDefault());
        }
예제 #2
0
        public async Task <ImportSummary> CreateAsync(Setup setup)
        {
            var response = await _client.PutAsync(_apiEndpointUrl, setup);

            return(await HandleResponseAsync(response));
        }
예제 #3
0
        public async Task <ImportSummary> CreateAsync(Setup setup)
        {
            var response = await _client.PutAsync($"{_endpointBase}/Setup", setup).ConfigureAwait(false);

            return(await HandleResponseAsync(response).ConfigureAwait(false));
        }