mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 20:41:17 +00:00
refactor!: finish parser migration
Finally! :) This removes all code related to the old parser. #65
This commit is contained in:
17
lib/parser/classes/SearchRefinementCard.js
Normal file
17
lib/parser/classes/SearchRefinementCard.js
Normal file
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
const NavigationEndpoint = require('./NavigationEndpoint');
|
||||
const Thumbnail = require('./Thumbnail');
|
||||
const Text = require('./Text');
|
||||
|
||||
class SearchRefinementCard {
|
||||
type = 'SearchRefinementCard';
|
||||
|
||||
constructor(data) {
|
||||
this.thumbnails = Thumbnail.fromResponse(data.thumbnail);
|
||||
this.endpoint = new NavigationEndpoint(data.searchEndpoint);
|
||||
this.query = new Text(data.query).toString();
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = SearchRefinementCard;
|
||||
Reference in New Issue
Block a user