8bitology API - Messaging

Overview

The purpose of the messaging functions are to allow users to communicate together. Messages can be either treated as real-time messages from a chat perspective or delayed like with emails. How they are treated is purely up to the application or game.

Listing and Displaying Messages

Both received and sent messages can be listed in addition to all messages. To fetch a list of received or sent messages separately, use the msg_statuslist function.

To receive a specific message from the list to display to the user, use the msg_get function.

Sending Messages

For a message to be sent:
1. You first must know the public user id of who you want to send a message to. This would usually be obtained by calling one of the user list functions first, such as user_statuslist (which can be used to get a list of online users).
2. Send them an actual message using the msg_send function.

Messaging API functions.

function: msg_alllist
parameters: <secretuid>, <offset>, <limit>
response: list of <mid>, <uid>, <name>, <subject>, <status>, <statusdescription>, <datetime>
description: List of messages.

function: msg_get
parameters: <secretuid>, <mid>
response: <mid>, <uid>, <name>, <subject>, <text>, <status>, <datetime>
description: Get a message body.

function: msg_send
parameters: <secretuid>, <uid>, <subject>, <text>
response: true or false
description: Send a message to a user.

function: msg_statuslist
parameters: <secretuid>, <status>, <offset>, <limit>
response: list of <mid>, <uid>, <name>, <subject>, <status>, <statusdescription>, <datetime>
description: List of messages with a specific status.