feat: add vintage story support (#606)

* feat: add vintage story support

* remove debug console.log
This commit is contained in:
CosminPerRam 2024-08-13 11:56:28 +03:00 committed by GitHub
parent 72893df2b3
commit dcd12d0360
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 60 additions and 6 deletions

View file

@ -0,0 +1,17 @@
import Core from './core.js'
export default class vintagestorymaster extends Core {
constructor () {
super()
this.usedTcp = true
}
async run (state) {
const response = await this.request({
url: 'https://masterserver.vintagestory.at/api/v1/servers/list',
responseType: 'json'
})
state.raw.servers = response?.data || []
}
}