Exemple #1
0
        public Subscription Subscribe(Dictionary <string, string> parameters)
        {
            parameters["url"] = "http://feeds.delicious.com/v2/rss/" + parameters["delicious_username"] + "?count=15";
            var subscription = _TheRssPlugin.Subscribe(parameters);

            subscription.Icon = ICON_PATH;
            subscription.Type = GetTypeName();

            return(subscription);
        }
        public Subscription Subscribe(Dictionary <string, string> parameters)
        {
            Subscription subscription = null;
            var          url          = "http://twitter.com/" + parameters["twitter_username"];

            var content = WebHelper.DownloadString(url);

            var matches = Regex.Matches(content, @"<(link)\s*[^>]*(href)=""(?<href>([^""]*))""\s*[^>]*(title)="""
                                        + @"(?<title>([^""]*))""", RegexOptions.Compiled);

            if (matches.Count > 0)
            {
                parameters["url"] = matches[0].Groups["href"].Value;
                subscription      = _TheRssPlugin.Subscribe(parameters);
                subscription.Icon = ICON_PATH;
                subscription.Type = GetTypeName();
            }

            return(subscription);
        }