Constructor
new Messages(api)
Main constructor
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
api |
MkmApi
|
Parent api to make the calls |
Methods
(async) delete(idOtherUser, idMessage) → {Promise}
Delete a single message from an user
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
idOtherUser |
int
|
User id of the sender |
idMessage |
int
|
Message id |
Returns:
- Type:
-
Promise
Operation result
(async) deleteThread(idOtherUser) → {Promise}
Delete all messages from an user
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
idOtherUser |
int
|
User id of the thread |
Returns:
- Type:
-
Promise
Operation result
(async) get() → {Promise}
Get all messages
- Source:
Returns:
- Type:
-
Promise
List of messages
(async) send(idOtherUser, message) → {Promise}
Send a message to another user
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
idOtherUser |
int
|
User id of the recipient |
message |
String
|
Content of the message |
Returns:
- Type:
-
Promise
Operation result