Skip to content

General

gatecrasher777 edited this page Sep 9, 2021 · 1 revision

General

Methods

Some methods are common to all ytcog class objects.

info

info() returns an object's properties filtered by an exclusion list:

let info = object.info(exclusions);

exclusions is an array of property that should be ignored.

updateOptions

updateOptions() allows you to change an object's options without having to perform a fetch/download:

object.updateOptions(newOptions);

filename

filename() provides a simple way of embedding object property values in a string and sanitizing it for use as a filename.

let sanitizedEmbeddedFilename = object.filename(fn); 

fn is a string in which you can embed object property values by providing key placeholders.
For example '${channelId} - ${datetime} - ${id} - ${videoQuality}';

Clone this wiki locally