mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-16 19:12:24 +00:00
20 lines
500 B
JavaScript
20 lines
500 B
JavaScript
'use strict';
|
|
|
|
const Text = require('./Text');
|
|
const NavigationEndpoint = require('./NavigationEndpoint');
|
|
|
|
class SearchSuggestion {
|
|
type = 'SearchSuggestion';
|
|
|
|
constructor(data) {
|
|
this.suggestion = new Text(data.suggestion);
|
|
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
|
|
this.icon_type = data.icon.iconType;
|
|
|
|
if (data.serviceEndpoint) {
|
|
this.service_endpoint = new NavigationEndpoint(data.serviceEndpoint);
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = SearchSuggestion; |