public static WeFanContainter GetFans(WeFanContainter prev) { string url = WeUtil.GetUrl(WeConst.FAN_URL); if (prev != null) url += "&next_openid=" + prev.NextOpenId; WeFanContainter result = new WeFanContainter(); return WeUtil.GetFromUri(url, result); }
public static WeFanContainter GetFans(WeFanContainter prev) { string url = WeUtil.GetUrl(WeConst.FAN_URL); if (prev != null) { url += "&next_openid=" + prev.NextOpenId; } WeFanContainter result = new WeFanContainter(); return(WeUtil.GetFromUri(url, result)); }
public static IEnumerable <string> GetAllUsers() { List <WeFanContainter> list = new List <WeFanContainter>(); WeFanContainter item = GetFans(); list.Add(item); while (!(string.IsNullOrEmpty(item.NextOpenId))) { item = GetFans(item); if (item.Count > 0) { list.Add(item); } } var result = from fan in list from id in fan.OpenIds where fan.OpenIds != null select id; return(result); }