updated to version 0.1.14

This commit is contained in:
KungKurt 2025-02-23 14:49:29 +01:00
parent 533b925bd7
commit 9bcde89c31
3 changed files with 9 additions and 11 deletions

View File

@ -6,7 +6,7 @@
"authors": [ "authors": [
{ "name": "Robin Riis" } { "name": "Robin Riis" }
], ],
"version": "0.1.13", "version": "0.1.14",
"socket": true, "socket": true,
"minimumCoreVersion": 10, "minimumCoreVersion": 10,
"compatibility": { "compatibility": {

View File

@ -1,9 +1,9 @@
import { puckoprutt } from "./puckoapi/puckoapi.js"; import PuckoPruttApi from "./puckoapi/puckoapi.js";
import { puckocommand } from "./puckochat/commands.js"; import puckocommand from "./puckochat/commands.js";
let pp = null; let puckoprutt = null;
Hooks.once("setup", async function() { Hooks.once("setup", async function() {
pp = puckoprutt; puckoprutt = new PuckoPruttApi();
}); });
Hooks.on("init", async function() { Hooks.on("init", async function() {

View File

@ -1,4 +1,6 @@
class PuckoPruttApi {
export default class PuckoPruttApi {
constructor() { constructor() {
this.apiUrl = "https://api.puckoprutt.tech" this.apiUrl = "https://api.puckoprutt.tech"
this.schema = this.apiUrl + "/schema/" this.schema = this.apiUrl + "/schema/"
@ -8,7 +10,3 @@ class PuckoPruttApi {
return fetch(this.apiUrl + "/dagens_lunch/" + spider + "/", {method: "GET"}); return fetch(this.apiUrl + "/dagens_lunch/" + spider + "/", {method: "GET"});
} }
} }
const puckoprutt = new PuckoPruttApi();
export default puckoprutt;