using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using XYY.Model.Standard.Channel; namespace XYY.Service.Standard.Channel { public static class ChannelClientService { const string Token = "132A7468DE079C6CEB59F383A661E612"; const string ApiHost = "http://wms.xingyunyi.cn"; public static async Task> CacheGetAllPublic() { RestSharp.RestClient restClient = new RestSharp.RestClient(ApiHost); RestSharp.RestRequest restRequest = new RestSharp.RestRequest("/api/BaseInfo/CacheGetAllPublicChannel"); restRequest.AddHeader("token", Token); var response = await restClient.ExecuteAsync>(restRequest); IEnumerable result = response.Data; return result; } public static async Task> CacheGetAllChannel() { RestSharp.RestClient restClient = new RestSharp.RestClient(ApiHost); RestSharp.RestRequest restRequest = new RestSharp.RestRequest("/api/BaseInfo/CacheGetAllChannel"); restRequest.AddHeader("token", Token); var response = await restClient.ExecuteAsync>(restRequest); IEnumerable result = response.Data; return result; } } }