Пример #1
0
        /// <summary>
        /// Calls b2_update_bucket
        /// 
        /// https://www.backblaze.com/b2/docs/b2_update_bucket.html
        /// </summary>
        public async Task<B2BucketObject> UpdateBucket(string accountId, string bucketId, B2BucketType bucketType)
        {
            HttpResponseMessage resp = await InternalRequest(ApiUri, "/b2api/v1/b2_update_bucket", new { accountId, bucketId, bucketType = bucketType.GetDescription() });

            return JsonConvert.DeserializeObject<B2BucketObject>(await resp.Content.ReadAsStringAsync().ConfigureAwait(false));
        }