moonlink.js / Exports / MoonlinkRestFul
Class: MoonlinkRestFul
Table of contents
Constructors
Properties
Methods
- decodeTrack
- decodeTracks
- delete
- destroy
- ensureUrlIsSet
- get
- getInfo
- getStats
- getVersion
- makeDeleteRequest
- makeGetRequest
- makePatchRequest
- makePostRequest
- patch
- post
- routePlannerFreeAddress
- routePlannerFreeAll
- setSessionId
- update
Constructors
constructor
• new MoonlinkRestFul(node
): MoonlinkRestFul
Parameters
Name | Type |
---|---|
node | MoonlinkNode |
Returns
Defined in
src/@Services/MoonlinkRestFul.ts:15
Properties
manager
• manager: MoonlinkManager
Defined in
src/@Services/MoonlinkRestFul.ts:10
node
• node: MoonlinkNode
Defined in
src/@Services/MoonlinkRestFul.ts:12
sessionId
• sessionId: string
Defined in
src/@Services/MoonlinkRestFul.ts:11
url
• url: string
Defined in
src/@Services/MoonlinkRestFul.ts:13
Methods
decodeTrack
▸ decodeTrack(encodedTrack
): Promise
<Record
<string
, unknown
>>
Parameters
Name | Type |
---|---|
encodedTrack | string |
Returns
Promise
<Record
<string
, unknown
>>
Defined in
src/@Services/MoonlinkRestFul.ts:65
decodeTracks
▸ decodeTracks(data
): Promise
<Record
<string
, unknown
>>
Parameters
Name | Type |
---|---|
data | RestOptions |
Returns
Promise
<Record
<string
, unknown
>>
Defined in
src/@Services/MoonlinkRestFul.ts:71
delete
▸ delete(endpoint
): Promise
<Record
<string
, unknown
>>
Parameters
Name | Type |
---|---|
endpoint | string |
Returns
Promise
<Record
<string
, unknown
>>
Defined in
src/@Services/MoonlinkRestFul.ts:60
destroy
▸ destroy(guildId
): Promise
<Record
<string
, unknown
>>
Parameters
Name | Type |
---|---|
guildId | string |
Returns
Promise
<Record
<string
, unknown
>>
Defined in
src/@Services/MoonlinkRestFul.ts:33
ensureUrlIsSet
▸ ensureUrlIsSet(): void
Returns
void
Defined in
src/@Services/MoonlinkRestFul.ts:111
get
▸ get(endpoint
): Promise
<any
>
Parameters
Name | Type |
---|---|
endpoint | string |
Returns
Promise
<any
>
Defined in
src/@Services/MoonlinkRestFul.ts:39
getInfo
▸ getInfo(): Promise
<Record
<string
, unknown
>>
Returns
Promise
<Record
<string
, unknown
>>
Defined in
src/@Services/MoonlinkRestFul.ts:77
getStats
▸ getStats(): Promise
<Record
<string
, unknown
>>
Returns
Promise
<Record
<string
, unknown
>>
Defined in
src/@Services/MoonlinkRestFul.ts:81
getVersion
▸ getVersion(): Promise
<any
>
Returns
Promise
<any
>
Defined in
src/@Services/MoonlinkRestFul.ts:85
makeDeleteRequest
▸ makeDeleteRequest(endpoint
): Promise
<Record
<string
, unknown
>>
Parameters
Name | Type |
---|---|
endpoint | string |
Returns
Promise
<Record
<string
, unknown
>>
Defined in
src/@Services/MoonlinkRestFul.ts:166
makeGetRequest
▸ makeGetRequest(endpoint
): Promise
<any
>
Parameters
Name | Type |
---|---|
endpoint | string |
Returns
Promise
<any
>
Defined in
src/@Services/MoonlinkRestFul.ts:117
makePatchRequest
▸ makePatchRequest(endpoint
, data
): Promise
<Record
<string
, unknown
>>
Parameters
Name | Type |
---|---|
endpoint | string |
data | any |
Returns
Promise
<Record
<string
, unknown
>>
Defined in
src/@Services/MoonlinkRestFul.ts:149
makePostRequest
▸ makePostRequest(endpoint
, data
): Promise
<Record
<string
, unknown
>>
Parameters
Name | Type |
---|---|
endpoint | string |
data | any |
Returns
Promise
<Record
<string
, unknown
>>
Defined in
src/@Services/MoonlinkRestFul.ts:132
patch
▸ patch(endpoint
, data
): Promise
<Record
<string
, unknown
>>
Parameters
Name | Type |
---|---|
endpoint | string |
data | any |
Returns
Promise
<Record
<string
, unknown
>>
Defined in
src/@Services/MoonlinkRestFul.ts:52
post
▸ post(endpoint
, data
): Promise
<Record
<string
, unknown
>>
Parameters
Name | Type |
---|---|
endpoint | string |
data | RestOptions |
Returns
Promise
<Record
<string
, unknown
>>
Defined in
src/@Services/MoonlinkRestFul.ts:44
routePlannerFreeAddress
▸ routePlannerFreeAddress(data
): Promise
<Record
<string
, unknown
>>
Parameters
Name | Type |
---|---|
data | RestOptions |
Returns
Promise
<Record
<string
, unknown
>>
Defined in
src/@Services/MoonlinkRestFul.ts:99
routePlannerFreeAll
▸ routePlannerFreeAll(data
): Promise
<Record
<string
, unknown
>>
Parameters
Name | Type |
---|---|
data | RestOptions |
Returns
Promise
<Record
<string
, unknown
>>
Defined in
src/@Services/MoonlinkRestFul.ts:105
setSessionId
▸ setSessionId(sessionId
): void
Parameters
Name | Type |
---|---|
sessionId | string |
Returns
void
Defined in
src/@Services/MoonlinkRestFul.ts:20
update
▸ update(data
): Promise
<Record
<string
, unknown
>>
Parameters
Name | Type |
---|---|
data | RestOptions |
Returns
Promise
<Record
<string
, unknown
>>