Files
YouTube.js/lib/parser/classes/SubscriptionNotificationToggleButton.js
LuanRT 68cb841c00 refactor!: finish parser migration
Finally! :)

This removes all code related to the old parser.

#65
2022-07-11 06:19:10 -03:00

20 lines
465 B
JavaScript

'use strict';
const Parser = require('..');
class SubscriptionNotificationToggleButton {
type = 'SubscriptionNotificationToggleButton';
constructor(data) {
this.states = data.states.map((state) => ({
id: state.stateId,
next_id: state.nextStateId,
state: Parser.parse(state.state)
}));
this.current_state_id = data.currentStateId;
this.target_id = data.targetId;
}
}
module.exports = SubscriptionNotificationToggleButton;