mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-18 20:12:12 +00:00
* feat: add core comments section classes * chore: update type declarations * chore: fix linter warnings * style: fix linter * chore: update tests * chore(tests): fix typo * chore(tests): fix typo x2 * fix(tests): `getReplies()` method is only present in `CommentThread` and not `Comment` * chore(tests): fix comment id path * chore(tests): remove outdated code * chore(tests): fix results path * chore: enforce code style * chore: update type declarations * docs: add examples and documentation * chore(docs): fix paths * chore(docs): fix more paths * chore(docs): fix `Comments.js` path * chore(docs): fix typo * chore(docs): mention example file * chore(examples): fix imports * chore(examples): fix typo
25 lines
768 B
JavaScript
25 lines
768 B
JavaScript
'use strict';
|
|
|
|
const Thumbnail = require('./Thumbnail');
|
|
|
|
class ChannelMetadata {
|
|
type = 'ChannelMetadata';
|
|
|
|
constructor(data) {
|
|
this.title = data.title;
|
|
this.description = data.description;
|
|
this.url = data.channelUrl;
|
|
this.rss_urls = data.rssUrl;
|
|
this.vanity_channel_url = data.vanityChannelUrl;
|
|
this.external_id = data.externalId;
|
|
this.is_family_safe = data.isFamilySafe;
|
|
this.keywords = data.keywords;
|
|
this.avatar = Thumbnail.fromResponse(data.avatar);
|
|
this.available_countries = data.availableCountryCodes;
|
|
this.android_deep_link = data.androidDeepLink;
|
|
this.android_appindexing_link = data.androidAppindexingLink;
|
|
this.ios_appindexing_link = data.iosAppindexingLink;
|
|
}
|
|
}
|
|
|
|
module.exports = ChannelMetadata; |