コード例 #1
0
 public async Task <SpriteResult> MakeSpriteAsync(SpriteParams parameters)
 {
     using (var response = await Api.CallAsync(HttpMethod.Post, Api.ApiUrlImgUpV.Action("sprite").BuildUrl(), parameters.ToParamsDictionary(), null, null))
     {
         return(await SpriteResult.Parse(response));
     }
 }
コード例 #2
0
        /// <summary>
        /// Eagerly generate sprites
        /// </summary>
        /// <param name="parameters">Parameters for sprite generation</param>
        /// <returns>Result of sprite generation</returns>
        public SpriteResult MakeSprite(SpriteParams parameters)
        {
            UrlBuilder urlBuilder = new UrlBuilder(
                m_api.ApiUrlImgUpV.
                Action("sprite").
                BuildUrl());

            using (HttpWebResponse response = m_api.Call(
                       HttpMethod.POST, urlBuilder.ToString(), parameters.ToParamsDictionary(), null))
            {
                SpriteResult result = SpriteResult.Parse(response);
                return(result);
            }
        }