Exemple #1
0
        /// <summary>
        /// Get a list of applications
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public async Task <CloudApplicationListResponse> RetrieveApplications(CloudApplicationCreate request)
        {
            var client   = GetBaseHttpClient();
            var response = await client.GetAsync($"cloud/applications{QueryStringBuilder.RequestObjectToQueryString(request)}");

            await CheckResponseMessageIsValid(response);

            return(await response.Content.ReadAsAsync <CloudApplicationListResponse>());
        }
Exemple #2
0
        /// <summary>
        /// Create a new application
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public async Task <CloudApplicationResponse> CreateApplication(CloudApplicationCreate request)
        {
            var client   = GetBaseHttpClient();
            var response = await client.PostAsync($"cloud/applications", request);

            await CheckResponseMessageIsValid(response);

            return(await response.Content.ReadAsAsync <CloudApplicationResponse>());
        }