Get started
Accounts
Apps
Users
Relationships
Dialogs (Messages)
Tracks (MuseBase)
Photos
Posts
Comments
Safety
Other
Yurba CDN (cdn.yurba.one)
For Desktop Developers
Yurba uses a secure websocket (wss) to receive messages/alerts and other events.
Query string:
token: string
To receive websocket messages, you must connect to it using a user token. All messages come in the form of an EventModel. Some events are not global. They can be obtained by subscribing to a specific category.
{
Type: string,
Message: model
}
notification: NotificationModel (new notification)
message: MessageModel (on new message)
message_delete: MessageModel (on message delete)
online: OnlineModel (on user went online)
typing: TypingModel
read: ReadModel
To subscribe to the event category you should send the following json to the websocket, having connected in advance.
{
command: 'subscribe',
category: string,
thing_id: int
}
{
command: 'subscribe',
category: 'dialog',
thing_id: int # dialog ID
}
Sent when someone writes a message in a dialog. Only those who subscribe to the dialog receive.
{
Dialog: int,
User: ShortUserModel
}
Sent when someone has read the dialog. Only those who subscribe to the dialog receive.
{
Dialog: int
}