refactor: Cookie-based session fixes and minor additions (#821)

* (fix) `on_behalf_of_user` arg not applied

* (feat) `AccountManager#getInfo()`: Add option to fetch full accounts list
This commit is contained in:
Patrick Kan
2024-11-29 04:44:30 +08:00
committed by GitHub
parent 386257c7b3
commit a7bb981731
7 changed files with 87 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
import type { ObservedArray } from '../../helpers.js';
import { YTNode } from '../../helpers.js';
import { Parser, type RawNode } from '../../index.js';
import ChannelSwitcherPage from '../ChannelSwitcherPage.js';
export default class UpdateChannelSwitcherPageAction extends YTNode {
static type = 'UpdateChannelSwitcherPageAction';
public header?: YTNode;
public contents?: ObservedArray<YTNode> | null;
constructor(data: RawNode) {
super();
const page = Parser.parseItem(data.page, ChannelSwitcherPage);
if (page) {
this.header = page.header;
this.contents = page.contents;
}
}
}