Client - HedariKun/DonJS GitHub Wiki
Methods
-
constructor
Parameters | Default | Type | Description |
---|---|---|---|
token | string | bot's access token | |
apiUrl | string | mastodon's instance base url |
-
listenForNotifications
-
listenForStatuses
-
getInstance
-
sendStatus
Parameters | Default | Type | Description |
---|---|---|---|
status | string | the content of the status | |
attachments | null | [Attachment] | an array of attachments to attach them to the status |
sensitive | false | boolean | to set the status to be sensitive |
spoiler | false | boolean | to set the status to spoiler |
-
getClientAccount
-
getAccountByID
Parameters | Default | Type | Description |
---|---|---|---|
id | string | the id of the account you want to get |
-
followRemoteAccount
Parameters | Default | Type | Description |
---|---|---|---|
uri | string | the uri of the account you want to follow |
-
uploadMedia
Parameters | Default | Type | Description |
---|---|---|---|
stream | string | the data of the file you want to upload as based64 stream string | |
description | "" | string | the description you want to add to the attachment |
-
getStatusByID
Parameters | Default | Type | Description |
---|---|---|---|
id | number | the id of the status you want to get. |