示例#1
0
        /// <summary>
        /// Retrieve a list of posts using "rising" sort.
        /// </summary>
        /// <param name="categorizedSrListingInput">A valid CategorizedSrListingInput instance</param>
        /// <returns>A list of posts.</returns>
        public List <Post> GetRising(CategorizedSrListingInput categorizedSrListingInput)
        {
            List <Post> posts = Lists.GetPosts(Dispatch.Listings.Rising(categorizedSrListingInput, Subreddit), Dispatch);

            RisingLastUpdated = DateTime.Now;

            Rising = posts;
            return(posts);
        }
示例#2
0
        /// <summary>
        /// Retrieve a list of posts using "new" sort.
        /// </summary>
        /// <param name="categorizedSrListingInput">A valid CategorizedSrListingInput instance</param>
        /// <returns>A list of posts.</returns>
        public List <Post> GetNew(CategorizedSrListingInput categorizedSrListingInput)
        {
            List <Post> posts = Lists.GetPosts(Dispatch.Listings.New(categorizedSrListingInput, Subreddit), Dispatch);

            NewLastUpdated = DateTime.Now;

            New = posts;
            return(posts);
        }
示例#3
0
        /// <summary>
        /// Retrieve a list of posts using "best" sort.
        /// </summary>
        /// <param name="categorizedSrListingInput">A valid CategorizedSrListingInput instance</param>
        /// <returns>A list of posts.</returns>
        public List <Post> GetBest(CategorizedSrListingInput categorizedSrListingInput)
        {
            List <Post> posts = Lists.GetPosts(Dispatch.Listings.Best(categorizedSrListingInput), Dispatch);

            BestLastUpdated = DateTime.Now;

            Best = posts;
            return(posts);
        }
示例#4
0
 /// <summary>
 /// Get all user subreddits.
 /// The where parameter chooses the order in which the subreddits are displayed.
 /// popular sorts on the activity of the subreddit and the position of the subreddits can shift around.
 /// new sorts the user subreddits based on their creation date, newest first.
 /// This endpoint is a listing.
 /// </summary>
 /// <param name="where">One of (popular, new)</param>
 /// <param name="categorizedSrListingInput">A valid CategorizedSrListingInput instance</param>
 /// <returns>List of subreddit objects.</returns>
 public SubredditContainer GetUserSubreddits(string where, CategorizedSrListingInput categorizedSrListingInput)
 {
     return(SendRequest <SubredditContainer>("users/" + where, categorizedSrListingInput));
 }
示例#5
0
 /// <summary>
 /// Get subreddits the user has a relationship with.
 /// The where parameter chooses which subreddits are returned as follows:
 /// subscriber - subreddits the user is subscribed to
 /// contributor - subreddits the user is an approved submitter in
 /// moderator - subreddits the user is a moderator of
 /// streams - subscribed to subreddits that contain hosted video links
 /// See also: /api/subscribe, /api/friend, and /api/accept_moderator_invite.
 /// This endpoint is a listing.
 /// </summary>
 /// <param name="where">One of (subscriber, contributor, moderator, streams)</param>
 /// <param name="categorizedSrListingInput">A valid CategorizedSrListingInput instance</param>
 /// <returns>List of subreddit objects.</returns>
 public SubredditContainer Mine(string where, CategorizedSrListingInput categorizedSrListingInput)
 {
     return(SendRequest <SubredditContainer>("subreddits/mine/" + where, categorizedSrListingInput));
 }
示例#6
0
 /// <summary>
 /// Get users with whom the current user has friended, blocked, or trusted.
 /// </summary>
 /// <param name="where">One of (friends, messaging)</param>
 /// <param name="accountPrefsInput">A valid AccountPrefsInput instance</param>
 /// <returns>A listing of users.</returns>
 public List <UserPrefsContainer> PrefsList(string where, CategorizedSrListingInput accountPrefsInput)
 {
     return(SendRequest <List <UserPrefsContainer> >("prefs/" + where, accountPrefsInput));
 }
示例#7
0
 /// <summary>
 /// This endpoint is a listing.
 /// </summary>
 /// <param name="categorizedSrListingInput">A valid CategorizedSrListingInput instance</param>
 /// <returns>A list of Reddit posts.</returns>
 public PostContainer Best(CategorizedSrListingInput categorizedSrListingInput)
 {
     return(SendRequest <PostContainer>("best", categorizedSrListingInput));
 }
示例#8
0
 /// <summary>
 /// This endpoint is a listing.
 /// </summary>
 /// <param name="categorizedSrListingInput">A valid CategorizedSrListingInput instance</param>
 /// <param name="subreddit">The subreddit with the listing</param>
 /// <returns>A list of Reddit posts.</returns>
 public PostContainer Rising(CategorizedSrListingInput categorizedSrListingInput, string subreddit = null)
 {
     return(SendRequest <PostContainer>(Sr(subreddit) + "rising", categorizedSrListingInput));
 }