Messages

Messages

Messages.

Constructor

new Messages()

Source:

Methods

getDialogs(queryopt) → {JsonApiResponse}

Get dialogs list.

Source:
Parameters:
Name Type Attributes Description
query object <optional>

Request options.

Name Type Description
with string

Account id of dialog companion.

lotId Number

ID of the lot.

Returns:
Type:
JsonApiResponse

getPage(queryopt) → {JsonApiResponse}

Get messages.

Source:
Parameters:
Name Type Attributes Description
query object <optional>

Request options.

Name Type Attributes Description
page.number Number <optional>

Page number.

page.size Number <optional>

Page size.

sort Array.<string> <optional>

Sorting params.

sender string

Account id of the sender.

lotId Number

ID of the lot.

search string

Full text search.

Returns:
Type:
JsonApiResponse

getUnreadCounter(queryopt) → {JsonApiResponse}

Get unread messages counter.

Source:
Parameters:
Name Type Attributes Description
query object <optional>

Request options.

Name Type Description
sender string

Account id of the sender.

lotId Number

ID of the lot.

Returns:
Type:
JsonApiResponse

markRead(opts)

Mark messages as read.

Source:
Parameters:
Name Type Description
opts object

Account options.

Name Type Attributes Description
sender string <optional>

Account ID of the sender.

lotId Number <optional>

ID of the lot.

receiver Number <optional>

ID of the lot.

send(opts) → {Promise.<JsonApiResponse>}

Send a message.

Source:
Parameters:
Name Type Description
opts object

Message options.

Name Type Attributes Description
receiver string

Message receiver.

lotId string

Lot ID.

text string

Message text.

sender string <optional>

Message sender.

Returns:
Type:
Promise.<JsonApiResponse>