/// <summary>
        /// Check <see cref="IAssetBankManager"/> for more information
        /// </summary>
        /// <returns>Check <see cref="IAssetBankManager"/> for more information</returns>
        public Task <IList <Brand> > GetBrandsAsync()
        {
            var request = new Request <IList <Brand> >
            {
                Uri        = "/api/v4/brands/",
                HTTPMethod = HttpMethod.Get
            };

            return(_requestSender.SendRequestAsync(request));
        }
        /// <summary>
        /// Check <see cref="IBynderApi"/> for more information
        /// </summary>
        /// <returns>Check <see cref="IBynderApi"/> for more information</returns>
        public async Task GetRequestTokenAsync()
        {
            var request = new Request <string>
            {
                Uri                 = "/api/v4/oauth/request_token",
                HTTPMethod          = HttpMethod.Post,
                DeserializeResponse = false
            };

            var response = await _requestSender.SendRequestAsync(request).ConfigureAwait(false);

            SetCredentialsFromResponse(response);
        }
Exemple #3
0
        /// <summary>
        /// Check <see cref="ICollectionsManager"/> for more information
        /// </summary>
        /// <param name="query">Check <see cref="ICollectionsManager"/> for more information</param>
        /// <returns>Check <see cref="ICollectionsManager"/> for more information</returns>
        public Task CreateCollectionAsync(CreateCollectionQuery query)
        {
            var request = new Request <string>
            {
                Uri                 = $"/api/v4/collections/",
                HTTPMethod          = HttpMethod.Post,
                Query               = query,
                DeserializeResponse = false
            };

            return(_requestSender.SendRequestAsync(request));
        }
Exemple #4
0
        /// <summary>
        /// Gets the closes s3 endpoint. This is needed to know to which bucket Url it uploads chunks
        /// </summary>
        /// <returns>Task containting string with the Url</returns>
        private async Task <string> GetClosestS3EndpointAsync()
        {
            if (string.IsNullOrEmpty(_awsBucket))
            {
                var request = new Request <string>
                {
                    Uri        = "/api/upload/endpoint",
                    HTTPMethod = HttpMethod.Get
                };

                _awsBucket = await _requestSender.SendRequestAsync(request).ConfigureAwait(false);
            }

            return(_awsBucket);
        }