@eco.js/plugin-elixr
Version:
A plugin for Eco.js for ElixrMods
18 lines (17 loc) • 575 B
JavaScript
import { Plugins } from 'eco.js';
export class ElixrPlugin extends Plugins.BasePlugin {
Name = 'ElixrPlugin';
async getRecipes() {
return this.http.GET('/elixr-mods/framework/api/v1/get-recipes', (_, dataRaw) => {
return new Map(Object.keys(dataRaw).map((itemName) => {
return [
itemName,
{ Name: itemName, ...Reflect.get(dataRaw, itemName) },
];
}));
});
}
async apiCheck() {
return this.http.GET('/elixr-mods/framework/api/v1');
}
}