-
Notifications
You must be signed in to change notification settings - Fork 1
Extension API V1
appdevelpo edited this page Apr 14, 2026
·
1 revision
Miru API V1 uses a class-based inheritance approach. This version is maintained for backward compatibility but V2 is recommended for new extensions.
To implement a V1 extension, you must define a class that extends the base Extension class.
class MyExtension extends Extension {
async load() {
// Initialization
}
async latest(page) {
// Return latest items
}
async search(kw, page, filter) {
// Search items
}
async createFilter(filter) {
// Define filters
}
async detail(url) {
// Get details and episodes
}
async watch(url) {
// Get playable content
}
}- Class-Based: Methods must be defined on a class.
-
Context: Access metadata via
this.webSite,this.name, etc. -
Settings: Register via
this.registerSetting()and retrieve viaawait this.getSetting().
Same as V2, you can use fetch() or the legacy Miru.request(). Built-in modules like linkedom and crypto-js are available via require().