Skip to content

Commit

Permalink
Fix #55
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbdean committed Mar 18, 2015
1 parent a2d96ce commit 06dd81c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions src/main/java/net/dean/jraw/AccountPreferencesEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,36 @@ public AccountPreferencesEditor hideFromSearchEngines(boolean flag) {
return this;
}

/** Whether or not to receive email notifications of new messages or not */
public AccountPreferencesEditor emailMessages(boolean flag) {
args.put("email_messages", flag);
return this;
}

/** Whether or not to automatically renew reddit gold creddits */
public AccountPreferencesEditor autorenewCredits(boolean flag) {
args.put("creddit_autorenew", flag);
return this;
}

/** Whether or not to send username mentions to your inbox */
public AccountPreferencesEditor monitorMentions(boolean flag) {
args.put("monitor_mentions", flag);
return this;
}

/** Whether or not to show the user's Snoovatar */
public AccountPreferencesEditor showSnoovatar(boolean flag) {
args.put("show_snoovatar", flag);
return this;
}

/** Whether or not to force the use of HTTPS while browsing the website. API clients may choose not to obey this. */
public AccountPreferencesEditor forceHttps(boolean flag) {
args.put("force_https", flag);
return this;
}

/** Gets a new copy of the arguments that will be sent to the API */
public Map<String, Object> getArgs() {
return new HashMap<>(args);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/dean/jraw/managers/AccountManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ public void giveGold(String username, int months) throws NetworkException, ApiEx
/**
* Gets the preferences for this account
* @param names The specific names of the desired preferences. These can be found
* <a href="https://www.reddit.com/dev/api#GET_api_v1_me_prefs">here</a>.
* <a href="https://www.reddit.com/dev/api#GET_api_v1_me_prefs">here</a>. Leave empty to fetch all.
* @return An AccountPreferences that represent this account's preferences
* @throws NetworkException If the request was not successful
*/
Expand Down

0 comments on commit 06dd81c

Please sign in to comment.