***************** Request Reference ***************** .. _request-reference-ml-top: Table of Contents ================= * :ref:`meta_lobby.proto ` * :ref:`AnswerInvitationRoomRequest ` * :ref:`AsyncAuthRequest ` * :ref:`AsyncAuthRequest.UserAgent ` * :ref:`AsyncBuddyPresencePartialUpdateRequest ` * :ref:`AsyncConnectedRequest ` * :ref:`AsyncConnectionErrorRequest ` * :ref:`AsyncDeviceUnlinkedRequest ` * :ref:`AsyncDisconnectRequest ` * :ref:`AsyncUnlinkDeviceRequest ` * :ref:`ChatRoomHistoryEntry ` * :ref:`ClientChatRoomBlockedRequest ` * :ref:`ClientChatRoomHistoryRequest ` * :ref:`ClientChatRoomRequest ` * :ref:`ClientDataRequest ` * :ref:`CreateRoomRequest ` * :ref:`GetChatRoomHistoryRequest ` * :ref:`InviteFriendsToRoomRequest ` * :ref:`InvitedFriendsToRoomRequest ` * :ref:`InvitedRoomRequest ` * :ref:`KickParticipantRequest ` * :ref:`LeaveRoomRequest ` * :ref:`MetaErrorRequest ` * :ref:`MetaPlayerPresenceUpdateRequest ` * :ref:`MulticastDataRequest ` * :ref:`MuteParticipantRequest ` * :ref:`ParticipantKickedRequest ` * :ref:`ParticipantMutedRequest ` * :ref:`ParticipantUnmutedRequest ` * :ref:`RegisterPresenceRequest ` * :ref:`RoomChatRequest ` * :ref:`RoomConfiguration ` * :ref:`RoomConfigurationUpdatedRequest ` * :ref:`RoomCreatedRequest ` * :ref:`RoomDetails ` * :ref:`RoomInvitationCancelledRequest ` * :ref:`RoomInvitationDeclinedRequest ` * :ref:`RoomJoinedRequest ` * :ref:`RoomLeftRequest ` * :ref:`RoomListRequest ` * :ref:`RoomOverRequest ` * :ref:`Session ` * :ref:`SubscribePresenceServiceRequest ` * :ref:`SwitchedToRoomRequest ` * :ref:`UnmuteParticipantRequest ` * :ref:`UnregisterPresenceRequest ` * :ref:`UnsubscribePresenceServiceRequest ` * :ref:`UpdateRoomConfigurationRequest ` * :ref:`WhatsNewRoomcatRequest ` * :ref:`AsyncConnectionErrorRequest.ConnectionError ` * :ref:`ErrorCode ` * :ref:`common.proto ` * :ref:`PartnerToken ` * :ref:`game.proto ` * :ref:`AccessRights ` * :ref:`AccessRights.Right ` * :ref:`Achievement ` * :ref:`AchievementUpdate ` * :ref:`Activity ` * :ref:`Avatar ` * :ref:`FinalScore ` * :ref:`PartnerUser ` * :ref:`Player ` * :ref:`PlayerAchievement ` * :ref:`PlayerAchievementUpdate ` * :ref:`PlayerActivity ` * :ref:`PlayerRankingUpdate ` * :ref:`Rank ` * :ref:`RankingUpdate ` * :ref:`Achievement.Status ` * :ref:`Achievement.Type ` * :ref:`Activity.Code ` * :ref:`meta_lobby_request.proto ` * :ref:`Message ` * :ref:`Packet ` * :ref:`PingRequest ` * :ref:`push.proto ` * :ref:`Device ` * :ref:`DeviceType ` * :ref:`Devices ` * :ref:`Devices.Type ` * :ref:`reference-ml-scalar-value-types` .. _reference-ml-file-meta_lobby.proto: meta_lobby.proto ================ Messages -------- .. _req-ml-AnswerInvitationRoomRequest: .. _reference-ml-message-com.daysofwonder.metalobby.AnswerInvitationRoomRequest: .. _reference-ml-field-com.daysofwonder.metalobby.AnswerInvitationRoomRequest: AnswerInvitationRoomRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^ A client sends this request to answer an invitation request. When accepting the invitation, the server will send back a :ref:`RoomJoinedRequest ` to all users present in the room. When declining the invitation, the server will send a :ref:`RoomInvitationDeclinedRequest ` to room administrator and invitee. C -> S * request_number: 2009 * field_name: answer_invitation_room_request In response to: * :ref:`InvitedRoomRequest ` Possible Responses: * :ref:`RoomJoinedRequest ` * :ref:`RoomInvitationDeclinedRequest ` .. csv-table:: AnswerInvitationRoomRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "Identifier of the room the invitation came from" "invitation_answer", :ref:`bool `, "If ``true``, the invitation is accepted and the participant can join the room. If ``false``, the invitation is declined." "block_invitation", :ref:`bool `, "If declined the invitation, can also set to ``true`` to turn off invitations from this room" :ref:`Top ` .. _req-ml-AsyncAuthRequest: .. _reference-ml-message-com.daysofwonder.metalobby.AsyncAuthRequest: .. _reference-ml-field-com.daysofwonder.metalobby.AsyncAuthRequest: AsyncAuthRequest ^^^^^^^^^^^^^^^^ Used to: * either authentify a participant for a given connection (should be the first packet to be sent) * or resume a session from an existing session You must connect using the OAuth2 Access Token provided by the REST API as described in the :ref:`protocol ` documentation. This Access Token must have the ``private`` scope, of course. Note : If a user logs out from her client and logs in with a different DoW account, we would have the same device token id pointing to different accounts. Thus it is possible that a given device receive notification for a different user, which is bad. Please send an :ref:`AsyncUnlinkDeviceRequest ` before connecting with a different account / session. More information can be found in :ref:`workflow-authentication` section. C -> S * request_number: 400 * field_name: async_auth_request Possible Responses: * :ref:`AsyncConnectionErrorRequest ` * :ref:`AsyncConnectedRequest ` .. csv-table:: AsyncAuthRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "name", :ref:`string `, "Player login name" "partner_token", :ref:`com.daysofwonder.async.PartnerToken `, "Set this to authenticate with an access_token coming from the API" "user_agent", :ref:`AsyncAuthRequest.UserAgent `, "Client user agent" "session", :ref:`Session `, "| If sent, then that means we want to resume a given session" "game_type", :ref:`string `, "| This is required - multi game protocol requires a distinct authentication | per participant per game. | Game types are enforced on the server, by example `SW` and `TT` are valid" "device", :ref:`com.daysofwonder.game.push.DeviceType `, "| An optional device token. | If sent, this will be used for push notifications. | Devices are kept on the server, if the client already sent this device token it is not needed | to send it at every authentication attempt (to spare some resources on the server)" :ref:`Top ` .. _req-ml-AsyncAuthRequest.UserAgent: .. _reference-ml-message-com.daysofwonder.metalobby.AsyncAuthRequest.UserAgent: .. _reference-ml-field-com.daysofwonder.metalobby.AsyncAuthRequest.UserAgent: AsyncAuthRequest.UserAgent ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. csv-table:: AsyncAuthRequest.UserAgent :widths: 20 10 40 :header: "Field", "Type", "Description" "user_agent", :ref:`string `, "| This contains the codified User Agent | (Downloadable, Steam, iPad, MacOSX, Pocket...)" "full_user_agent", :ref:`string `, "| This would contain the full string | obeying the following format: `*platform*/*ua*/*version*`" :ref:`Top ` .. _req-ml-AsyncBuddyPresencePartialUpdateRequest: .. _reference-ml-message-com.daysofwonder.metalobby.AsyncBuddyPresencePartialUpdateRequest: .. _reference-ml-field-com.daysofwonder.metalobby.AsyncBuddyPresencePartialUpdateRequest: AsyncBuddyPresencePartialUpdateRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Despite its name, this request is sent by the server when the presence of some monitored players change. More information can be found in :ref:`workflow-presence` section. S -> C * request_number: 517 * field_name: async_buddy_presence_partial_update_request .. csv-table:: AsyncBuddyPresencePartialUpdateRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "present", :ref:`int32[] `, "| List of present players global id, including buddies. Players not mentioned in this request have not | changed. | Note: due to the asynchronicity of the system, it is possible that some players id referenced | in those two lists are unknown to the client (for instance, if you don't know yet who are your buddies)." "absent", :ref:`int32[] `, "List of absent players global id" :ref:`Top ` .. _req-ml-AsyncConnectedRequest: .. _reference-ml-message-com.daysofwonder.metalobby.AsyncConnectedRequest: .. _reference-ml-field-com.daysofwonder.metalobby.AsyncConnectedRequest: AsyncConnectedRequest ^^^^^^^^^^^^^^^^^^^^^ Returned by the server after a successful :ref:`AsyncAuthRequest `. More information can be found in :ref:`workflow-authentication` section. S -> C * request_number: 406 * field_name: async_connected_request In response to: * :ref:`AsyncAuthRequest ` .. csv-table:: AsyncConnectedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "session", :ref:`Session `, "The current participant session" "participant", :ref:`com.daysofwonder.Player `, "The current participant information" :ref:`Top ` .. _req-ml-AsyncConnectionErrorRequest: .. _reference-ml-message-com.daysofwonder.metalobby.AsyncConnectionErrorRequest: .. _reference-ml-field-com.daysofwonder.metalobby.AsyncConnectionErrorRequest: AsyncConnectionErrorRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returned from an :ref:`AsyncAuthRequest ` if there is a failure. More information can be found in :ref:`workflow-authentication` section. S -> C * request_number: 407 * field_name: async_connection_error_request In response to: * :ref:`AsyncAuthRequest ` .. csv-table:: AsyncConnectionErrorRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "code", :ref:`AsyncConnectionErrorRequest.ConnectionError `, "Connection error code" :ref:`Top ` .. _req-ml-AsyncDeviceUnlinkedRequest: .. _reference-ml-message-com.daysofwonder.metalobby.AsyncDeviceUnlinkedRequest: .. _reference-ml-field-com.daysofwonder.metalobby.AsyncDeviceUnlinkedRequest: AsyncDeviceUnlinkedRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server to the client in response to a successful :ref:`AsyncUnlinkDeviceRequest `. S -> C * request_number: 413 * field_name: async_device_unlinked_request In response to: * :ref:`AsyncUnlinkDeviceRequest ` .. csv-table:: AsyncDeviceUnlinkedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "device", :ref:`com.daysofwonder.game.push.DeviceType `, "Device to unlink" :ref:`Top ` .. _req-ml-AsyncDisconnectRequest: .. _reference-ml-message-com.daysofwonder.metalobby.AsyncDisconnectRequest: .. _reference-ml-field-com.daysofwonder.metalobby.AsyncDisconnectRequest: AsyncDisconnectRequest ^^^^^^^^^^^^^^^^^^^^^^ When a participant wants to disconnect. More information can be found in :ref:`workflow-log-out` section. C -> S * request_number: 401 * field_name: async_disconnect_request .. _req-ml-AsyncUnlinkDeviceRequest: .. _reference-ml-message-com.daysofwonder.metalobby.AsyncUnlinkDeviceRequest: .. _reference-ml-field-com.daysofwonder.metalobby.AsyncUnlinkDeviceRequest: AsyncUnlinkDeviceRequest ^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client to unlink a device from the current active session. The idea is that if a user logs out from her client and logs in with a different DoW account, we would have the same device token id pointing to different accounts. Thus it is possible that a given device receive notification for a different user, which is bad. More information can be found in :ref:`workflow-log-out` section. C -> S * request_number: 412 * field_name: async_unlink_device_request Possible Responses: * :ref:`AsyncDeviceUnlinkedRequest ` * :ref:`MetaErrorRequest `: UNKNOWN_DEVICE_TOKEN (6) .. csv-table:: AsyncUnlinkDeviceRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "device", :ref:`com.daysofwonder.game.push.DeviceType `, "The device to unlink from the participant session" :ref:`Top ` .. _req-ml-ChatRoomHistoryEntry: .. _reference-ml-message-com.daysofwonder.metalobby.ChatRoomHistoryEntry: .. _reference-ml-field-com.daysofwonder.metalobby.ChatRoomHistoryEntry: ChatRoomHistoryEntry ^^^^^^^^^^^^^^^^^^^^ An entry of a chat history. More information about the chat can be found in :ref:`workflow-chat` section. .. csv-table:: ChatRoomHistoryEntry :widths: 20 10 40 :header: "Field", "Type", "Description" "from", :ref:`string `, "Sender name" "text", :ref:`string `, "Chat message" "player_id", :ref:`int32 `, "For in room chat history it's the local id, if from the lobby it's the global id" "timestamp", :ref:`int64 `, "Unix epoch in millis when the server received the message. ``0`` means the timestamp was not provided by the client." "code", :ref:`int32 `, "Message code when using premade messages. ``0`` means the message was not premade" :ref:`Top ` .. _req-ml-ClientChatRoomBlockedRequest: .. _reference-ml-message-com.daysofwonder.metalobby.ClientChatRoomBlockedRequest: .. _reference-ml-field-com.daysofwonder.metalobby.ClientChatRoomBlockedRequest: ClientChatRoomBlockedRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent to the :ref:`RoomChatRequest ` sender if her message has been blocked or if she's been muted. More information can be found in :ref:`workflow-chat` section. S -> C * request_number: 526 * field_name: client_chat_blocked_request In response to: * :ref:`RoomChatRequest ` .. csv-table:: ClientChatRoomBlockedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "" "text", :ref:`string `, "Text chat" "sender", :ref:`com.daysofwonder.Player `, "The sender player" "muted", :ref:`bool `, "| After sending profanities, the sender might be muted | for an arbitrary time. If ``muted`` is ``true``, the client has been muted. | Note: the server never tells a given client it has been unmuted" "blocked", :ref:`bool `, "| This sender can be administratively blocked (prevented to chat) (community management), in this case | ``blocked`` will be ``true``. Normally client software shouldn't send to the server :ref:`RoomChatRequest ` | if she's blocked (check the blocked and banned field in the PBGame.Player message after authentication)" "code", :ref:`int32 `, "Code of the premade message sent (if multicast a code)" "recipient_ids", :ref:`int32[] `, "Recipient of the message (if specified by the original multicast chat)" :ref:`Top ` .. _req-ml-ClientChatRoomHistoryRequest: .. _reference-ml-message-com.daysofwonder.metalobby.ClientChatRoomHistoryRequest: .. _reference-ml-field-com.daysofwonder.metalobby.ClientChatRoomHistoryRequest: ClientChatRoomHistoryRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent to in response to :ref:`GetChatRoomHistoryRequest ` More information about the chat can be found in :ref:`workflow-chat` section. S -> C * request_number: 536 * field_name: client_chat_history_request In response to: * :ref:`GetChatRoomHistoryRequest ` .. csv-table:: ClientChatRoomHistoryRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "System assigned room id" "entry", :ref:`ChatRoomHistoryEntry[] `, "Chat entries in chronological order" "last_seen_message_timestamp", :ref:`int64 `, "Timestamp of the last time a participant has seen a message" :ref:`Top ` .. _req-ml-ClientChatRoomRequest: .. _reference-ml-message-com.daysofwonder.metalobby.ClientChatRoomRequest: .. _reference-ml-field-com.daysofwonder.metalobby.ClientChatRoomRequest: ClientChatRoomRequest ^^^^^^^^^^^^^^^^^^^^^ Sent by the server in response to a :ref:`RoomChatRequest ` to the participants of the game ``game_id`` as long as they were listed in ``RoomChatRequest.recipient_ids`` (or to all participants if ``recipient_ids`` is empty). More information can be found in :ref:`workflow-chat` section. S -> C * request_number: 525 * field_name: client_chat_request In response to: * :ref:`RoomChatRequest ` .. csv-table:: ClientChatRoomRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "" "text", :ref:`string `, "Text chat" "sender", :ref:`com.daysofwonder.Player `, "The sender player" "profanity", :ref:`bool `, "``true`` if the text has been altered to remove profanities" "code", :ref:`int32 `, "Code of the premade message sent (if multicast a code)" "recipient_ids", :ref:`int32[] `, "Recipient of the message (if specified by the original multicast chat)" :ref:`Top ` .. _req-ml-ClientDataRequest: .. _reference-ml-message-com.daysofwonder.metalobby.ClientDataRequest: .. _reference-ml-field-com.daysofwonder.metalobby.ClientDataRequest: ClientDataRequest ^^^^^^^^^^^^^^^^^ When one of the participant sent a :ref:`MulticastDataRequest ` the server will send back a :ref:`ClientDataRequest ` to the multicast clients. More information can be found in :ref:`workflow-game-multicast` section. S -> C * request_number: 503 * field_name: client_data_request .. csv-table:: ClientDataRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "System assigned room id" "data", :ref:`bytes `, "Any data that was sent by the sender" "sender", :ref:`com.daysofwonder.Player `, "Sender participant" :ref:`Top ` .. _req-ml-CreateRoomRequest: .. _reference-ml-message-com.daysofwonder.metalobby.CreateRoomRequest: .. _reference-ml-field-com.daysofwonder.metalobby.CreateRoomRequest: CreateRoomRequest ^^^^^^^^^^^^^^^^^ Sent by the client when creating a new room with preset participants. C -> S * request_number: 2000 * field_name: create_room_request Possible Responses: * :ref:`RoomCreatedRequest ` * :ref:`MetaErrorRequest ` .. csv-table:: CreateRoomRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "configuration", :ref:`RoomConfiguration `, "Initial configuration of the chat room." "participants", :ref:`int32[] `, "Initial participants of the chat room (creator + invitees)." :ref:`Top ` .. _req-ml-GetChatRoomHistoryRequest: .. _reference-ml-message-com.daysofwonder.metalobby.GetChatRoomHistoryRequest: .. _reference-ml-field-com.daysofwonder.metalobby.GetChatRoomHistoryRequest: GetChatRoomHistoryRequest ^^^^^^^^^^^^^^^^^^^^^^^^^ Sent to retrieve the chat history of the lobby or of a game. More information about the chat can be found in :ref:`workflow-chat` section. C -> S * request_number: 535 * field_name: get_chat_history_request Possible Responses: * :ref:`ClientChatRoomHistoryRequest ` .. csv-table:: GetChatRoomHistoryRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "" :ref:`Top ` .. _req-ml-InviteFriendsToRoomRequest: .. _reference-ml-message-com.daysofwonder.metalobby.InviteFriendsToRoomRequest: .. _reference-ml-field-com.daysofwonder.metalobby.InviteFriendsToRoomRequest: InviteFriendsToRoomRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by a client that wants to invite other participants in a chat room. C -> S * request_number: 2007 * field_name: invite_friends_to_room_request Possible Responses: * :ref:`InvitedFriendsToRoomRequest ` * :ref:`MetaErrorRequest ` .. csv-table:: InviteFriendsToRoomRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "Identifier of the room to invite participants in" "friends", :ref:`int32[] `, "Identifiers of the participants to invite in the room" :ref:`Top ` .. _req-ml-InvitedFriendsToRoomRequest: .. _reference-ml-message-com.daysofwonder.metalobby.InvitedFriendsToRoomRequest: .. _reference-ml-field-com.daysofwonder.metalobby.InvitedFriendsToRoomRequest: InvitedFriendsToRoomRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server to the room administrator, to confirm that it received the invitation request. S -> C * request_number: 2013 * field_name: invited_friends_to_room_request In response to: * :ref:`InviteFriendsToRoomRequest ` .. csv-table:: InvitedFriendsToRoomRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "Identifier of the room the invitation has been made" "friends", :ref:`int32[] `, "Identifiers of the participants that has been invited" :ref:`Top ` .. _req-ml-InvitedRoomRequest: .. _reference-ml-message-com.daysofwonder.metalobby.InvitedRoomRequest: .. _reference-ml-field-com.daysofwonder.metalobby.InvitedRoomRequest: InvitedRoomRequest ^^^^^^^^^^^^^^^^^^ Sent by the server to invited friends. S -> C * request_number: 2008 * field_name: invited_room_request In response to: * :ref:`InviteFriendsToRoomRequest ` .. csv-table:: InvitedRoomRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "Identifier of the room" "invitation_by", :ref:`int32 `, "Identifier of the user that invited the recipient of this message" "details", :ref:`RoomDetails `, "Details of the room the invitation comes from (name, other participants...)" :ref:`Top ` .. _req-ml-KickParticipantRequest: .. _reference-ml-message-com.daysofwonder.metalobby.KickParticipantRequest: .. _reference-ml-field-com.daysofwonder.metalobby.KickParticipantRequest: KickParticipantRequest ^^^^^^^^^^^^^^^^^^^^^^ Sent to the server by the room admin to kick a player out of the room. The kicked player is not banned and can be added again through invitation. C -> S * request_number: 2034 * field_name: kick_participant_request Possible responses: * :ref:`ParticipantKickedRequest ` .. csv-table:: KickParticipantRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "" "kick", :ref:`int32 `, "" :ref:`Top ` .. _req-ml-LeaveRoomRequest: .. _reference-ml-message-com.daysofwonder.metalobby.LeaveRoomRequest: .. _reference-ml-field-com.daysofwonder.metalobby.LeaveRoomRequest: LeaveRoomRequest ^^^^^^^^^^^^^^^^ Sent by the client to quit the chat room. Users that left a room cannot chat in it anymore. C -> S * request_number: 2005 * field_name: leave_room_request Possible Responses: * :ref:`RoomLeftRequest ` * :ref:`MetaErrorRequest ` .. csv-table:: LeaveRoomRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "Identifier of the room to leave" :ref:`Top ` .. _req-ml-MetaErrorRequest: .. _reference-ml-message-com.daysofwonder.metalobby.MetaErrorRequest: .. _reference-ml-field-com.daysofwonder.metalobby.MetaErrorRequest: MetaErrorRequest ^^^^^^^^^^^^^^^^ Sent in response to a client request that generated an error. S -> C * request_number: 505 * field_name: error_request .. csv-table:: MetaErrorRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "| System assigned room id. | Might be ``0`` for errors not pertaining to a room" "code", :ref:`ErrorCode `, "Error code. If ``0``, there was not an error but the error field was mandatory" "msg", :ref:`string `, "Error message if any" "participant_id", :ref:`int32 `, "The participant who sent the original request when in a room" :ref:`Top ` .. _req-ml-MetaPlayerPresenceUpdateRequest: .. _reference-ml-message-com.daysofwonder.metalobby.MetaPlayerPresenceUpdateRequest: .. _reference-ml-field-com.daysofwonder.metalobby.MetaPlayerPresenceUpdateRequest: MetaPlayerPresenceUpdateRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server when one or more player presence status changes. In the current implementation, this message will contain only one presence status change (`ie` for only one given player). The presence mechanism is a best effort system, so it can happen that presence/absence messages are sent while in fact the player is indeed absent/present. The client needs to keep presence information, and update presence or absence indicators based on this message (and also if it receives multicast data from a given sender). All present/absent ids are local id to the game `Presence` update time resolution is 5s by default, so presence won't be noticed until this delay. More information can be found in :ref:`workflow-presence` section. S -> C * request_number: 506 * field_name: player_presence_update_request .. csv-table:: MetaPlayerPresenceUpdateRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "System assigned room id" "present", :ref:`int32[] `, "Those participants local-game-id are now present" "absent", :ref:`int32[] `, "Those participants local-game-id are now absent" "in_room", :ref:`int32[] `, "| Valid when ``room_id`` is set, contains the set of participants that declared being inside this ``room_id`` | by sending a :ref:`SwitchedToRoomRequest `" :ref:`Top ` .. _req-ml-MulticastDataRequest: .. _reference-ml-message-com.daysofwonder.metalobby.MulticastDataRequest: .. _reference-ml-field-com.daysofwonder.metalobby.MulticastDataRequest: MulticastDataRequest ^^^^^^^^^^^^^^^^^^^^ A participant can decide to send arbitrary data to a set or subset of the participants in the same room. More information can be found in :ref:`workflow-game-multicast` section. C -> S * request_number: 502 * field_name: multicast_data_request Possible Responses: * :ref:`ClientDataRequest ` * :ref:`MetaErrorRequest `: UNKNOWN_ROOM (3) .. csv-table:: MulticastDataRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "System assigned room id" "data", :ref:`bytes `, "Any data that will be sent verbatim to the recipient_ids" "recipient_ids", :ref:`int32[] `, "List of local participant ids that will receive the data" "present_participants_only", :ref:`bool `, "| Filter out people that are not 'present' at the moment. | If ``false``, then absent users will be notified by a push notification" :ref:`Top ` .. _req-ml-MuteParticipantRequest: .. _reference-ml-message-com.daysofwonder.metalobby.MuteParticipantRequest: .. _reference-ml-field-com.daysofwonder.metalobby.MuteParticipantRequest: MuteParticipantRequest ^^^^^^^^^^^^^^^^^^^^^^ Sent by the room admin to forbid a user to chat in a room. C -> S * request_number: 2038 * field_name: mute_participant_request Possible responses: * :ref:`ParticipantMutedRequest ` .. csv-table:: MuteParticipantRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "" "mute", :ref:`int32 `, "" :ref:`Top ` .. _req-ml-ParticipantKickedRequest: .. _reference-ml-message-com.daysofwonder.metalobby.ParticipantKickedRequest: .. _reference-ml-field-com.daysofwonder.metalobby.ParticipantKickedRequest: ParticipantKickedRequest ^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server when a participant has been kicked out of a room. S -> C * request_number: 2035 * field_name: participant_kicked_request In response to: * :ref:`KickParticipantRequest ` .. csv-table:: ParticipantKickedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "" "kicked", :ref:`int32 `, "" :ref:`Top ` .. _req-ml-ParticipantMutedRequest: .. _reference-ml-message-com.daysofwonder.metalobby.ParticipantMutedRequest: .. _reference-ml-field-com.daysofwonder.metalobby.ParticipantMutedRequest: ParticipantMutedRequest ^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server when a participant has been muted in a room. C -> S * request_number: 2039 * field_name: participant_muted_request In response to: * :ref:`MuteParticipantRequest ` .. csv-table:: ParticipantMutedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "" "muted", :ref:`int32 `, "" :ref:`Top ` .. _req-ml-ParticipantUnmutedRequest: .. _reference-ml-message-com.daysofwonder.metalobby.ParticipantUnmutedRequest: .. _reference-ml-field-com.daysofwonder.metalobby.ParticipantUnmutedRequest: ParticipantUnmutedRequest ^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server when a participant has been unmuted in a room. C -> S * request_number: 2041 * field_name: participant_unmuted_request In response to: * :ref:`UnmuteParticipantRequest ` .. csv-table:: ParticipantUnmutedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "" "unmuted", :ref:`int32 `, "" :ref:`Top ` .. _req-ml-RegisterPresenceRequest: .. _reference-ml-message-com.daysofwonder.metalobby.RegisterPresenceRequest: .. _reference-ml-field-com.daysofwonder.metalobby.RegisterPresenceRequest: RegisterPresenceRequest ^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client to monitor the presence of a set of participants. Once sent and when subscribed to the presence system, the client will receive presence changes for those participants. More information can be found in :ref:`workflow-presence` section. C -> S * request_number: 527 * field_name: register_presence_request .. csv-table:: RegisterPresenceRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "participant_ids", :ref:`int32[] `, "List of global participant ids to monitor presence of" :ref:`Top ` .. _req-ml-RoomChatRequest: .. _reference-ml-message-com.daysofwonder.metalobby.RoomChatRequest: .. _reference-ml-field-com.daysofwonder.metalobby.RoomChatRequest: RoomChatRequest ^^^^^^^^^^^^^^^ Sends a chat to the server, the server will then multicast the text to the other participants in the given room. The code parameter indicates a premade message id. When using codes, please also provide a text value in default locale so that older clients can display something. Codes between 1 and 255 are reserved, use a higher value. The code ``0`` means the message was not a premade message. More information can be found in :ref:`workflow-chat` section. C -> S * request_number: 524 * field_name: multicast_chat_request Possible Responses: * :ref:`ClientChatRoomRequest ` * :ref:`ClientChatRoomBlockedRequest ` * :ref:`MetaErrorRequest `: UNKNOWN_ROOM (3) .. csv-table:: RoomChatRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "" "text", :ref:`string `, "Text chat" "recipient_ids", :ref:`int32[] `, "| List of local participant ids that will receive the data for non empty ``game_id``. | List of global participant ids that will receive the data for empty ``game_id`` (`ie` lobby) | If empty, then the chat is broadcast to all the participants present" "code", :ref:`int32 `, "| Code for premade messages, please also provide the `text` in default locale. | Codes between 0 and 255 are reserved" :ref:`Top ` .. _req-ml-RoomConfiguration: .. _reference-ml-message-com.daysofwonder.metalobby.RoomConfiguration: .. _reference-ml-field-com.daysofwonder.metalobby.RoomConfiguration: RoomConfiguration ^^^^^^^^^^^^^^^^^ Initial configuration to provide :ref:`CreateRoomRequest ` with when creating a new chat room. The following fields can be changed after creation via :ref:`UpdateRoomConfigurationRequest `: * name * topic .. csv-table:: RoomConfiguration :widths: 20 10 40 :header: "Field", "Type", "Description" "name", :ref:`string `, "Displayed title for the room" "topic", :ref:`string `, "Optional description of the room intent" :ref:`Top ` .. _req-ml-RoomConfigurationUpdatedRequest: .. _reference-ml-message-com.daysofwonder.metalobby.RoomConfigurationUpdatedRequest: .. _reference-ml-field-com.daysofwonder.metalobby.RoomConfigurationUpdatedRequest: RoomConfigurationUpdatedRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server when the room admin has updated the configuration. Returns the final current configuration. S -> C * request_number: 2031 * field_name: room_configuration_updated_request In response to: * :ref:`UpdateRoomConfigurationRequest ` .. csv-table:: RoomConfigurationUpdatedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "" "configuration", :ref:`RoomConfiguration `, "Configuration after update has been applied" :ref:`Top ` .. _req-ml-RoomCreatedRequest: .. _reference-ml-message-com.daysofwonder.metalobby.RoomCreatedRequest: .. _reference-ml-field-com.daysofwonder.metalobby.RoomCreatedRequest: RoomCreatedRequest ^^^^^^^^^^^^^^^^^^ Confirmation sent by the server when successfully created a chat room in response to :ref:`CreateRoomRequest ` S -> C * request_number: 2001 * field_name: room_created_request In response to: * :ref:`CreateRoomRequest ` .. csv-table:: RoomCreatedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "details", :ref:`RoomDetails `, "Details of the created chat room (identifier, name, participants...)" :ref:`Top ` .. _req-ml-RoomDetails: .. _reference-ml-message-com.daysofwonder.metalobby.RoomDetails: .. _reference-ml-field-com.daysofwonder.metalobby.RoomDetails: RoomDetails ^^^^^^^^^^^ Representation of a given chat room. .. csv-table:: RoomDetails :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "Unique room identifier provided by the server" "configuration", :ref:`RoomConfiguration `, "Configuration of the chat room" "creator_id", :ref:`int32 `, "Global ID of the room creator" "participants", :ref:`com.daysofwonder.Player[] `, "Current participants of the discussion" "muted_participants", :ref:`int32[] `, "Muted participants ids cannot send messages to the room" :ref:`Top ` .. _req-ml-RoomInvitationCancelledRequest: .. _reference-ml-message-com.daysofwonder.metalobby.RoomInvitationCancelledRequest: .. _reference-ml-field-com.daysofwonder.metalobby.RoomInvitationCancelledRequest: RoomInvitationCancelledRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server to inform the room creator when an invitation has expired. S -> C * request_number: 2010 * field_name: room_invitation_cancelled_request .. csv-table:: RoomInvitationCancelledRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "Identifier of the room the invitation has expired" "unknown_participant", :ref:`int32 `, "If server could not retrieve full information, giving at least the identifier" "player_participant", :ref:`com.daysofwonder.Player `, "If found, the user information of the cancelled invitation" :ref:`Top ` .. _req-ml-RoomInvitationDeclinedRequest: .. _reference-ml-message-com.daysofwonder.metalobby.RoomInvitationDeclinedRequest: .. _reference-ml-field-com.daysofwonder.metalobby.RoomInvitationDeclinedRequest: RoomInvitationDeclinedRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server to the room administrator when an invitee declines the invitation. S -> C * request_number: room_invitation_declined_request * field_name: 2012 In response to: * :ref:`AnswerInvitationRoomRequest ` .. csv-table:: RoomInvitationDeclinedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "Identifier of the room the invitee declined invitation for" "participant", :ref:`com.daysofwonder.Player `, "" :ref:`Top ` .. _req-ml-RoomJoinedRequest: .. _reference-ml-message-com.daysofwonder.metalobby.RoomJoinedRequest: .. _reference-ml-field-com.daysofwonder.metalobby.RoomJoinedRequest: RoomJoinedRequest ^^^^^^^^^^^^^^^^^ Sent by the server to inform that a participant joined the given chat room. It is sent back to the invited user (as confirmation) and to participants already in the room S -> C * request_number: 2011 * field_name: room_joined_request In response to: * :ref:`AnswerInvitationRoomRequest ` .. csv-table:: RoomJoinedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "Identifier of the room that has been joined" "participant", :ref:`com.daysofwonder.Player `, "Information of the user that joined the room" :ref:`Top ` .. _req-ml-RoomLeftRequest: .. _reference-ml-message-com.daysofwonder.metalobby.RoomLeftRequest: .. _reference-ml-field-com.daysofwonder.metalobby.RoomLeftRequest: RoomLeftRequest ^^^^^^^^^^^^^^^ Sent by the server to inform that a participant left the room. S -> C * request_number: 2006 * field_name: room_left_request In response to: * :ref:`LeaveRoomRequest ` .. csv-table:: RoomLeftRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "Identifier of the room" "participant", :ref:`com.daysofwonder.Player `, "Information of the participant who left the room" :ref:`Top ` .. _req-ml-RoomListRequest: .. _reference-ml-message-com.daysofwonder.metalobby.RoomListRequest: .. _reference-ml-field-com.daysofwonder.metalobby.RoomListRequest: RoomListRequest ^^^^^^^^^^^^^^^ List of chat rooms information S -> C * request_number: 2003 * field_name: room_list_request In response to: * :ref:`WhatsNewRoomcatRequest ` .. csv-table:: RoomListRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "details", :ref:`RoomDetails[] `, "List of chat room details (identifiers, names, participants...)" :ref:`Top ` .. _req-ml-RoomOverRequest: .. _reference-ml-message-com.daysofwonder.metalobby.RoomOverRequest: .. _reference-ml-field-com.daysofwonder.metalobby.RoomOverRequest: RoomOverRequest ^^^^^^^^^^^^^^^ .. csv-table:: RoomOverRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "" :ref:`Top ` .. _req-ml-Session: .. _reference-ml-message-com.daysofwonder.metalobby.Session: .. _reference-ml-field-com.daysofwonder.metalobby.Session: Session ^^^^^^^ .. csv-table:: Session :widths: 20 10 40 :header: "Field", "Type", "Description" "id", :ref:`int64 `, "Server-assigned ID of a client session" :ref:`Top ` .. _req-ml-SubscribePresenceServiceRequest: .. _reference-ml-message-com.daysofwonder.metalobby.SubscribePresenceServiceRequest: .. _reference-ml-field-com.daysofwonder.metalobby.SubscribePresenceServiceRequest: SubscribePresenceServiceRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client to start monitoring the presence of participants given by :ref:`RegisterPresenceRequest `. Once sent, the client will receive :ref:`AsyncBuddyPresencePartialUpdateRequest ` whenever the presence of one or more participant changes. More information can be found in :ref:`workflow-presence` section. C -> S * request_number: 532 * field_name: subscribe_presence_service_request .. _req-ml-SwitchedToRoomRequest: .. _reference-ml-message-com.daysofwonder.metalobby.SwitchedToRoomRequest: .. _reference-ml-field-com.daysofwonder.metalobby.SwitchedToRoomRequest: SwitchedToRoomRequest ^^^^^^^^^^^^^^^^^^^^^ Sent by the client to inform the server presence system that the connected player just entered a specific room interface. Note: the server makes sure that the player can be only in one room at a time. C -> S * request_number: 534 * field_name: switched_to_room_request .. csv-table:: SwitchedToRoomRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "| The room id the player is switching to." :ref:`Top ` .. _req-ml-UnmuteParticipantRequest: .. _reference-ml-message-com.daysofwonder.metalobby.UnmuteParticipantRequest: .. _reference-ml-field-com.daysofwonder.metalobby.UnmuteParticipantRequest: UnmuteParticipantRequest ^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the room admin to allow a user back to chat in a room, after begin muted. C -> S * request_number: 2040 * field_name: unmute_participant_request Possible responses: * :ref:`ParticipantUnmutedRequest ` .. csv-table:: UnmuteParticipantRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "" "unmute", :ref:`int32 `, "" :ref:`Top ` .. _req-ml-UnregisterPresenceRequest: .. _reference-ml-message-com.daysofwonder.metalobby.UnregisterPresenceRequest: .. _reference-ml-field-com.daysofwonder.metalobby.UnregisterPresenceRequest: UnregisterPresenceRequest ^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client to stop monitoring the presence of a participant. More information can be found in :ref:`workflow-presence` section. C -> S * request_number: 528 * field_name: unregister_presence_request .. csv-table:: UnregisterPresenceRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "participant_ids", :ref:`int32[] `, "List of global participant ids to stop monitoring presence" :ref:`Top ` .. _req-ml-UnsubscribePresenceServiceRequest: .. _reference-ml-message-com.daysofwonder.metalobby.UnsubscribePresenceServiceRequest: .. _reference-ml-field-com.daysofwonder.metalobby.UnsubscribePresenceServiceRequest: UnsubscribePresenceServiceRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client to stop monitoring the presence of participants given by :ref:`RegisterPresenceRequest `. More information can be found in :ref:`workflow-presence` section. C -> S * request_number: 533 * field_name: unsubscribe_presence_service_request .. _req-ml-UpdateRoomConfigurationRequest: .. _reference-ml-message-com.daysofwonder.metalobby.UpdateRoomConfigurationRequest: .. _reference-ml-field-com.daysofwonder.metalobby.UpdateRoomConfigurationRequest: UpdateRoomConfigurationRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the room administrator to change something on the configuration. Note that all fields of configuration might not be allowed to be modified after room creation. C -> S * request_number: 2030 * field_name: update_room_configuration_request Possible responses: * :ref:`RoomConfigurationUpdatedRequest ` .. csv-table:: UpdateRoomConfigurationRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "" "configuration", :ref:`RoomConfiguration `, "New configuration fields (some fields might be ignored, check the request documentation)" :ref:`Top ` .. _req-ml-WhatsNewRoomcatRequest: .. _reference-ml-message-com.daysofwonder.metalobby.WhatsNewRoomcatRequest: .. _reference-ml-field-com.daysofwonder.metalobby.WhatsNewRoomcatRequest: WhatsNewRoomcatRequest ^^^^^^^^^^^^^^^^^^^^^^ Sent by a client who wants to get latest information about a particular chat room. If no ``room_id`` is provided, will fetch information for all rooms the sender participates in. C -> S * request_number: 2002 * field_name: whats_new_room_cat_request Possible Responses: * :ref:`RoomListRequest ` * :ref:`MetaErrorRequest ` .. csv-table:: WhatsNewRoomcatRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "room_id", :ref:`int64 `, "| The room identifier to get information from. | If ``0`` or empty, will get information for all rooms of the user" :ref:`Top ` Enums ----- .. _reference-ml-enum-com.daysofwonder.metalobby.AsyncConnectionErrorRequest.ConnectionError: .. _reference-ml-field-com.daysofwonder.metalobby.AsyncConnectionErrorRequest.ConnectionError: AsyncConnectionErrorRequest.ConnectionError ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ List of possible errors during connection/authentication .. csv-table:: AsyncConnectionErrorRequest.ConnectionError :widths: 20 10 40 :header: "Name", "Number", "Description" "RESERVED", "0", "Do not use" "ACCESS_DENIED", "1", "Wrong password or login" "SERVERFULL_ERROR", "2", "Service is over-capacity, not accepting new connections" "MAINTENANCE_MODE", "3", "Maintenance mode, not accepting new connections" "NEED_AUTHENTICATION", "4", "No credentials provided" "UNKNOWN_GAME_TYPE", "5", "This service doesn't run this game" "SERVER_ERROR", "6", "Unknown error from the server" "BANNED", "7", "This participant has been either temporarily or definitely banned" :ref:`Top ` .. _reference-ml-enum-com.daysofwonder.metalobby.ErrorCode: .. _reference-ml-field-com.daysofwonder.metalobby.ErrorCode: ErrorCode ^^^^^^^^^ List of possible errors. .. csv-table:: ErrorCode :widths: 20 10 40 :header: "Name", "Number", "Description" "NO_ERROR", "0", "No error was encountered, but the error field was mandatory" "UNKNOWN_PLAYER", "2", "An invalid participant local ID has been provided in a field" "UNKNOWN_ROOM", "3", "The provided room ID does not exist, or the participant is not part of this game" "MAINTENANCE_MODE", "4", "The server cannot respond due to temporary maintenance operation" "TOO_MANY_OFFERS", "5", "The current participant reached the maximum number of games concurrently running" "UNKNOWN_DEVICE_TOKEN", "6", "Tried to perform an action on an unknown Token (or the Token is not bound to the current participant)" "BAD_REQUEST", "14", "The request had invalid parameters" "WRONG_STATE", "15", "The request was sent while the room is in a different state that doesn't know how to process it" "DUPLICATE_SESSION", "16", "We're aborting this connection because another session from a different device has opened for the same user" "SERVER_ERROR", "20", "Unknown error from the server" "NOT_ALLOWED", "21", "Operation not allowed" "TOO_MANY_PARTICIPANTS", "22", "Invitation/Creation requests only accept a limited number of participants" :ref:`Top ` .. _reference-ml-file-common.proto: common.proto ============ Messages -------- .. _req-ml-PartnerToken: .. _reference-ml-message-com.daysofwonder.async.PartnerToken: .. _reference-ml-field-com.daysofwonder.async.PartnerToken: PartnerToken ^^^^^^^^^^^^ Session token authentication. More information can be found in :ref:`workflow-authentication-with-an-oauth2-access-token` section. .. csv-table:: PartnerToken :widths: 20 10 40 :header: "Field", "Type", "Description" "sessionToken", :ref:`string `, "Use to authenticate with an ``access_token`` retrieved from the API" "partner_user", :ref:`com.daysofwonder.PartnerUser `, "User information relative to partner account" :ref:`Top ` .. _reference-ml-file-game.proto: game.proto ========== Messages -------- .. _req-ml-AccessRights: .. _reference-ml-message-com.daysofwonder.AccessRights: .. _reference-ml-field-com.daysofwonder.AccessRights: AccessRights ^^^^^^^^^^^^ .. csv-table:: AccessRights :widths: 20 10 40 :header: "Field", "Type", "Description" "rights", :ref:`AccessRights.Right[] `, "Specific rights relative to a player" :ref:`Top ` .. _req-ml-AccessRights.Right: .. _reference-ml-message-com.daysofwonder.AccessRights.Right: .. _reference-ml-field-com.daysofwonder.AccessRights.Right: AccessRights.Right ^^^^^^^^^^^^^^^^^^ .. csv-table:: AccessRights.Right :widths: 20 10 40 :header: "Field", "Type", "Description" "name", :ref:`string `, "Name of the right" "feature", :ref:`string `, "Content of the right for the player" :ref:`Top ` .. _req-ml-Achievement: .. _reference-ml-message-com.daysofwonder.Achievement: .. _reference-ml-field-com.daysofwonder.Achievement: Achievement ^^^^^^^^^^^ .. csv-table:: Achievement :widths: 20 10 40 :header: "Field", "Type", "Description" "id", :ref:`int32 `, "Unique ID of the achievement" "name", :ref:`string `, "Title of the achievement" "description", :ref:`string `, "Description of the achievement" "type", :ref:`Achievement.Type `, "Kind of achievement" "status", :ref:`Achievement.Status `, "Current usage of the achievement" "secret", :ref:`bool `, "If the description should be hidden" "tag", :ref:`string `, "Alphanumerical unique identifier" :ref:`Top ` .. _req-ml-AchievementUpdate: .. _reference-ml-message-com.daysofwonder.AchievementUpdate: .. _reference-ml-field-com.daysofwonder.AchievementUpdate: AchievementUpdate ^^^^^^^^^^^^^^^^^ .. csv-table:: AchievementUpdate :widths: 20 10 40 :header: "Field", "Type", "Description" "achievement_updates", :ref:`PlayerAchievementUpdate[] `, "List of awarded achievements" :ref:`Top ` .. _req-ml-Activity: .. _reference-ml-message-com.daysofwonder.Activity: .. _reference-ml-field-com.daysofwonder.Activity: Activity ^^^^^^^^ Represents a type of activity. .. _req-ml-Avatar: .. _reference-ml-message-com.daysofwonder.Avatar: .. _reference-ml-field-com.daysofwonder.Avatar: Avatar ^^^^^^ A player avatar description. In the order: * if an ``image`` is provided, the avatar url is `https://uploads.asmodee.net/builtin/` * else, if a ``location`` is provided, then it is the avatar url * else, if an ``id`` (strictly positive) is provided, the avatar url is `https://uploads.asmodee.net/avatars/` * else (nothing is provided), then a default avatar is used: `https://uploads.asmodee.net/builtin/avatar-neutral.jpg` .. csv-table:: Avatar :widths: 20 10 40 :header: "Field", "Type", "Description" "id", :ref:`int32 `, "Identifier for uploaded avatar (if no ``image`` or ``location`` is provided)" "location", :ref:`string `, "Avatar full url (if no ``image`` is provided)" "image", :ref:`string `, "Built-in avatar image name (with extension)" :ref:`Top ` .. _req-ml-FinalScore: .. _reference-ml-message-com.daysofwonder.FinalScore: .. _reference-ml-field-com.daysofwonder.FinalScore: FinalScore ^^^^^^^^^^ Player position as indicated by the client at the end of a game. The rank computation uses this to order players. .. csv-table:: FinalScore :widths: 20 10 40 :header: "Field", "Type", "Description" "player_id", :ref:`int32 `, "Local player id" "game_rank", :ref:`int32 `, "The game rank is used to compute global rankings. The lowest rank is the winner. More than one player can have the same game_rank" "game_score", :ref:`float `, "The game score is used to keep track of the user score in their game history." :ref:`Top ` .. _req-ml-PartnerUser: .. _reference-ml-message-com.daysofwonder.PartnerUser: .. _reference-ml-field-com.daysofwonder.PartnerUser: PartnerUser ^^^^^^^^^^^ Contains the information of a Player for a specific partner. .. csv-table:: PartnerUser :widths: 20 10 40 :header: "Field", "Type", "Description" "partner_id", :ref:`string `, "ID of the partner" "partner_display_name", :ref:`string `, "User name in the partner's system" "partner_user_id", :ref:`string `, "Unique ID of the user, in the partner's system" :ref:`Top ` .. _req-ml-Player: .. _reference-ml-message-com.daysofwonder.Player: .. _reference-ml-field-com.daysofwonder.Player: Player ^^^^^^ Player record. More information can be found in :ref:`concept-player` section. .. csv-table:: Player :widths: 20 10 40 :header: "Field", "Type", "Description" "name", :ref:`string `, "Player name" "id", :ref:`int32 `, "Local player id" "karma", :ref:`int32 `, "Player karma (0-100)" "rank_score", :ref:`double `, "Player ELO rank score" "w_w_w_id", :ref:`int32 `, "Player unique global id" "rank", :ref:`int32 `, "Player main rank" "nb_games", :ref:`int32 `, "Player number of ranked games played" "banned", :ref:`bool `, "True if this player has been administratively banned for offense" "blocked", :ref:`bool `, "True if this player has been administratively prevented to chat" "avatar", :ref:`Avatar `, "Player avatar" "language", :ref:`int32 `, "Player language (0- English, 1- French, 2- German)" "tz", :ref:`string `, "Player time zone" "ranks", :ref:`Rank[] `, "Player list of game variants ranks/rankscore" "rights", :ref:`AccessRights `, "Player list of online features" "partner_user", :ref:`PartnerUser `, "Player's partner information given at auth" :ref:`Top ` .. _req-ml-PlayerAchievement: .. _reference-ml-message-com.daysofwonder.PlayerAchievement: .. _reference-ml-field-com.daysofwonder.PlayerAchievement: PlayerAchievement ^^^^^^^^^^^^^^^^^ Player achievement. .. csv-table:: PlayerAchievement :widths: 20 10 40 :header: "Field", "Type", "Description" "achievement", :ref:`Achievement `, "Awarded achievement" "date", :ref:`string `, "Date at which the achievement was awarded" "game", :ref:`string `, "Game the achievement belongs to" :ref:`Top ` .. _req-ml-PlayerAchievementUpdate: .. _reference-ml-message-com.daysofwonder.PlayerAchievementUpdate: .. _reference-ml-field-com.daysofwonder.PlayerAchievementUpdate: PlayerAchievementUpdate ^^^^^^^^^^^^^^^^^^^^^^^ .. csv-table:: PlayerAchievementUpdate :widths: 20 10 40 :header: "Field", "Type", "Description" "player_id", :ref:`int32 `, "The global id of the player whose achievements have been updated" "achievements", :ref:`PlayerAchievement[] `, "List of awarded achievements" :ref:`Top ` .. _req-ml-PlayerActivity: .. _reference-ml-message-com.daysofwonder.PlayerActivity: .. _reference-ml-field-com.daysofwonder.PlayerActivity: PlayerActivity ^^^^^^^^^^^^^^ This represents an activity for a given player. .. csv-table:: PlayerActivity :widths: 20 10 40 :header: "Field", "Type", "Description" "user_id", :ref:`int32 `, "Global id of the user performing the activity" "last_use", :ref:`int64 `, "Last time we detected this activity, timestamp in seconds since UNIX epoch" "activity", :ref:`Activity.Code `, "Activity integer code" "client_id", :ref:`string `, "Client used when activity changed" "game_type", :ref:`string `, "Game type ('TT', 'SW')" "payload", :ref:`string `, "String providing more information" :ref:`Top ` .. _req-ml-PlayerRankingUpdate: .. _reference-ml-message-com.daysofwonder.PlayerRankingUpdate: .. _reference-ml-field-com.daysofwonder.PlayerRankingUpdate: PlayerRankingUpdate ^^^^^^^^^^^^^^^^^^^ Rank evolution for a given player global id, usually given at the end of a game. .. csv-table:: PlayerRankingUpdate :widths: 20 10 40 :header: "Field", "Type", "Description" "player_id", :ref:`int32 `, "Global ID of the player whose ranking has been updated" "delta", :ref:`float `, "Difference in rankscore" "old_rank_score", :ref:`double `, "Rankscore before this update" "new_rank_score", :ref:`double `, "Rankscore now, after this update (should be ``old_rank_score + delta``)" "variant", :ref:`string `, "Game variant in which the ranking has been updated, if relevant" "old_nb_games", :ref:`int32 `, "Number of ranked games before this update" "new_nb_games", :ref:`int32 `, "Number of ranked games now, after this update" :ref:`Top ` .. _req-ml-Rank: .. _reference-ml-message-com.daysofwonder.Rank: .. _reference-ml-field-com.daysofwonder.Rank: Rank ^^^^ A player game variant rank information. .. csv-table:: Rank :widths: 20 10 40 :header: "Field", "Type", "Description" "rank", :ref:`int32 `, "Player's rank position (lower is better, #1 is the best)" "rank_score", :ref:`float `, "Player's ELO rankscore (higher is better, default is 1500)" "name", :ref:`string `, "Game (or variant) this ranking is from" "nb_games", :ref:`int32 `, "Number of ranked games played" :ref:`Top ` .. _req-ml-RankingUpdate: .. _reference-ml-message-com.daysofwonder.RankingUpdate: .. _reference-ml-field-com.daysofwonder.RankingUpdate: RankingUpdate ^^^^^^^^^^^^^ List of ranking updates (one per player in a game usually). .. csv-table:: RankingUpdate :widths: 20 10 40 :header: "Field", "Type", "Description" "update", :ref:`PlayerRankingUpdate[] `, "Ranking changes for players, at the outcome game" :ref:`Top ` Enums ----- .. _reference-ml-enum-com.daysofwonder.Achievement.Status: .. _reference-ml-field-com.daysofwonder.Achievement.Status: Achievement.Status ^^^^^^^^^^^^^^^^^^ .. csv-table:: Achievement.Status :widths: 20 10 40 :header: "Name", "Number", "Description" "NEW", "0", "Achievement is in preparation and not visible/usable yet" "ACTIVE", "1", "Achievement is valid and usable" "RETIRED", "2", "Achievement is not awardable, but still visible in the profile" :ref:`Top ` .. _reference-ml-enum-com.daysofwonder.Achievement.Type: .. _reference-ml-field-com.daysofwonder.Achievement.Type: Achievement.Type ^^^^^^^^^^^^^^^^ .. csv-table:: Achievement.Type :widths: 20 10 40 :header: "Name", "Number", "Description" "NORMAL", "0", "Regular achievement, most of them belong to this type" "OFFICER", "1", "Related to Memoir'44" "EVENT", "3", "Related to a special event (contest, tournament...)" "COMMUNITY", "4", "Related to the Asmodee community, used by some websites" :ref:`Top ` .. _reference-ml-enum-com.daysofwonder.Activity.Code: .. _reference-ml-field-com.daysofwonder.Activity.Code: Activity.Code ^^^^^^^^^^^^^ .. csv-table:: Activity.Code :widths: 20 10 40 :header: "Name", "Number", "Description" "UNKNOWN", "0", "The server doesn't know what the player is doing" "DISCONNECTED", "1", "Player disconnected and did not update activity since then" "IDLE", "2", "Player is connected to the server but not playing or in lobby or in any other state" "LOBBY", "3", "Player is in the lobby" "PLAYING_OFFLINE", "4", "Player is playing a game" "PLAYING_ONLINE", "5", "Player is playing an online game" "WAITING", "6", "Player is waiting for other players to start a game" "OTHER", "7", "User is in an other app" "BROWSING", "8", "User is browsing some page of forum, website..." "OBSERVING", "9", "User is observing a game" :ref:`Top ` .. _reference-ml-file-meta_lobby_request.proto: meta_lobby_request.proto ======================== Messages -------- .. _req-ml-Message: .. _reference-ml-message-com.daysofwonder.metalobby.Message: .. _reference-ml-field-com.daysofwonder.metalobby.Message: Message ^^^^^^^ .. csv-table:: Message :widths: 20 10 40 :header: "Field", "Type", "Description" "request_number", :ref:`int32 `, "id the underlying request" "ping_request", :ref:`PingRequest `, "777" "async_auth_request", :ref:`AsyncAuthRequest `, "400" "async_disconnect_request", :ref:`AsyncDisconnectRequest `, "401" "async_connected_request", :ref:`AsyncConnectedRequest `, "406" "async_connection_error_request", :ref:`AsyncConnectionErrorRequest `, "407" "async_unlink_device_request", :ref:`AsyncUnlinkDeviceRequest `, "412" "async_device_unlinked_request", :ref:`AsyncDeviceUnlinkedRequest `, "413" "multicast_data_request", :ref:`MulticastDataRequest `, "502" "client_data_request", :ref:`ClientDataRequest `, "503" "error_request", :ref:`MetaErrorRequest `, "505" "room_chat_request", :ref:`RoomChatRequest `, "524" "client_chat_room_request", :ref:`ClientChatRoomRequest `, "525" "client_chat_room_blocked_request", :ref:`ClientChatRoomBlockedRequest `, "526" "meta_player_presence_update_request", :ref:`MetaPlayerPresenceUpdateRequest `, "" "async_buddy_presence_partial_update_request", :ref:`AsyncBuddyPresencePartialUpdateRequest `, "517" "register_presence_request", :ref:`RegisterPresenceRequest `, "527" "unregister_presence_request", :ref:`UnregisterPresenceRequest `, "528" "subscribe_presence_service_request", :ref:`SubscribePresenceServiceRequest `, "532" "unsubscribe_presence_service_request", :ref:`UnsubscribePresenceServiceRequest `, "533" "switched_room_request", :ref:`SwitchedToRoomRequest `, "" "get_chat_room_history_request", :ref:`GetChatRoomHistoryRequest `, "535" "client_chat_room_history_request", :ref:`ClientChatRoomHistoryRequest `, "536" "create_room_request", :ref:`CreateRoomRequest `, "" "room_created_request", :ref:`RoomCreatedRequest `, "2001" "whats_new_room_cat_request", :ref:`WhatsNewRoomcatRequest `, "2002" "room_list_request", :ref:`RoomListRequest `, "2003" "room_details", :ref:`RoomDetails `, "" "leave_room_request", :ref:`LeaveRoomRequest `, "" "room_left_request", :ref:`RoomLeftRequest `, "" "invite_friends_to_room_request", :ref:`InviteFriendsToRoomRequest `, "" "invited_friends_to_room_request", :ref:`InvitedFriendsToRoomRequest `, "" "invited_room_request", :ref:`InvitedRoomRequest `, "" "answer_invitation_room_request", :ref:`AnswerInvitationRoomRequest `, "" "room_invitation_cancelled_request", :ref:`RoomInvitationCancelledRequest `, "" "room_joined_request", :ref:`RoomJoinedRequest `, "" "room_invitation_declined_request", :ref:`RoomInvitationDeclinedRequest `, "" "room_over_request", :ref:`RoomOverRequest `, "" "update_room_configuration_request", :ref:`UpdateRoomConfigurationRequest `, "" "room_configuration_updated_request", :ref:`RoomConfigurationUpdatedRequest `, "" "kick_participant_request", :ref:`KickParticipantRequest `, "" "participant_kicked_request", :ref:`ParticipantKickedRequest `, "" "mute_participant_request", :ref:`MuteParticipantRequest `, "" "participant_muted_request", :ref:`ParticipantMutedRequest `, "" "unmute_participant_request", :ref:`UnmuteParticipantRequest `, "" "participant_unmuted_request", :ref:`ParticipantUnmutedRequest `, "" :ref:`Top ` .. _req-ml-Packet: .. _reference-ml-message-com.daysofwonder.metalobby.Packet: .. _reference-ml-field-com.daysofwonder.metalobby.Packet: Packet ^^^^^^ .. csv-table:: Packet :widths: 20 10 40 :header: "Field", "Type", "Description" "id", :ref:`int64 `, "Unique client-filled identifier of the packet, returned by the server in the response if possible - it is recommended to used a monotonically incrementing integer" "payload", :ref:`Message `, "Embedded message" :ref:`Top ` .. _req-ml-PingRequest: .. _reference-ml-message-com.daysofwonder.metalobby.PingRequest: .. _reference-ml-field-com.daysofwonder.metalobby.PingRequest: PingRequest ^^^^^^^^^^^ Heartbeat request. Send this request regularly to the server, which will echo it back (default max heartbeat timeout is 15 seconds on the server-side). This allows the server to notice when a client is disconnected (and the reverse). This also allows to measure the round-trip time between the client and the server, and possibly alert the player if it is too large. More information can be found in :ref:`workflow-ping` section. * request_number: 777 * field_name: ping_request .. csv-table:: PingRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "timestamp", :ref:`int64 `, "Timestamp at which the request has been sent" :ref:`Top ` .. _reference-ml-file-push.proto: push.proto ========== Messages -------- .. _req-ml-Device: .. _reference-ml-message-com.daysofwonder.game.push.Device: .. _reference-ml-field-com.daysofwonder.game.push.Device: Device ^^^^^^ A device token as given by the platform .. csv-table:: Device :widths: 20 10 40 :header: "Field", "Type", "Description" "token", :ref:`bytes `, "Device Token" :ref:`Top ` .. _req-ml-DeviceType: .. _reference-ml-message-com.daysofwonder.game.push.DeviceType: .. _reference-ml-field-com.daysofwonder.game.push.DeviceType: DeviceType ^^^^^^^^^^ A device token and its platform identifier .. csv-table:: DeviceType :widths: 20 10 40 :header: "Field", "Type", "Description" "token", :ref:`bytes `, "Device Token" "type", :ref:`Devices.Type `, "Platform unique identifier" :ref:`Top ` .. _req-ml-Devices: .. _reference-ml-message-com.daysofwonder.game.push.Devices: .. _reference-ml-field-com.daysofwonder.game.push.Devices: Devices ^^^^^^^ Enums ----- .. _reference-ml-enum-com.daysofwonder.game.push.Devices.Type: .. _reference-ml-field-com.daysofwonder.game.push.Devices.Type: Devices.Type ^^^^^^^^^^^^ Type of device token .. csv-table:: Devices.Type :widths: 20 10 40 :header: "Name", "Number", "Description" "RESERVED", "0", "Do not use" "IOS", "1", "" "GCM", "2", "" "IOS_SANDBOX", "4", "Development mode for IOS" "STEAM", "5", "" "OSX", "10", "" "OSX_SANDBOX", "11", "Development mode for OSX" "FCM", "12", "" :ref:`Top ` .. _reference-ml-scalar-value-types: Scalar Value Types ================== Standard protobuf types .. _reference-ml-field-double: .. _reference-ml-field-float: .. _reference-ml-field-int32: .. _reference-ml-field-int64: .. _reference-ml-field-uint32: .. _reference-ml-field-uint64: .. _reference-ml-field-sint32: .. _reference-ml-field-sint64: .. _reference-ml-field-fixed32: .. _reference-ml-field-fixed64: .. _reference-ml-field-sfixed32: .. _reference-ml-field-sfixed64: .. _reference-ml-field-bool: .. _reference-ml-field-string: .. _reference-ml-field-bytes: .. list-table:: :widths: 15 40 15 15 15 :header-rows: 1 * - .proto Type - Notes - C++ Type - C# Type - Java Type * - double - - double - double - double * - float - - float - float - float * - int32 - Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. - int32 - int - int * - int64 - Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. - int64 - long - long * - uint32 - Uses variable-length encoding. - uint32 - uint - int * - uint64 - Uses variable-length encoding. - uint64 - ulong - long * - sint32 - Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. - int32 - int - int * - sint64 - Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. - int64 - long - long * - fixed32 - Always four bytes. More efficient than uint32 if values are often greater than 2^28. - uint32 - uint - int * - fixed64 - Always eight bytes. More efficient than uint64 if values are often greater than 2^56. - uint64 - ulong - long * - sfixed32 - Always four bytes. - int32 - int - int * - sfixed64 - Always eight bytes. - int64 - long - long * - bool - - bool - bool - boolean * - string - A string must always contain UTF-8 encoded or 7-bit ASCII text. - string - string - String * - bytes - May contain any arbitrary sequence of bytes. - string - ByteString - ByteString :ref:`Top `