Example #1
0
        public static UriYoutubeFeed GetStandardFeed(
                STANDARD_FEED_REGION region, 
                STANDARD_FEED_TYPE type,
                STANDARD_FEED_CATEGORY category, 
                YoutubeDesktop.Youtube.UriYoutube.ParamYoutubePageable.STANDARD_FEED_TIME time = 
                    YoutubeDesktop.Youtube.UriYoutube.ParamYoutubePageable.STANDARD_FEED_TIME.all_time)
        {
            object[] args = new object[] { region, type, category };
            string format = "http://gdata.youtube.com/feeds/api/standardfeeds";

            if (region != STANDARD_FEED_REGION.none)
            {
                format += @"/{0}";
            }

            if (category == STANDARD_FEED_CATEGORY.none)
            {
                format += @"/{1}";
            }
            else
            {
                format += @"/{1}_{2}";
            }

            ParamYoutubeSearchVideos par = new ParamYoutubeSearchVideos(
                    "",
                    ParamYoutubeSearchVideos.OrderBy.relevance,
                    1, 10);
            //---
            if (time != YoutubeDesktop.Youtube.UriYoutube.ParamYoutubePageable.STANDARD_FEED_TIME.all_time)
                par.Data["time"] = time.ToString();

            return new UriYoutubeFeed(
                    string.Format(format, args), par);
            //---
        }
Example #2
0
        public static UriYoutubeFeed GetStandardFeed(
                    STANDARD_FEED_TYPE type, 
                    YoutubeDesktop.Youtube.UriYoutube.ParamYoutubePageable.STANDARD_FEED_TIME time = YoutubeDesktop.Youtube.UriYoutube.ParamYoutubePageable.STANDARD_FEED_TIME.all_time)
        {
            //---
            ParamYoutubeSearchVideos arg = new ParamYoutubeSearchVideos("", ParamYoutubeSearchVideos.OrderBy.relevance, 1, 10);
            arg.Data["time"] = time.ToString();

            return new UriYoutubeFeed(String.Format("http://gdata.youtube.com/feeds/api/standardfeeds/{0}", type), arg);
        }