Program
Defined in: src/Program.ts:56
Extends
default
<ProgramSchema
<UserSchema
>,IProgram
>
Implements
Constructors
new Program()
new Program(
data
?):Program
Defined in: src/lib/Wrapper.ts:36
Creates a new class instance
Parameters
data?
Returns
Inherited from
Wrapper<ProgramSchema<UserSchema>, IProgram>.constructor
new Program()
new Program(
client
,data
?):Program
Defined in: src/lib/Wrapper.ts:37
Parameters
client
data?
Returns
Inherited from
Wrapper<ProgramSchema<UserSchema>, IProgram>.constructor
Properties
author?
readonly
optional
author:User
Defined in: src/Program.ts:78
The author of the program.
Implementation of
client?
optional
client:Client
Defined in: src/lib/Wrapper.ts:15
The client that this base was fetched with.
Inherited from
Wrapper.client
code?
readonly
optional
code:string
Defined in: src/Program.ts:118
The code of the program.
Implementation of
created?
readonly
optional
created:Date
Defined in: src/Program.ts:82
The date the program was created.
Implementation of
deleted?
readonly
optional
deleted:boolean
Defined in: src/Program.ts:147
Whether the program has been deleted.
Implementation of
description?
readonly
optional
description:null
|string
Defined in: src/Program.ts:143
The description of the program. Set to null
if the description is empty string.
Implementation of
height?
readonly
optional
height:number
Defined in: src/Program.ts:103
The height of the program in pixels.
Description
Constrained between 400 and 600. May be any value in between.
Implementation of
helpRequests?
readonly
optional
helpRequests:Question
[]
Defined in: src/Program.ts:164
Implementation of
hidden?
readonly
optional
hidden:boolean
Defined in: src/Program.ts:122
Whether the program is hidden from the hotlist.
Implementation of
id?
readonly
optional
id:number
Defined in: src/Program.ts:70
The ID of the program.
Implementation of
key?
readonly
optional
key:`ag5zfmtoYW4tYWNhZGVteXI${string}CxIKU2NyYXRjaHBhZB${string}${string}`
Defined in: src/Program.ts:132
Implementation of
origin?
readonly
optional
origin:null
|Program
Defined in: src/Program.ts:131
The original program that this program is a spin-off of.
Implementation of
questions?
readonly
optional
questions:Question
[]
Defined in: src/Program.ts:163
Implementation of
rawData?
optional
rawData:RecursivePartial
<ProgramSchema
<UserSchema
<AvatarSchema
,ProfileSchema
,ListProgramsSchema
<unknown
>>>>
Defined in: src/lib/Wrapper.ts:22
The raw base schema data
Remarks
Only set if the base was created from a user schema.
Inherited from
Wrapper.rawData
selfFlagged?
readonly
optional
selfFlagged:boolean
Defined in: src/Program.ts:154
Whether the program has been flagged by the client's authenticated user.
See
Implementation of
selfVoted?
readonly
optional
selfVoted:boolean
Defined in: src/Program.ts:160
Whether the program has been voted by the client's authenticated user.
See
Implementation of
spinOffCount?
readonly
optional
spinOffCount:number
Defined in: src/Program.ts:114
The number of spin-offs the program has.
Implementation of
thumbnailID?
readonly
optional
thumbnailID:number
Defined in: src/Program.ts:139
The ID of the latest thumbnail image of the program.
Description
Previous thumbnails are not guaranteed to be available.
Implementation of
tipsAndThanks?
readonly
optional
tipsAndThanks:TipsAndThanks
[]
Defined in: src/Program.ts:162
Implementation of
title?
readonly
optional
title:string
Defined in: src/Program.ts:74
The title of the program.
Implementation of
type?
readonly
optional
type:ProgramType
Defined in: src/Program.ts:126
The type of program.
Implementation of
updated?
readonly
optional
updated:null
|Date
Defined in: src/Program.ts:89
The date the program was last updated.
Description
Set to null
if the program has never been updated.
Implementation of
votes?
readonly
optional
votes:number
Defined in: src/Program.ts:110
The number of votes the program has received.
Description
Note that a program has 1 vote on creation.
Implementation of
width?
readonly
optional
width:number
Defined in: src/Program.ts:96
The height of the program in pixels.
Description
Constrained between 400 and 600. May be any value in between.
Implementation of
Type
readonly
static
Type: typeofProgramType
=ProgramType
Defined in: src/Program.ts:65
Aliases for the program types.
Raw
ProgramRevisionSchema.editorType
Accessors
lines
Get Signature
get lines():
null
|number
Defined in: src/Program.ts:173
Number of lines of code in the program.
Returns
null
| number
shortUrl
Get Signature
get shortUrl():
null
|string
Defined in: src/Program.ts:192
Short URL of the program.
Returns
null
| string
spinoff
Get Signature
get spinoff():
null
|boolean
Defined in: src/Program.ts:166
Returns
null
| boolean
thumbnailUrl
Get Signature
get thumbnailUrl():
null
|string
Defined in: src/Program.ts:203
Thumbnail image URL of the program.
Description
To get the latest thumbnail image, use 'latest' as the thumbnail ID instead.
Returns
null
| string
url
Get Signature
get url():
null
|string
Defined in: src/Program.ts:181
URL of the program.
Returns
null
| string
Methods
copy()
copy(
data
):Program
Defined in: src/lib/Wrapper.ts:53
Updates data into the class
Parameters
data
The data to copy from
Returns
The class instance
Inherited from
Wrapper.copy
copyFromSchema()
copyFromSchema(
schema
):Program
Defined in: src/lib/Wrapper.ts:65
Updates data from a schema into the instance
Parameters
schema
RecursivePartial
<ProgramSchema
<UserSchema
<AvatarSchema
, ProfileSchema
, ListProgramsSchema
<unknown
>>>>
The schema to copy from
Returns
The class instance
Inherited from
Wrapper.copyFromSchema
get()
get(
client
):Promise
<Program
>
Defined in: src/Program.ts:325
Gets and updates the instance's data