Skip to content

joeletizia/RedditSharp

 
 

Repository files navigation

RedditSharp

A partial implementation of the Reddit API.

var reddit = new Reddit();
var user = reddit.LogIn("username", "password");
var subreddit = reddit.GetSubreddit("/r/example");
subreddit.Subscribe();
var posts = subreddit.GetNew();
foreach (var post in posts)
{
    if (post.Title == "What is my karma?")
    {
        // Note: This is an example. Bots are not permitted to cast votes automatically.
        post.Upvote();
        var comment = post.Comment(string.Format("You have {0} link karma!", post.Author.LinkKarma));
        comment.Distinguish(DistinguishType.Moderator);
    }
}

This gets improved every time I need it to have new features.

About

C# Implementation of the Reddit API. I add to this whenever I need to do something new with Reddit.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%