IJuHeApiService.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using OASystem.Domain.Dtos.SmallFun;
  2. using OASystem.Domain.ViewModels.JuHeExchangeRate;
  3. namespace OASystem.API.OAMethodLib.JuHeAPI
  4. {
  5. /// <summary>
  6. /// 聚合Api 服务
  7. /// </summary>
  8. public interface IJuHeApiService
  9. {
  10. /// <summary>
  11. /// 获取汇率
  12. /// </summary>
  13. /// <returns></returns>
  14. Task<JuHeAPIResult> GetExchangeRateAsync();
  15. /// <summary>
  16. /// 获取汇率 Single
  17. /// </summary>
  18. /// <param name="currencyCode">币种code</param>
  19. /// <returns></returns>
  20. Task<Result> GetSingleRateAsync(string currencyCode);
  21. /// <summary>
  22. /// 获取汇率 Item
  23. /// </summary>
  24. /// <returns></returns>
  25. Task<List<ExchangeRateModel>> PostItemRateAsync(string[] currencyCodes);
  26. /// <summary>
  27. /// 获取汇率转换结果
  28. /// </summary>
  29. /// <returns></returns>
  30. Task<Result> GetExchangeRateAsync(ExchangeRateDto dto);
  31. /// <summary>
  32. /// 文本翻译
  33. /// </summary>
  34. /// <param name="source">原文,数据类型为字符串,也可为数组(元素必须为字符串类型);每次请求的字符串长度之和尽量不要超过 </param>
  35. /// <param name="trans_type">翻译方向:en2zh(英文-中文),zh2en(中文-英文),ja2zh(日文-中文),zh2ja(中文-日文),ko2zh(韩文-中文),zh2ko(中文-韩文)</param>
  36. /// <returns></returns>
  37. /// <returns></returns>
  38. Task<string> GetTextTranslateAsync(string source, string trans_type = "zh2en");
  39. /// <summary>
  40. /// 获取全球当前时间
  41. /// </summary>
  42. /// <param name="continent">
  43. /// 洲际:非洲、美洲、南极洲、北极、亚洲、大西洋、 欧洲、太平洋
  44. /// <returns></returns>
  45. Task<JuHeAPIResult> GetContinentTimezoneAsync(string continent);
  46. }
  47. }