2024-04-08 18:41:52 +02:00
|
|
|
import Core from './core.js'
|
2024-01-20 23:36:05 +01:00
|
|
|
|
2024-04-08 18:41:52 +02:00
|
|
|
export default class palworld extends Core {
|
|
|
|
async run (state) {
|
|
|
|
const url = `http://${this.options.host}:${this.options.port}/v1/api/info`
|
|
|
|
const headers = {
|
|
|
|
Authorization: `Basic ${Buffer.from(`${this.options.username}:${this.options.password}`).toString('base64')}`,
|
|
|
|
Accept: 'application/json'
|
|
|
|
}
|
2024-01-20 23:36:05 +01:00
|
|
|
|
2024-04-08 18:41:52 +02:00
|
|
|
const response = await this.request({ url, headers, method: 'GET' })
|
2024-01-21 22:16:56 +01:00
|
|
|
|
2024-04-08 18:41:52 +02:00
|
|
|
console.log(response)
|
2024-01-21 22:16:56 +01:00
|
|
|
}
|
2024-01-20 23:36:05 +01:00
|
|
|
}
|