示例#1
0
        /// <summary>
        /// Generate an image of a given textual string
        /// </summary>
        /// <param name="parameters">Parameters of generating an image of a given textual string</param>
        /// <returns>Results of generating an image of a given textual string</returns>
        public TextResult Text(TextParams parameters)
        {
            string uri = m_api.ApiUrlImgUpV.Action("text").BuildUrl();

            using (HttpWebResponse response = m_api.Call(HttpMethod.POST, uri, parameters.ToParamsDictionary(), null))
            {
                TextResult result = TextResult.Parse(response);
                return(result);
            }
        }
示例#2
0
 public async Task <TextResult> TextAsync(TextParams parameters)
 {
     using (var response = await Api.CallAsync(HttpMethod.Post, Api.ApiUrlImgUpV.Action("text").BuildUrl(), parameters.ToParamsDictionary(), null, null))
     {
         return(await TextResult.Parse(response));
     }
 }