mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
feat: add vintage story support (#606)
* feat: add vintage story support * remove debug console.log
This commit is contained in:
parent
72893df2b3
commit
dcd12d0360
6 changed files with 60 additions and 6 deletions
17
protocols/vintagestorymaster.js
Normal file
17
protocols/vintagestorymaster.js
Normal 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 || []
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue