Skip to content

Commit

Permalink
feat(Channel): Add getCourses method (#883)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkyProgrammer authored Feb 11, 2025
1 parent 75d39e7 commit b3a4862
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/parser/youtube/Channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ export default class Channel extends TabbedFeed<IBrowseResponse> {
return new Channel(this.actions, tab.page, true);
}

async getCourses(): Promise<Channel> {
const tab = await this.getTabByURL('courses');
return new Channel(this.actions, tab.page, true);
}

async getPlaylists(): Promise<Channel> {
const tab = await this.getTabByURL('playlists');
return new Channel(this.actions, tab.page, true);
Expand Down Expand Up @@ -269,6 +274,10 @@ export default class Channel extends TabbedFeed<IBrowseResponse> {
return this.hasTabWithURL('podcasts');
}

get has_courses(): boolean {
return this.hasTabWithURL('courses');
}

get has_playlists(): boolean {
return this.hasTabWithURL('playlists');
}
Expand Down

0 comments on commit b3a4862

Please sign in to comment.