Skip to main content

Class: Self

Hierarchy#

Properties#

name#

• name: string

Inherited from: User.name

Defined in: objects/user/small.ts:16


r#

• r: Reddit

Inherited from: User.r

Defined in: objects/user/small.ts:14

Accessors#

key#

• get key(): string

Returns: string

Defined in: objects/user/small.ts:17


url#

• get url(): string

Returns: string

Defined in: objects/user/small.ts:31

Methods#

comments#

â–¸ comments(options?: GetOptions): Promise<Page<FullComment, any>>

Parameters#

NameType
options?GetOptions

Returns: Promise<Page<FullComment, any>>

Inherited from: User

Defined in: objects/user/small.ts:116


commentsStream#

â–¸ commentsStream(options?: StreamOptions): AsyncIterator<FullComment, any, undefined>

Parameters#

NameType
options?StreamOptions

Returns: AsyncIterator<FullComment, any, undefined>

Inherited from: User

Defined in: objects/user/small.ts:125


fetch#

â–¸ fetch(): Promise<FullUser>

Returns: Promise<FullUser>

Inherited from: User

Defined in: objects/user/small.ts:35


friend#

â–¸ friend(friend?: boolean, note?: string): Promise<void>

Parameters#

NameTypeDefault value
friendbooleantrue
note?string-

Returns: Promise<void>

Inherited from: User

Defined in: objects/user/small.ts:58


friends#

â–¸ friends(): Promise<Relation[]>

Returns: Promise<Relation[]>

Defined in: objects/user/self/index.ts:30


givePremium#

â–¸ givePremium(months: number): Promise<void>

Parameters#

NameType
monthsnumber

Returns: Promise<void>

Inherited from: User

Defined in: objects/user/small.ts:49


hidden#

â–¸ hidden(options?: GetOptions): Promise<Page<FullSubmission, any>>

Parameters#

NameType
options?GetOptions

Returns: Promise<Page<FullSubmission, any>>

Defined in: objects/user/self/index.ts:116


hiddenStream#

â–¸ hiddenStream(options?: StreamOptions): AsyncIterator<FullSubmission, any, undefined>

Parameters#

NameType
options?StreamOptions

Returns: AsyncIterator<FullSubmission, any, undefined>

Defined in: objects/user/self/index.ts:125


is#

â–¸ is(u: User): boolean

Parameters#

NameType
uUser

Returns: boolean

Inherited from: User

Defined in: objects/user/small.ts:27


messagesStream#

â–¸ messagesStream(options?: StreamOptions): AsyncIterator<Message, any, undefined>

Parameters#

NameType
options?StreamOptions

Returns: AsyncIterator<Message, any, undefined>

Defined in: objects/user/self/index.ts:61


multis#

â–¸ multis(): Promise<Multi[]>

Returns: Promise<Multi[]>

Inherited from: User

Defined in: objects/user/small.ts:91


nameAvailable#

â–¸ nameAvailable(): Promise<boolean>

Returns: Promise<boolean>

Inherited from: User

Defined in: objects/user/small.ts:42


prefs#

â–¸ prefs(): Promise<Preferences>

Returns: Promise<Preferences>

Defined in: objects/user/self/index.ts:134


saved#

â–¸ saved(options?: GetOptions): Promise<Page<FullSubmission, any>>

Parameters#

NameType
options?GetOptions

Returns: Promise<Page<FullSubmission, any>>

Defined in: objects/user/self/index.ts:98


savedStream#

â–¸ savedStream(options?: StreamOptions): AsyncIterator<FullSubmission, any, undefined>

Parameters#

NameType
options?StreamOptions

Returns: AsyncIterator<FullSubmission, any, undefined>

Defined in: objects/user/self/index.ts:107


sendMessage#

â–¸ sendMessage(subject: string, body: string): Promise<void>

Parameters#

NameType
subjectstring
bodystring

Returns: Promise<void>

Inherited from: User

Defined in: objects/user/small.ts:134


submissions#

â–¸ submissions(options?: GetOptions): Promise<Page<FullSubmission, any>>

Parameters#

NameType
options?GetOptions

Returns: Promise<Page<FullSubmission, any>>

Inherited from: User

Defined in: objects/user/small.ts:98


submissionsStream#

â–¸ submissionsStream(options?: StreamOptions): AsyncIterator<FullSubmission, any, undefined>

Parameters#

NameType
options?StreamOptions

Returns: AsyncIterator<FullSubmission, any, undefined>

Inherited from: User

Defined in: objects/user/small.ts:107


subreddits#

â–¸ subreddits(options?: GetOptions): Promise<Page<FullSubreddit, any>>

Parameters#

NameType
options?GetOptions

Returns: Promise<Page<FullSubreddit, any>>

Defined in: objects/user/self/index.ts:41


subredditsStream#

â–¸ subredditsStream(options?: StreamOptions): AsyncIterator<FullSubreddit, any, undefined>

Parameters#

NameType
options?StreamOptions

Returns: AsyncIterator<FullSubreddit, any, undefined>

Defined in: objects/user/self/index.ts:51


trophies#

â–¸ trophies(): Promise<Trophy[]>

Returns: Promise<Trophy[]>

Inherited from: User

Defined in: objects/user/small.ts:83


updatePrefs#

â–¸ updatePrefs(prefs: Optional<Preferences>): Promise<void>

Parameters#

NameType
prefsOptional<Preferences>

Returns: Promise<void>

Defined in: objects/user/self/index.ts:225


voted#

â–¸ voted(dir: 1 | -1, options?: GetOptions): Promise<Page<FullSubmission, any>>

Parameters#

NameType
dir1 | -1
options?GetOptions

Returns: Promise<Page<FullSubmission, any>>

Defined in: objects/user/self/index.ts:71


votedStream#

â–¸ votedStream(dir: 1 | -1, options?: StreamOptions): AsyncIterator<FullSubmission, any, undefined>

Parameters#

NameType
dir1 | -1
options?StreamOptions

Returns: AsyncIterator<FullSubmission, any, undefined>

Defined in: objects/user/self/index.ts:83