Class: Reddit
#
Constructors#
constructor+ new Reddit(data
: RedditConstructor): Reddit
#
ParametersName | Type |
---|---|
data | RedditConstructor |
Returns: Reddit
Defined in: reddit.ts:31
#
Properties#
auth• Optional
auth: Auth
Defined in: reddit.ts:29
#
linkUrl• linkUrl: string= "https://www.reddit.com"
Defined in: reddit.ts:31
#
Accessors#
all• get all(): Subreddit
The r/all pseudo subreddit
Returns: Subreddit
Defined in: reddit.ts:219
#
self• get self(): null
| Self
Returns: null
| Self
Defined in: reddit.ts:227
#
Methods#
collectionâ–¸ collection(id
: string): Promise<Collection>
#
ParametersName | Type |
---|---|
id | string |
Returns: Promise<Collection>
Defined in: reddit.ts:232
#
loginâ–¸ login(data
: AuthData): Promise<void>
#
ParametersName | Type |
---|---|
data | AuthData |
Returns: Promise<void>
Defined in: reddit.ts:54
#
oauthâ–¸ oauth(clientId
: string, redirectUri
: string, scopes
: Scope[], temporary?
: boolean): string
#
ParametersName | Type |
---|---|
clientId | string |
redirectUri | string |
scopes | Scope[] |
temporary? | boolean |
Returns: string
Defined in: reddit.ts:154
#
searchSubmissionâ–¸ searchSubmission(query
: string, options?
: SubmissionSearchOptions): Promise<Page<FullSubmission, any>>
#
ParametersName | Type |
---|---|
query | string |
options? | SubmissionSearchOptions |
Returns: Promise<Page<FullSubmission, any>>
Defined in: reddit.ts:248
#
searchSubredditâ–¸ searchSubreddit(query
: string, options?
: SearchOptions): Promise<Page<FullSubreddit, any>>
Search subreddits by title and description
#
ParametersName | Type |
---|---|
query | string |
options? | SearchOptions |
Returns: Promise<Page<FullSubreddit, any>>
Defined in: reddit.ts:264
#
searchUserâ–¸ searchUser(query
: string, options?
: SearchOptions): Promise<Page<FullUser, any>>
#
ParametersName | Type |
---|---|
query | string |
options? | SearchOptions |
Returns: Promise<Page<FullUser, any>>
Defined in: reddit.ts:279
#
submissionâ–¸ submission(id
: string): Submission
Get a submission
example
Get the title of a submission
#
ParametersName | Type | Description |
---|---|---|
id | string | The id with or without a prefix |
Returns: Submission
Defined in: reddit.ts:209
#
subredditâ–¸ subreddit(...names
: string[]): Subreddit
#
ParametersName | Type |
---|---|
...names | string[] |
Returns: Subreddit
Defined in: reddit.ts:214
#
trendingSubredditsâ–¸ trendingSubreddits(): Promise<Subreddit[]>
Returns: Promise<Subreddit[]>
Defined in: reddit.ts:240
#
userâ–¸ user(name
: string): User
#
ParametersName | Type |
---|---|
name | string |
Returns: User
Defined in: reddit.ts:223