C# Class BaconographyPortable.Model.Reddit.RedditService

Inheritance: IRedditService
Datei anzeigen Open project: Synergex/Baconography

Protected Properties

Property Type Description
_baconProvider IBaconProvider
_notificationService INotificationService
_settingsService ISettingsService
_simpleHttpService ISimpleHttpService
_userService IUserService

Private Properties

Property Type Description
FilterForNSFW Listing
FilterForNSFW Thing
GetCurrentLoginCookie Task
GetCurrentModhash Task
GetUserMultis Task
MaybeFilterForNSFW Listing
MaybeInjectAdvertisements Listing
ProcessJsonErrors void
SendPost Task
UserIsGold Task

Public Methods

Method Description
AddComment ( string parentId, string content ) : System.Threading.Tasks.Task
AddFlairInfo ( string linkId, string opName ) : void
AddMessage ( string recipient, string subject, string message ) : System.Threading.Tasks.Task
AddPost ( string kind, string url, string text, string subreddit, string title ) : System.Threading.Tasks.Task
AddReply ( string recipient, string subject, string message, string thing_id ) : System.Threading.Tasks.Task
AddReportOnThing ( string thingId ) : System.Threading.Tasks.Task
AddSavedThing ( string thingId ) : System.Threading.Tasks.Task
AddSubredditSubscription ( string subreddit, bool unsub ) : System.Threading.Tasks.Task
AddVote ( string thingId, int direction ) : System.Threading.Tasks.Task
CheckLogin ( string loginToken ) : Task
EditComment ( string thingId, string text ) : System.Threading.Tasks.Task
EditPost ( string text, string name ) : System.Threading.Tasks.Task
GetAccountInfo ( string accountName ) : Task>
GetAdditionalFromListing ( string baseUrl, string after, int limit ) : Task
GetCommentsOnPost ( string subreddit, string permalink, int limit ) : Task
GetDefaultSubreddits ( ) : Task
GetLinkByUrl ( string url ) : Task
GetMe ( ) : Task
GetMe ( User user ) : Task
GetMessages ( int limit ) : Task
GetMoreOnListing ( IEnumerable childrenIds, string contentId, string subreddit ) : Task
GetPostsBySubreddit ( string subreddit, int limit ) : Task
GetPostsByUser ( string username, int limit ) : Task
GetSubreddit ( string name ) : Task>
GetSubreddits ( int limit ) : Task
GetSubscribedSubredditListing ( ) : Task
GetSubscribedSubreddits ( ) : Task>
GetThingById ( string id ) : Task
GetUsernameModifiers ( string username, string linkid, string subreddit ) : AuthorFlairKind
Initialize ( ISettingsService settingsService, ISimpleHttpService simpleHttpService, IUserService userService, INotificationService notificationService, IBaconProvider baconProvider ) : void
Login ( string username, string password ) : Task
ReadMessage ( string id ) : System.Threading.Tasks.Task
Search ( string query, int limit, bool reddits, string restrictedToSubreddit ) : Task
SubmitCaptcha ( string captcha ) : System.Threading.Tasks.Task

Private Methods

Method Description
FilterForNSFW ( Listing source ) : Listing
FilterForNSFW ( Thing source ) : Thing
GetCurrentLoginCookie ( ) : Task
GetCurrentModhash ( ) : Task
GetUserMultis ( Listing listing ) : Task
MaybeFilterForNSFW ( Listing source ) : Listing
MaybeInjectAdvertisements ( Listing source ) : Listing
ProcessJsonErrors ( string response ) : void
SendPost ( string cookie, string>.Dictionary urlEncodedData, string uri, bool queuedMessage = false ) : Task
UserIsGold ( ) : Task

Method Details

AddComment() public method

public AddComment ( string parentId, string content ) : System.Threading.Tasks.Task
parentId string
content string
return System.Threading.Tasks.Task

AddFlairInfo() public method

public AddFlairInfo ( string linkId, string opName ) : void
linkId string
opName string
return void

AddMessage() public method

public AddMessage ( string recipient, string subject, string message ) : System.Threading.Tasks.Task
recipient string
subject string
message string
return System.Threading.Tasks.Task

AddPost() public method

public AddPost ( string kind, string url, string text, string subreddit, string title ) : System.Threading.Tasks.Task
kind string
url string
text string
subreddit string
title string
return System.Threading.Tasks.Task

AddReply() public method

public AddReply ( string recipient, string subject, string message, string thing_id ) : System.Threading.Tasks.Task
recipient string
subject string
message string
thing_id string
return System.Threading.Tasks.Task

