PictureScener.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. using Azylee.YeahWeb.HttpUtils;
  2. using Newtonsoft.Json;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. namespace Azylee.YeahWeb.TencentWebAPI.PictureAI
  8. {
  9. public class PictureScener
  10. {
  11. public static string GetInfo(int app_id, int time_stamp, string nonce_str, string sign, int format, int topk, string image)
  12. {
  13. try
  14. {
  15. string url = $"https://api.ai.qq.com/fcgi-bin/vision/vision_scener?";
  16. StringBuilder param = new StringBuilder();
  17. param.Append($"app_id={app_id}");
  18. param.Append($"&time_stamp={time_stamp}");
  19. param.Append($"&nonce_str={nonce_str}");
  20. param.Append($"&sign={sign}");
  21. param.Append($"&format={format}");
  22. param.Append($"&topk={topk}");
  23. param.Append($"&image={image}");
  24. string rs = HttpTool.Post(url, param.ToString());
  25. }
  26. catch { }
  27. return null;
  28. }
  29. }
  30. }