-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
58 lines (54 loc) · 1.1 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
* @package node-fetch
* @type {(function(*, *): Promise)|{Headers?: Headers, FetchError?: function(*, *, *): FetchError, Request?: Request, Response?: Response, readonly default?: function(*, *): Promise}}
*/
const fetch = require('node-fetch')
/**
*
* @type {string} api string
*/
const api = 'https://vultrex.dev/api';
/**
* @function SDK
* @constructor
*/
function SDK() {}
/**
*
* @returns {Promise<*>}
*/
SDK.prototype.honk = function () {
return fetch(`${api}/honk`).then(x => x.text())
}
/**
*
* @returns {Promise<*>}
*/
SDK.prototype.slap = function () {
return fetch(`${api}/slap`).then(x => x.text())
}
/**
*
* @returns {Promise<*>}
*/
SDK.prototype.bonk = function () {
return fetch(`${api}/bonk`).then(x => x.text())
}
/**
*
* @returns {Promise<*>}
*/
SDK.prototype.cry = function () {
return fetch(`${api}/cry`).then(x => x.text())
}
/**
*
* @returns {Promise<*>}
*/
SDK.prototype.hug = function () {
return fetch(`${api}/hug`).then(x => x.text())
}
SDK.prototype.wave = function () {
return fetch(`${api}/wave`).then(x => x.text())
}
module.exports = SDK;