Skip to content

Commit 3740992

Browse files
Kris CraigKris Craig
authored andcommitted
Renamed main class from RedditAPI to RedditClient.
1 parent a554db8 commit 3740992

35 files changed

Lines changed: 101 additions & 90 deletions

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ using Reddit;
5757

5858
...
5959

60-
var reddit = new RedditAPI("YourRedditAppID", "YourBotUserRefreshToken");
60+
var reddit = new RedditClient("YourRedditAppID", "YourBotUserRefreshToken");
6161
```
6262

6363
If you're using a "script"-type app instead, you'll also need to pass your app secret:
@@ -68,7 +68,7 @@ using Reddit;
6868
...
6969

7070
// You can also pass them as named parameters.
71-
var reddit = new RedditAPI(appId: "YourRedditAppID", appSecret: "YourRedditAppSecret", refreshToken: "YourBotUserRefreshToken");
71+
var reddit = new RedditClient(appId: "YourRedditAppID", appSecret: "YourRedditAppSecret", refreshToken: "YourBotUserRefreshToken");
7272
```
7373

7474
See below for more detailed usage examples.
@@ -255,7 +255,7 @@ using System;
255255
...
256256

257257
// Create a new Reddit.NET instance.
258-
var r = new RedditAPI("MyAppID", "MyRefreshToken");
258+
var r = new RedditClient("MyAppID", "MyRefreshToken");
259259

260260
// Display the name and cake day of the authenticated user.
261261
Console.WriteLine("Username: " + r.Account.Me.Name);
@@ -338,7 +338,7 @@ using System.Collections.Generic;
338338
...
339339

340340
// Create a new Reddit.NET instance.
341-
var r = new RedditAPI("MyAppID", "MyRefreshToken");
341+
var r = new RedditClient("MyAppID", "MyRefreshToken");
342342

343343
// Display the name and cake day of the authenticated user.
344344
Console.WriteLine("Username: " + r.Models.Account.Me().Name);

docs/examples/cs/Crosspost.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ using Reddit;
2525

2626
...
2727

28-
var reddit = new RedditAPI("YourRedditAppID", "YourBotUserRefreshToken");
28+
var reddit = new RedditClient("YourRedditAppID", "YourBotUserRefreshToken");
2929

3030
// Since we only need the posts, there's no need to call .About() on this one. --Kris
3131
var news = reddit.Subreddit("news");

docs/examples/cs/Daily Top Posts Wiki.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ using System;
3636

3737
...
3838

39-
var reddit = new RedditAPI("YourRedditAppID", "YourBotUserRefreshToken");
39+
var reddit = new RedditClient("YourRedditAppID", "YourBotUserRefreshToken");
4040

4141
var subreddit = reddit.Subreddit("MySub");
4242
var today = DateTime.Today;

docs/examples/cs/ELIZA.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ using System.Reflection;
5151
class ELIZA
5252
{
5353
private readonly ELIZALib Eliza;
54-
private readonly RedditAPI Reddit;
54+
private readonly RedditClient Reddit;
5555
public Dictionary<string, DateTime> ActiveSessions;
5656

5757
public bool Stop;
@@ -69,7 +69,7 @@ class ELIZA
6969
}
7070

7171
Eliza = new ELIZALib(json);
72-
Reddit = new RedditAPI("YourAppID", "YourRefreshToken");
72+
Reddit = new RedditClient("YourAppID", "YourRefreshToken");
7373
ActiveSessions = new Dictionary<string, DateTime>();
7474
}
7575

docs/examples/cs/Get LinkPost URL & SelfPost Body From Post.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ class Program
3636

3737
public class PostsHelper
3838
{
39-
private RedditAPI Reddit { get; set; }
39+
private RedditClient Reddit { get; set; }
4040

4141
public PostsHelper(string appId, string refreshToken)
4242
{
43-
Reddit = new RedditAPI(appId, refreshToken);
43+
Reddit = new RedditClient(appId, refreshToken);
4444
}
4545

4646
// Display the title of each post followed by the link URL (if it's a link post) or the Body (if it's a self post). --Kris

docs/examples/cs/Get Post From Permalink.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ using System.Text.RegularExpressions;
3030

3131
public class GetPost
3232
{
33-
private RedditAPI Reddit { get; set; }
33+
private RedditClient Reddit { get; set; }
3434

3535
public GetPost(string appId, string refreshToken)
3636
{
37-
Reddit = new RedditAPI(appId, refreshToken);
37+
Reddit = new RedditClient(appId, refreshToken);
3838
}
3939

4040
public Post FromPermalink(string permalink)

docs/examples/cs/Link to SelfPost.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ using Reddit;
2525

2626
...
2727

28-
var reddit = new RedditAPI("YourRedditAppID", "YourBotUserRefreshToken");
28+
var reddit = new RedditClient("YourRedditAppID", "YourBotUserRefreshToken");
2929

3030
// Retrieve the SelfPost we want and link to it on r/MySub. The host will automatically be replaced with np.reddit.com and r/AskReddit will be credited in the title. --Kris
3131
var newLinkPost = reddit.Subreddit("AskReddit").Posts.GetTop(t: "week")[0].XPostToAsLink("MySub");

docs/examples/cs/Monitor Modmail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace MonitorModmail
3434

3535
static void Main(string[] args)
3636
{
37-
var reddit = new RedditAPI("YourRedditAppID", "YourBotUserRefreshToken");
37+
var reddit = new RedditClient("YourRedditAppID", "YourBotUserRefreshToken");
3838

3939
NewMessages = new List<ConversationMessage>();
4040

docs/examples/cs/Monitor Subreddit Comments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace MonitorSubredditComments
3434

3535
static void Main(string[] args)
3636
{
37-
var reddit = new RedditAPI("YourRedditAppID", "YourBotUserRefreshToken");
37+
var reddit = new RedditClient("YourRedditAppID", "YourBotUserRefreshToken");
3838

3939
NewComments = new List<Comment>();
4040

docs/examples/cs/Paginated Posts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ using System.Collections.Generic;
2828

2929
...
3030

31-
var reddit = new RedditAPI("YourRedditAppID", "YourBotUserRefreshToken");
31+
var reddit = new RedditClient("YourRedditAppID", "YourBotUserRefreshToken");
3232

3333
// Since we only need the posts, there's no need to call .About() on this one. --Kris
3434
var worldnews = reddit.Subreddit("worldnews");

0 commit comments

Comments
 (0)