コード例 #1
0
            public static ApiPagedList <ApiStory> GetUserFriendsKickedStories(int hostID, string username, int pageNumber, int pageSize)
            {
                ApplyPageLimits(ref pageNumber, ref pageSize);
                PagedStoryCollection pagedCollection = new PagedStoryCollection();

                pagedCollection.Items = StoryCache.GetFriendsKickedStories(username, hostID, pageNumber, pageSize);
                pagedCollection.Total = StoryCache.GetFriendsKickedStoriesCount(username, hostID);
                return(pagedCollection.ToApi());
            }
コード例 #2
0
            public static ApiPagedList <ApiStory> GetUpcomingPageStories(int hostID, int pageNumber, int pageSize)
            {
                ApplyPageLimits(ref pageNumber, ref pageSize);
                PagedStoryCollection pagedCollection = new PagedStoryCollection();

                pagedCollection.Items = StoryCache.GetAllStories(false, hostID, pageNumber, pageSize);
                pagedCollection.Total = StoryCache.GetStoryCount(hostID, false);
                return(pagedCollection.ToApi());
            }
コード例 #3
0
            public static ApiPagedList <ApiStory> GetUpcomingStoriesPagedAndSorted(int hostID, int pageNumber, int pageSize, StoryListSortBy timePeriod)
            {
                ApplyPageLimits(ref pageNumber, ref pageSize);
                PagedStoryCollection pagedCollection = new PagedStoryCollection();

                pagedCollection.Items = StoryCache.GetPopularStories(hostID, false, timePeriod, pageNumber, pageSize);
                pagedCollection.Total = StoryCache.GetPopularStoriesCount(hostID, false, timePeriod);
                return(pagedCollection.ToApi());
            }
コード例 #4
0
            public static ApiPagedList <ApiStory> GetTaggedStories(int hostID, string tag, int pageNumber, int pageSize)
            {
                ApplyPageLimits(ref pageNumber, ref pageSize);
                PagedStoryCollection pagedCollection = new PagedStoryCollection();

                pagedCollection.Items = StoryCache.GetTaggedStories(tag, hostID, pageNumber, pageSize);
                pagedCollection.Total = StoryCache.GetTaggedStoryCount(tag, hostID);
                return(pagedCollection.ToApi());
            }