コード例 #1
0
 public async Task <GetUploadPresetResult> GetUploadPresetAsync(string name)
 {
     using (var response = await Api.CallAsync(HttpMethod.Get, Api.ApiUrlV.Add("upload_presets").Add(name).BuildUrl(), null, null, null))
     {
         return(await GetUploadPresetResult.Parse(response));
     }
 }
コード例 #2
0
        /// <summary>
        /// Gets the upload preset.
        /// </summary>
        /// <param name="name">Name of the upload preset.</param>
        /// <returns></returns>
        public GetUploadPresetResult GetUploadPreset(string name)
        {
            UrlBuilder urlBuilder = new UrlBuilder(
                m_api.ApiUrlV
                .Add("upload_presets")
                .Add(name)
                .BuildUrl());

            using (HttpWebResponse response = m_api.Call(HttpMethod.GET, urlBuilder.ToString(), null, null))
            {
                return(GetUploadPresetResult.Parse(response));
            }
        }