/// <summary> /// 批量获取用户的标签列表 /// </summary> /// <param name="uids">要获取标签的用户ID。最大20,逗号分隔。 </param> /// <returns></returns> public Dictionary <string, IEnumerable <Tag> > TagsBatch(params string[] uids) { var json = JArray.Parse(api.TagsBatch(uids)); var result = new Dictionary <string, IEnumerable <Tag> >(); foreach (var item in json) { var entry = item["id"].ToString(); var list = new List <Tag>(); foreach (JObject obj in item["tags"]) { var first = (JProperty)obj.First; var last = (JProperty)obj.Last; list.Add(new Tag { ID = first.Name, Name = string.Format("{0}", first.Value), Weight = string.Format("{0}", last.Value) }); } result.Add(entry, list); } return(result); }
/// <summary> /// 批量获取用户的标签列表 /// </summary> /// <param name="uids">要获取标签的用户ID。最大20,逗号分隔。 </param> /// <returns></returns> public dynamic TagsBatch(params string[] uids) { return(DynamicJson.Parse(api.TagsBatch(uids))); }