Channel

Channel

Represents a YouTube channel

Constructor

new Channel(youtube, data)

Source:
Parameters:
Name Type Description
youtube YouTube The YouTube instance creating this
data Object The data of the channel

Members

(nullable) commentCount :number

The number of comments on the channel
Source:
Type:
  • number

(nullable) country :string

The country of the channel
Source:
Type:
  • string

(nullable) customURL :string

The channel's custom URL if it has one
Source:
Type:
  • string

(nullable) defaultLanguage :string

The channel's default language
Source:
Type:
  • string

(nullable) description :string

This channel's description
Source:
Type:
  • string

full :boolean

Whether this is a full channel object.
Source:
Type:
  • boolean

(nullable) hiddenSubscriberCount :boolean

Whether the channel's subscriber count is public
Source:
Type:
  • boolean

id :string

This channel's ID
Source:
Type:
  • string

kind :string

The YouTube resource from which this channel was created.
Source:
Type:
  • string

(nullable) localized :Object

Information about the channel as specified in the `hl` query parameter
Source:
Type:
  • Object

(nullable) publishedAt :Date

The channel's creation date
Source:
Type:
  • Date

raw :object

Raw data from the YouTube API
Source:
Type:
  • object

(nullable) relatedPlaylists :Object

Playlists associated with this channel; all values are playlist IDs
Properties:
Name Type Attributes Description
likes string <nullable>
The channel's liked videos
favorites string <nullable>
The channel's favorited videos (note: favorited videos are deprecated)
uploads string <nullable>
The channel's uploaded videos
Source:
Type:
  • Object

(nullable) subscriberCount :number

The number of subscribers the channel has
Source:
Type:
  • number

(nullable) thumbnails :Object.<string, Thumbnail>

The channel's thumbnails: available types are 'default', 'medium', and 'high'
Source:
Type:

(nullable) title :string

This channel's title
Source:
Type:
  • string

type :string

The type to filter search results
Source:
Type:
  • string

url :string

The URL to this channel
Source:
Type:
  • string

(nullable) videoCount :number

The number of videos this channel has uploaded
Source:
Type:
  • number

(nullable) viewCount :number

The number of times the channel has been viewed
Source:
Type:
  • number

youtube :YouTube

The YouTube instance that created this
Source:
Type:

Methods

(static) extractID(url) → (nullable) {string}

Get a channel ID from a string (URL or ID)
Source:
Parameters:
Name Type Description
url string The string to get the ID from
Returns:
Type:
string

fetch(optionsopt) → {Channel}

Fetch the full representation of this channel.
Source:
Parameters:
Name Type Attributes Description
options object <optional>
Any extra query params
Returns:
Type:
Channel