示例#1
0
        /// <summary>
        /// Get the "Following" feed which is conversations involving people, groups and topics that the user is following.
        /// </summary>
        /// <param name="limit">The returned message limit.</param>
        /// <param name="trim">The returned message trim / limit options.</param>
        /// <param name="thread">The thread options.</param>
        /// <returns>The <see cref="MessageEnvelope"/>.</returns>
        public async Task <MessageEnvelope> GetFollowing(
            int limit                 = Config.Message.DefaultQueryResponseLimit,
            MessageQueryTrim trim     = null,
            MessageQueryThread thread = MessageQueryThread.NoThread)
        {
            var query  = new MessageQuery(limit, trim, thread);
            var url    = this.GetFinalUrl(string.Format("{0}/following.json", Endpoints.Messages), query.SerializeQueryString());
            var result = await this.Client.GetAsync <MessageEnvelope>(url);

            return(result.Content);
        }
示例#2
0
        /// <summary>
        /// Get the algorithmic feed that corresponds to "Top" conversation.
        /// </summary>
        /// <param name="limit">The returned message limit.</param>
        /// <param name="trim">The returned message trim / limit options.</param>
        /// <param name="thread">The thread options.</param>
        /// <returns>The <see cref="MessageEnvelope"/>.</returns>
        public async Task<MessageEnvelope> GetTop(
            int limit = Config.Message.DefaultQueryResponseLimit,
            MessageQueryTrim trim = null,
            MessageQueryThread thread = MessageQueryThread.NoThread)
        {
            var query = new MessageQuery(limit, trim, thread);
            var url = this.GetFinalUrl(string.Format("{0}/algo.json", Endpoints.Messages), query.SerializeQueryString());
            var result = await this.Client.GetAsync<MessageEnvelope>(url);

            return result.Content;
        }