/// <summary> /// Corresponds to the "All" tab on the website. /// </summary> /// <param name="newer_than"></param> /// <returns></returns> public static List<Message> GetAllMessages(PageFlag flag, int id) { NameValueCollection parameters = new NameValueCollection(); AddPageFlagParam(flag, parameters, id); return RetrieveMessages(Yammer.HttpUtility.Get(Resources.YAMMER_MESSAGES_ALL, parameters)); }
/// <summary> /// Messages received by the logged-in user. Corresponds to the "Received" tab on the website. /// </summary> /// <param name="flag"></param> /// <param name="thread"></param> /// <param name="session"></param> /// <returns></returns> public static List<Message> GetReceivedMessages(PageFlag flag, int id, Session session) { if (flag == PageFlag.NEWER_THAN) return RetrieveMessages(Yammer.HttpUtility.Get(Resources.YAMMER_MESSAGES_RECEIVED + "?newer_than=" + id.ToString(), session)); else return RetrieveMessages(Yammer.HttpUtility.Get(Resources.YAMMER_MESSAGES_RECEIVED + "?older_than=" + id.ToString(), session)); }
/// <summary> /// 获取主页时间线数据 /// </summary> /// <param name="requestUrl">API请求地址</param> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <returns>获取用户收听的人+用户本人最新n条微博信息,与用户“我的主页”返回内容相同。</returns> public TimelineData GetHomeTimeline(string requestUrl, PageFlag pageflag, long pagetime, int reqnum) { Parameters parameters = new Parameters(); parameters.Add("format", this.ResponseDataFormat.ToString().ToLower()); parameters.Add("pageflag", (int)pageflag); parameters.Add("pagetime", pagetime); parameters.Add("reqnum", reqnum); return this.GetResponseData<TimelineData>(requestUrl, parameters); }
/// <summary> /// 获取私信发件箱列表 /// </summary> /// <param name="requestUrl">API请求地址</param> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <returns>获取私信发件箱列表</returns> public TimelineData GetSendList(string requestUrl, PageFlag pageflag, long pagetime, int reqnum) { Parameters parameters = new Parameters(); parameters.Add("format", this.ResponseDataFormat.ToString().ToLower()); parameters.Add("pageflag", (int)pageflag); parameters.Add("pagetime", pagetime); parameters.Add("reqnum", reqnum); return(this.GetResponseData <TimelineData>(requestUrl, parameters)); }
/// <summary> /// 获取获取话题时间线 /// </summary> /// <param name="requestUrl">API请求地址</param> /// <param name="pageflag">分页标识</param> /// <param name="httext">话题名字</param> /// <param name="pageinfo">分页标识(第一页 填空,继续翻页:根据返回的 pageinfo决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <returns>获取某个话题有关的最新n条微博。</returns> public HTTimelineData GetHTTimeline(string requestUrl, PageFlag pageflag, string httext, string pageinfo, int reqnum) { Parameters parameters = new Parameters(); parameters.Add("format", this.ResponseDataFormat.ToString().ToLower()); parameters.Add("pageflag", (int)pageflag); parameters.Add("httext", httext); parameters.Add("pageinfo", pageinfo); parameters.Add("reqnum", reqnum); return(this.GetResponseData <HTTimelineData>(requestUrl, parameters)); }
public TimelineData GetBroadcast_timeline(PageFlag pageflag, long pagetime, int reqnum, int Lastid=0) { //return this.GetHomeTimeline("http://open.t.qq.com/api/statuses/broadcast_timeline", pageflag, pagetime, reqnum); string requestUrl = "http://open.t.qq.com/api/statuses/broadcast_timeline"; Parameters parameters = new Parameters(); parameters.Add("format", this.ResponseDataFormat.ToString().ToLower()); parameters.Add("pageflag", (int)pageflag); parameters.Add("pagetime", pagetime); parameters.Add("reqnum", reqnum); parameters.Add("lastid", Lastid); return this.GetResponseData<TimelineData>(requestUrl, parameters); }
/// <summary> /// 获取用户以收藏的话题列表 /// </summary> /// <param name="requestUrl">API请求地址</param> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-15条)</param> /// <param name="lastid">翻页话题ID,首次请求时为0</param> /// <returns>获取用户以收藏的话题列表</returns> public ResponseData GetHTList(string requestUrl, PageFlag pageflag, long pagetime, int reqnum, long lastid) { Parameters parameters = new Parameters(); parameters.Add("format", this.ResponseDataFormat.ToString().ToLower()); parameters.Add("pageflag", (int)pageflag); parameters.Add("pagetime", pagetime); parameters.Add("reqnum", reqnum); parameters.Add("lastid", lastid); return this.GetResponseData<ResponseData>(requestUrl, parameters); }
/// <summary> /// Returns specified page of messages /// </summary> /// <param name="flag"></param> /// <param name="id"></param> /// <returns>List of messages in feed</returns> public override void Load(PageFlag flag, int id) { this.AddRange(Message.GetFollowingMessages(flag, id)); }
/// <summary> /// 采用默认API请求地址获取用户提及时间线 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <param name="lastid">当前页最后一条记录,用用精确翻页用</param> /// <returns>获取最新n条@提到我的微博。</returns> public TimelineData GetMentionsTimeline(PageFlag pageflag, long pagetime, int reqnum, long lastid) { return this.GetMentionsTimeline("http://open.t.qq.com/api/statuses/mentions_timeline", pageflag, pagetime, reqnum, lastid); }
public override void Load(PageFlag flag, int id, int pageId, bool threaded) { this.ObjectId = id; this.AddRange(Message.GetMessagesSentByUser(flag, id, pageId, threaded)); }
/// <summary> /// 采用默认API请求地址获取收藏的微博列表 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <returns>获取收藏的微博列表</returns> public TimelineData GetTweetList(PageFlag pageflag, long pagetime, int reqnum) { return(this.GetTweetList("http://open.t.qq.com/api/fav/list_t", pageflag, pagetime, reqnum)); }
/// <summary> /// Returns specified page of messages in threaded mode /// </summary> /// <param name="flag"></param> /// <param name="id"></param> /// <param name="threaded"></param> /// <returns>List of messages in feed</returns> public override void Load(PageFlag flag, int id, bool threaded) { this.AddRange(Message.GetReceivedMessages(flag, id, threaded)); }
/// <summary> /// 采用默认API请求地址获取私信发件箱列表 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <returns>获取私信发件箱列表</returns> public TimelineData GetSendList(PageFlag pageflag, long pagetime, int reqnum) { return(this.GetSendList("http://open.t.qq.com/api/private/send", pageflag, pagetime, reqnum)); }
/// <summary> /// 采用默认API请求地址获取话题时间线 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="httext">话题名字</param> /// <param name="pageinfo">分页标识(第一页 填空,继续翻页:根据返回的 pageinfo决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <returns>获取某个话题有关的最新n条微博。</returns> public HTTimelineData GetHTTimeline(PageFlag pageflag, string httext, string pageinfo, int reqnum) { return(this.GetHTTimeline("http://open.t.qq.com/api/statuses/ht_timeline", pageflag, httext, pageinfo, reqnum)); }
/// <summary> /// 采用默认API请求地址获取用户提及时间线 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <param name="lastid">当前页最后一条记录,用用精确翻页用</param> /// <returns>获取最新n条@提到我的微博。</returns> public TimelineData GetMentionsTimeline(PageFlag pageflag, long pagetime, int reqnum, long lastid) { return(this.GetMentionsTimeline("http://open.t.qq.com/api/statuses/mentions_timeline", pageflag, pagetime, reqnum, lastid)); }
/// <summary> /// 采用默认API请求地址获取其他用户发表时间线 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <param name="name">微博用户名</param> /// <returns>获取用户收听的人最新n条微博信息。</returns> public TimelineData GetUserTimeline(PageFlag pageflag, long pagetime, int reqnum, string name) { return(this.GetUserTimeline("http://open.t.qq.com/api/statuses/user_timeline", pageflag, pagetime, reqnum, name)); }
public override void Load(PageFlag flag, int id, int pageId) { this.ObjectId = id; this.AddRange(Message.GetMessagesInGroup(flag, id, id)); }
/// <summary> /// 采用默认API请求地址获取单条微博的转播内容/点评列表 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <param name="tweetid">微博id</param> /// <returns>获取单条微博的转播内容/点评列表</returns> public TimelineData GetReList(PageFlag pageflag, long pagetime, int reqnum, long tweetid) { return this.GetReList("http://open.t.qq.com/api/t/re_list", pageflag, pagetime, reqnum, tweetid); }
/// <summary> /// 采用默认API请求地址获取收藏的微博列表 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <returns>获取收藏的微博列表</returns> public TimelineData GetTweetList(PageFlag pageflag, long pagetime, int reqnum) { return this.GetTweetList("http://open.t.qq.com/api/fav/list_t", pageflag, pagetime, reqnum); }
private static void AddPageFlagParam(PageFlag pf, NameValueCollection parameters, int id) { if (pf == PageFlag.NEWER_THAN) parameters.Add("newer_than", id.ToString()); else parameters.Add("older_than", id.ToString()); }
/// <summary> /// 采用默认API请求地址获取私信发件箱列表 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <returns>获取私信发件箱列表</returns> public TimelineData GetSendList(PageFlag pageflag, long pagetime, int reqnum) { return this.GetSendList("http://open.t.qq.com/api/private/send", pageflag, pagetime, reqnum); }
/// <summary> /// 采用默认API请求地址获取单条微博的转播内容/点评列表 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <param name="tweetid">微博id</param> /// <returns>获取单条微博的转播内容/点评列表</returns> public TimelineData GetReList(PageFlag pageflag, long pagetime, int reqnum, long tweetid) { return(this.GetReList("http://open.t.qq.com/api/t/re_list", pageflag, pagetime, reqnum, tweetid)); }
/// <summary> /// 采用默认API请求地址获取用户以收藏的话题列表 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-15条)</param> /// <param name="lastid">翻页话题ID,首次请求时为0</param> /// <returns>获取用户以收藏的话题列表</returns> public ResponseData GetHTList(PageFlag pageflag, long pagetime, int reqnum, long lastid) { return(this.GetHTList("http://open.t.qq.com/api/fav/list_ht", pageflag, pagetime, reqnum, lastid)); }
/// <summary> /// 采用默认API请求地址获取主页时间线数据 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <returns>获取用户收听的人+用户本人最新n条微博信息,与用户“我的主页”返回内容相同。</returns> public TimelineData GetHomeTimeline(PageFlag pageflag, long pagetime, int reqnum) { return(this.GetHomeTimeline("http://open.t.qq.com/api/statuses/home_timeline", pageflag, pagetime, reqnum)); }
public abstract void Load(PageFlag flag, int id);
public override void Load(PageFlag flag, int id, int pageId) { this.ObjectId = id; this.AddRange(Message.GetMessagesTaggedWith(flag, id, pageId)); }
public abstract void Load(PageFlag flag, int id, bool threaded);
/// <summary> /// 模块信息是否初始化成功 /// </summary> /// <returns></returns> public bool IsMouduleInited() { return(!PageFlag.Equals(string.Empty)); }
/// <summary> /// Returns specified page of messages /// </summary> /// <param name="flag"></param> /// <param name="id"></param> /// <returns>List of messages in feed</returns> public override void Load(PageFlag flag, int id) { this.AddRange(Message.GetBookmarkedMessages(flag, id)); }
/// <summary> /// 获取获取话题时间线 /// </summary> /// <param name="requestUrl">API请求地址</param> /// <param name="pageflag">分页标识</param> /// <param name="httext">话题名字</param> /// <param name="pageinfo">分页标识(第一页 填空,继续翻页:根据返回的 pageinfo决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <returns>获取某个话题有关的最新n条微博。</returns> public HTTimelineData GetHTTimeline(string requestUrl, PageFlag pageflag, string httext, string pageinfo, int reqnum) { Parameters parameters = new Parameters(); parameters.Add("format", this.ResponseDataFormat.ToString().ToLower()); parameters.Add("pageflag", (int)pageflag); parameters.Add("httext", httext); parameters.Add("pageinfo", pageinfo); parameters.Add("reqnum", reqnum); return this.GetResponseData<HTTimelineData>(requestUrl, parameters); }
/// <summary> /// Messages followed by the logged-in user. Corresponds to the "Following" tab on the website. /// </summary> /// <param name="flag"></param> /// <param name="date"></param> /// <returns></returns> public static List<Message> GetFollowingMessages(PageFlag flag, int id, bool threaded) { NameValueCollection parameters = new NameValueCollection(); parameters.Add("threaded", threaded.ToString()); AddPageFlagParam(flag, parameters, id); return RetrieveMessages(Yammer.HttpUtility.Get(Resources.YAMMER_MESSAGES_FOLLOWING, parameters)); }
/// <summary> /// 采用默认API请求地址获取其他用户发表时间线 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <param name="name">微博用户名</param> /// <returns>获取用户收听的人最新n条微博信息。</returns> public TimelineData GetUserTimeline(PageFlag pageflag, long pagetime, int reqnum, string name) { return this.GetUserTimeline("http://open.t.qq.com/api/statuses/user_timeline", pageflag, pagetime, reqnum, name); }
/// <summary> /// Favorite messages of the given user ID. Can pass 'current' in place of user_id for currently logged in user /// </summary> /// <param name="id"></param> /// <returns></returns> public static List<Message> GetMessagesFavoritesOf(PageFlag flag, int id, int pageId, bool threaded) { NameValueCollection parameters = new NameValueCollection(); parameters.Add("threaded", threaded.ToString()); AddPageFlagParam(flag, parameters, pageId); return RetrieveMessages(Yammer.HttpUtility.Get(Resources.YAMMER_MESSAGES_FAVORITES_OF + id.ToString() + ".xml", parameters)); }
/// <summary> /// 采用默认API请求地址获取主页时间线数据 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <returns>获取用户收听的人+用户本人最新n条微博信息,与用户“我的主页”返回内容相同。</returns> public TimelineData GetHomeTimeline(PageFlag pageflag, long pagetime, int reqnum) { return this.GetHomeTimeline("http://open.t.qq.com/api/statuses/home_timeline", pageflag, pagetime, reqnum); }
/// <summary> /// Messages in the thread with the given ID. Corresponds to the page you'd see when clicking on "in reply to" on the website. /// </summary> /// <param name="id"></param> /// <returns></returns> public static List<Message> GetMessagesInThread(PageFlag flag, int id, int pageId) { NameValueCollection parameters = new NameValueCollection(); AddPageFlagParam(flag, parameters, pageId); return RetrieveMessages(Yammer.HttpUtility.Get(Resources.YAMMER_MESSAGES_IN_THREAD + id.ToString() + ".xml", parameters)); }
/// <summary> /// 采用默认API请求地址获取话题时间线 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="httext">话题名字</param> /// <param name="pageinfo">分页标识(第一页 填空,继续翻页:根据返回的 pageinfo决定)</param> /// <param name="reqnum">每次请求记录的条数(1-20条)</param> /// <returns>获取某个话题有关的最新n条微博。</returns> public HTTimelineData GetHTTimeline(PageFlag pageflag, string httext, string pageinfo, int reqnum) { return this.GetHTTimeline("http://open.t.qq.com/api/statuses/ht_timeline", pageflag, httext, pageinfo, reqnum); }
/// <summary> /// 采用默认API请求地址获取用户以收藏的话题列表 /// </summary> /// <param name="pageflag">分页标识</param> /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param> /// <param name="reqnum">每次请求记录的条数(1-15条)</param> /// <param name="lastid">翻页话题ID,首次请求时为0</param> /// <returns>获取用户以收藏的话题列表</returns> public ResponseData GetHTList(PageFlag pageflag, long pagetime, int reqnum, long lastid) { return this.GetHTList("http://open.t.qq.com/api/fav/list_ht", pageflag, pagetime, reqnum, lastid); }