AddReportOnThing() public method

public AddReportOnThing ( string thingId ) : System.Threading.Tasks.Task
thingId string
return System.Threading.Tasks.Task

AddSavedThing() public method

public AddSavedThing ( string thingId ) : System.Threading.Tasks.Task
thingId string
return System.Threading.Tasks.Task

AddSubredditSubscription() public method

public AddSubredditSubscription ( string subreddit, bool unsub ) : System.Threading.Tasks.Task
subreddit string
unsub bool
return System.Threading.Tasks.Task

AddVote() public method

public AddVote ( string thingId, int direction ) : System.Threading.Tasks.Task
thingId string
direction int
return System.Threading.Tasks.Task

CheckLogin() public method

public CheckLogin ( string loginToken ) : Task
loginToken string
return Task

EditComment() public method

public EditComment ( string thingId, string text ) : System.Threading.Tasks.Task
thingId string
text string
return System.Threading.Tasks.Task

EditPost() public method

public EditPost ( string text, string name ) : System.Threading.Tasks.Task
text string
name string
return System.Threading.Tasks.Task

GetAccountInfo() public method

public GetAccountInfo ( string accountName ) : Task>
accountName string
return Task>

GetAdditionalFromListing() public method

public GetAdditionalFromListing ( string baseUrl, string after, int limit ) : Task
baseUrl string
after string
limit int
return Task

GetCommentsOnPost() public method

public GetCommentsOnPost ( string subreddit, string permalink, int limit ) : Task
subreddit string
permalink string
limit int
return Task

GetDefaultSubreddits() public method

public GetDefaultSubreddits ( ) : Task
return Task

GetLinkByUrl() public method

public GetLinkByUrl ( string url ) : Task
url string
return Task

GetMe() public method

public GetMe ( ) : Task
return Task

GetMe() public method

public GetMe ( User user ) : Task
user User
return Task

GetMessages() public method

public GetMessages ( int limit ) : Task
limit int
return Task

GetMoreOnListing() public method

public GetMoreOnListing ( IEnumerable childrenIds, string contentId, string subreddit ) : Task
childrenIds IEnumerable
contentId string
subreddit string
return Task

GetPostsBySubreddit() public method

public GetPostsBySubreddit ( string subreddit, int limit ) : Task
subreddit string
limit int
return Task

GetPostsByUser() public method

public GetPostsByUser ( string username, int limit ) : Task
username string
limit int
return Task

GetSubreddit() public method

public GetSubreddit ( string name ) : Task>
name string
return Task>

GetSubreddits() public method

public GetSubreddits ( int limit ) : Task
limit int
return Task

GetSubscribedSubredditListing() public method

public GetSubscribedSubredditListing ( ) : Task
return Task

GetSubscribedSubreddits() public method

public GetSubscribedSubreddits ( ) : Task>
return Task>

GetThingById() public method

public GetThingById ( string id ) : Task
id string
return Task

GetUsernameModifiers() public method

public GetUsernameModifiers ( string username, string linkid, string subreddit ) : AuthorFlairKind
username string
linkid string
subreddit string
return AuthorFlairKind

Initialize() public method

public Initialize ( ISettingsService settingsService, ISimpleHttpService simpleHttpService, IUserService userService, INotificationService notificationService, IBaconProvider baconProvider ) : void
settingsService ISettingsService
simpleHttpService ISimpleHttpService
userService IUserService
notificationService INotificationService
baconProvider IBaconProvider
return void

Login() public method

public Login ( string username, string password ) : Task
username string
password string
return Task

ReadMessage() public method

public ReadMessage ( string id ) : System.Threading.Tasks.Task
id string
return System.Threading.Tasks.Task

Search() public method

public Search ( string query, int limit, bool reddits, string restrictedToSubreddit ) : Task
query string
limit int
reddits bool
restrictedToSubreddit string
return Task

SubmitCaptcha() public method

public SubmitCaptcha ( string captcha ) : System.Threading.Tasks.Task
captcha string
return System.Threading.Tasks.Task

Property Details

_baconProvider protected_oe property

protected IBaconProvider _baconProvider
return IBaconProvider

_notificationService protected_oe property

protected INotificationService _notificationService
return INotificationService

_settingsService protected_oe property

protected ISettingsService _settingsService
return ISettingsService

_simpleHttpService protected_oe property

protected ISimpleHttpService _simpleHttpService
return ISimpleHttpService

_userService protected_oe property

protected IUserService _userService
return IUserService