CodeItem

CodeItem

Represents a code as shown in a feed

Constructor

new CodeItem()

Source:

Members

(nullable) avatarUrl :string

Source:
The link to the author's avatar if they have one
Type:
  • string

(nullable) badge :string

Source:
The name of the author's badge if they have one
Type:
  • string

comments :number

Source:
The amount of comments this code has
Type:
  • number

createdDate :string

Source:
The date this code was created
Type:
  • string

id :number

Source:
The ID of this code
Type:
  • number

isPublic :boolean

Source:
Whether or not this code is public
Type:
  • boolean

language :string

Source:
The programming language this code was written in
Type:
  • string

modifiedDate :string

Source:
The last time this code was modified
Type:
  • string

name :string

Source:
The name of this code
Type:
  • string

publicId :string

Source:
The public ID of this code
Type:
  • string

userId :number

Source:
The author's user ID
Type:
  • number

userName :string

Source:
The author's username
Type:
  • string

viewCount :number

Source:
The amount of views this code has
Type:
  • number

votes :number

Source:
The vote count of this code (upvotes - downvotes)
Type:
  • number

Methods

(async) getCode() → {Code}

Source:
Get the full code with all information
Returns:
Type
Code