Beispiel #1
0
        public void Run(IWebAgent agent, string subreddit, Tweeter tweeter)
        {
            sub        = RedditSharp.Things.Subreddit.GetByNameAsync(agent, subreddit).Result;
            subTweeter = tweeter;
            var stream = sub.GetModerationLog().Stream();

            stream.Subscribe(this);
            stream.Enumerate(new System.Threading.CancellationToken());
        }
Beispiel #2
0
        public static Subreddit GetFrontPage(Reddit reddit)
        {
            var frontPage = new Subreddit
            {
                DisplayName = "Front Page",
                Title       = "reddit: the front page of the internet",
                Url         = new Uri("/", UriKind.Relative),
                Name        = "/",
                Reddit      = reddit,
                WebAgent    = reddit.WebAgent
            };

            return(frontPage);
        }
Beispiel #3
0
        public static Subreddit GetRSlashAll(Reddit reddit)
        {
            var rSlashAll = new Subreddit
            {
                DisplayName = "/r/all",
                Title       = "/r/all",
                Url         = new Uri("/r/all", UriKind.Relative),
                Name        = "all",
                Reddit      = reddit,
                WebAgent    = reddit.WebAgent
            };

            return(rSlashAll);
        }
Beispiel #4
0
 /// <summary>
 /// Returns the parent <see cref="Subreddit"/> for this post
 /// </summary>
 /// <returns></returns>
 public Task <Subreddit> GetSubredditAsync()
 {
     return(Subreddit.GetByNameAsync(WebAgent, SubredditName));
 }
Beispiel #5
0
 public static Subreddit GetFrontPage(Reddit reddit)
 {
     var frontPage = new Subreddit
     {
         DisplayName = "Front Page",
         Title = "reddit: the front page of the internet",
         Url = new Uri("/", UriKind.Relative),
         Name = "/",
         Reddit = reddit,
         WebAgent = reddit.WebAgent
     };
     return frontPage;
 }
Beispiel #6
0
 public static Subreddit GetRSlashAll(Reddit reddit)
 {
     var rSlashAll = new Subreddit
     {
         DisplayName = "/r/all",
         Title = "/r/all",
         Url = new Uri("/r/all", UriKind.Relative),
         Name = "all",
         Reddit = reddit,
         WebAgent = reddit.WebAgent
     };
     return rSlashAll;
 }
Beispiel #7
0
 public HighTechBanHammer(HighTechBanHammerSettings sets, RedditSharp.Things.Subreddit subreddit) : this()
 {
     Settings  = sets;
     Subreddit = subreddit;
 }
Beispiel #8
0
 public HighTechBanHammer( HighTechBanHammerSettings sets, RedditSharp.Things.Subreddit subreddit ) : this() {
     Settings = sets;
     Subreddit = subreddit;
 }