Skip to main content

Class: User

Hierarchy#

Implements#

Properties#

name#

• name: string

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


r#

• r: Reddit

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>>

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


commentsStream#

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

Parameters#

NameType
options?StreamOptions

Returns: AsyncIterator<FullComment, any, undefined>

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


fetch#

â–¸ fetch(): Promise<FullUser>

Returns: Promise<FullUser>

Implementation of: Fetchable.fetch

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


friend#

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

Parameters#

NameTypeDefault value
friendbooleantrue
note?string-

Returns: Promise<void>

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


givePremium#

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

Parameters#

NameType
monthsnumber

Returns: Promise<void>

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


is#

â–¸ is(u: User): boolean

Parameters#

NameType
uUser

Returns: boolean

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


multis#

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

Returns: Promise<Multi[]>

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


nameAvailable#

â–¸ nameAvailable(): Promise<boolean>

Returns: Promise<boolean>

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


sendMessage#

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

Parameters#

NameType
subjectstring
bodystring

Returns: Promise<void>

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


submissions#

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

Parameters#

NameType
options?GetOptions

Returns: Promise<Page<FullSubmission, any>>

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


submissionsStream#

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

Parameters#

NameType
options?StreamOptions

Returns: AsyncIterator<FullSubmission, any, undefined>

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


trophies#

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

Returns: Promise<Trophy[]>

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