***************** Request Reference ***************** .. _request-reference-top: Table of Contents ================= * :ref:`async.proto ` * :ref:`ActionCommitedRequest ` * :ref:`ActionInterruptedRequest ` * :ref:`ActionRequiredRequest ` * :ref:`AnswerInvitationRequest ` * :ref:`AskAnyPlayerInfoRequest ` * :ref:`AskPlayerInfoRequest ` * :ref:`AskServerStatisticsRequest ` * :ref:`AsyncAuthRequest ` * :ref:`AsyncAuthRequest.UserAgent ` * :ref:`AsyncBuddy ` * :ref:`AsyncBuddyAddedRequest ` * :ref:`AsyncBuddyList ` * :ref:`AsyncBuddyListContentRequest ` * :ref:`AsyncBuddyListRequest ` * :ref:`AsyncBuddyManagementRequest ` * :ref:`AsyncBuddyPresencePartialUpdateRequest ` * :ref:`AsyncBuddyRemovedRequest ` * :ref:`AsyncConnectedRequest ` * :ref:`AsyncConnectionErrorRequest ` * :ref:`AsyncDeviceUnlinkedRequest ` * :ref:`AsyncDisconnectRequest ` * :ref:`AsyncIgnore ` * :ref:`AsyncIgnoreAddedRequest ` * :ref:`AsyncIgnoreList ` * :ref:`AsyncIgnoreListContentRequest ` * :ref:`AsyncIgnoreListRequest ` * :ref:`AsyncIgnoreManagementRequest ` * :ref:`AsyncIgnoreRemovedRequest ` * :ref:`AsyncUnlinkDeviceRequest ` * :ref:`ChatHistoryEntry ` * :ref:`ClientChatBlockedRequest ` * :ref:`ClientChatHistoryRequest ` * :ref:`ClientChatRequest ` * :ref:`ClientDataRequest ` * :ref:`ClockPausedRequest ` * :ref:`ClockResumedRequest ` * :ref:`ClocksStatusRequest ` * :ref:`CommitActionRequest ` * :ref:`EngageGameWithFriendsRequest ` * :ref:`EnterLobbyRequest ` * :ref:`ErrorRequest ` * :ref:`ExitLobbyRequest ` * :ref:`GameAbortedConfirmationRequest ` * :ref:`GameAbortedRequest ` * :ref:`GameClock ` * :ref:`GameConfiguration ` * :ref:`GameCreatedRequest ` * :ref:`GameDetails ` * :ref:`GameForfeitRequest ` * :ref:`GameForfeitedRequest ` * :ref:`GameList ` * :ref:`GameNotification ` * :ref:`GameObservedRequest ` * :ref:`GameOutcomeConfirmationRequest ` * :ref:`GameOutcomeRequest ` * :ref:`GameOverRequest ` * :ref:`GameStateUpdatedRequest ` * :ref:`GameStatusReportRequest ` * :ref:`GameUserDataUpdatedRequest ` * :ref:`GetChatHistoryRequest ` * :ref:`GetClocksRequest ` * :ref:`InterruptActionErrorRequest ` * :ref:`InterruptActionRequest ` * :ref:`InterruptionOverRequest ` * :ref:`InvitationAnsweredRequest ` * :ref:`InvitationDetails ` * :ref:`InvitationDetails.Confirmation ` * :ref:`KarmaUpdate ` * :ref:`LeaveSyncGameRequest ` * :ref:`LobbyCreateGameRequest ` * :ref:`LobbyEnteredRequest ` * :ref:`LobbyExitedRequest ` * :ref:`LobbyGameCreatedRequest ` * :ref:`LobbyGameListRequest ` * :ref:`LobbyJoinDeniedRequest ` * :ref:`LobbyJoinGameRequest ` * :ref:`LobbyLeaveGameRequest ` * :ref:`LobbyNewPlayerRequest ` * :ref:`LobbyPlayerInfoRequest ` * :ref:`LobbyPlayerLeftGameRequest ` * :ref:`LobbyPlayerListRequest ` * :ref:`LobbyPlayerListRequest.PlayerList ` * :ref:`LobbyStartGameDeniedRequest ` * :ref:`LobbyStartGameRequest ` * :ref:`MulticastChatRequest ` * :ref:`MulticastDataRequest ` * :ref:`ObservableGameListRequest ` * :ref:`PlayerIdleProgressRequest ` * :ref:`PlayerInfoRequest ` * :ref:`PlayerPregameData ` * :ref:`PlayerPresenceUpdateRequest ` * :ref:`PlayerReplacedRequest ` * :ref:`PlayerTimeoutRequest ` * :ref:`RegisterPresenceRequest ` * :ref:`ResumeSyncGameRequest ` * :ref:`ServerStatisticsRequest ` * :ref:`Session ` * :ref:`SmallPlayer ` * :ref:`StartObserveGameRequest ` * :ref:`StatusReport ` * :ref:`StatusReport.PlayerClock ` * :ref:`StopObserveGameRequest ` * :ref:`SubscribePresenceServiceRequest ` * :ref:`SubscribeToObservableGameListRequest ` * :ref:`SubscribedToObservableGameListRequest ` * :ref:`SwitchedToGameRequest ` * :ref:`UnregisterPresenceRequest ` * :ref:`UnsubscribePresenceServiceRequest ` * :ref:`UpdateUserDataRequest ` * :ref:`UserDataUpdateRequiredRequest ` * :ref:`UserDataUpdatedRequest ` * :ref:`WhatsNewPussycatRequest ` * :ref:`AsyncBuddyManagementRequest.Operation ` * :ref:`AsyncConnectionErrorRequest.ConnectionError ` * :ref:`AsyncIgnoreManagementRequest.Operation ` * :ref:`ErrorCode ` * :ref:`GameConfiguration.GameMode ` * :ref:`GameConfiguration.Observers ` * :ref:`GameNotification.Event ` * :ref:`GameObservedRequest.Status ` * :ref:`GameStatus ` * :ref:`InterruptActionErrorRequest.Error ` * :ref:`LobbyJoinDeniedRequest.JoinError ` * :ref:`LobbyStartGameDeniedRequest.StartError ` * :ref:`PlayerTimeoutRequest.PlayerStatus ` * :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:`request.proto ` * :ref:`Message ` * :ref:`Packet ` * :ref:`PingRequest ` * :ref:`push.proto ` * :ref:`Device ` * :ref:`DeviceType ` * :ref:`Devices ` * :ref:`Devices.Type ` * :ref:`reference-scalar-value-types` .. _reference-file-async.proto: async.proto =========== Messages -------- .. _req-ActionCommitedRequest: .. _reference-message-com.daysofwonder.async.ActionCommitedRequest: .. _reference-field-com.daysofwonder.async.ActionCommitedRequest: ActionCommitedRequest ^^^^^^^^^^^^^^^^^^^^^ Sent back to acknowledge a client sent :ref:`CommitActionRequest `. More information can be found in :ref:`workflow-turn` and :ref:`workflow-simultaneous` sections. S -> C * request_number: 523 * field_name: action_commited_request In response to: * :ref:`CommitActionRequest ` .. csv-table:: ActionCommitedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" "turn_index", :ref:`int32 `, "| Monotonically incremented turn index after each round by the server, this should allow | the client to know which request it should act on. | It has the same value as provided in last :ref:`CommitActionRequest `, if correct" "pause_time", :ref:`int32 `, "Next player's clock will start after this delay (in seconds)" :ref:`Top ` .. _req-ActionInterruptedRequest: .. _reference-message-com.daysofwonder.async.ActionInterruptedRequest: .. _reference-field-com.daysofwonder.async.ActionInterruptedRequest: ActionInterruptedRequest ^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server to confirm the reception of an interruption. More information can be found in :ref:`workflow-interruption` section. S -> C * request_number: 571 * field_name: action_interrupted_request In response to: * :ref:`InterruptActionRequest ` .. csv-table:: ActionInterruptedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "| The game id where this event happened" "player_id", :ref:`int32 `, "| Local player id of the interrupting player" "turn_index", :ref:`int32 `, "| Turn index at which the interruption occurred" "interruption_data", :ref:`bytes `, "| The player interrupted with these data" "no_more_interruption", :ref:`bool `, "| If ``true``, the server has stopped the interruption phase after receiving the last interruption. | If ``false``, it will continue until ``interruption_window_duration`` (cf :ref:`CommitActionRequest `)" :ref:`Top ` .. _req-ActionRequiredRequest: .. _reference-message-com.daysofwonder.async.ActionRequiredRequest: .. _reference-field-com.daysofwonder.async.ActionRequiredRequest: ActionRequiredRequest ^^^^^^^^^^^^^^^^^^^^^ Ask a given player to perform a game action. This makes the player the "active player". More information can be found in :ref:`workflow-turn` and :ref:`workflow-simultaneous` sections. S -> C * request_number: 500 * field_name: action_required_request Possible Responses: * :ref:`CommitActionRequest ` .. csv-table:: ActionRequiredRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" "state", :ref:`bytes `, "Client created game state" "players", :ref:`com.daysofwonder.Player[] `, "| List of players in this game | (in no particular order)" "next_player_ids", :ref:`int32[] `, "| List of the next player local ids in turn | (the receiving player will be the first one)" "turn_index", :ref:`int32 `, "| Monotonically incremented turn index after each round by the server. | This should allow the client to know which request it should act on. | Provide this value when sending a :ref:`CommitActionRequest `" "invited_by", :ref:`int32 `, "| This will be present if the game resulted from | an invitation from this player. | If the game resulted from an invitation, will be filled with the player's id. | Is 0 if the game was not an invitation. | Combined with ``turn_index == 1``, this can be | a way to let the user know that she has been invited" "player_clock", :ref:`GameClock `, "Current player clock status" "user_data", :ref:`PlayerPregameData[] `, "| Optionally sent user data. | This data comes from the ``LobbyCreateGame`` and | ``LobbyJoinGame`` request, or can also | be updated independently by users | with an :ref:`UpdateUserDataRequest `" "interruption_data", :ref:`PlayerPregameData[] `, "| Optionally sent interruption data. | This data comes from the interruption done by users | with an :ref:`InterruptActionRequest ` during an interruption turn" "pause_time", :ref:`int32 `, "| The player's clock will start after this delay (in seconds). This can be used to | give time to play animations of previous actions before starting decreasing clock." :ref:`Top ` .. _req-AnswerInvitationRequest: .. _reference-message-com.daysofwonder.async.AnswerInvitationRequest: .. _reference-field-com.daysofwonder.async.AnswerInvitationRequest: AnswerInvitationRequest ^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client to accept or decline an invitation. The result is immutable and any other accept/decline for the same user in the game after the first one will be discarded. More information can be found in :ref:`workflow-invitation` section. C -> S * request_number: 540 * field_name: answer_invitation_request In response to: * :ref:`GameCreatedRequest ` Possible Responses: * :ref:`InvitationAnsweredRequest ` * :ref:`ErrorRequest `: INVITATION_DENIED (13) .. csv-table:: AnswerInvitationRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "Game id of the accepted/declined invitation" "accept", :ref:`bool `, "``true`` to accept the invitation, ``false`` otherwise" "user_data", :ref:`bytes `, "Optional user data to send this player capabilities" :ref:`Top ` .. _req-AskAnyPlayerInfoRequest: .. _reference-message-com.daysofwonder.async.AskAnyPlayerInfoRequest: .. _reference-field-com.daysofwonder.async.AskAnyPlayerInfoRequest: AskAnyPlayerInfoRequest ^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client when more details are needed for a given connected player. This is used for instance when clicking on a player in the buddy/ignore player list. C -> S * request_number: 630 * field_name: ask_any_player_info_request Possible Responses: * :ref:`PlayerInfoRequest ` * :ref:`ErrorRequest ` .. csv-table:: AskAnyPlayerInfoRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "player_id", :ref:`int32 `, "The player to ask information for" :ref:`Top ` .. _req-AskPlayerInfoRequest: .. _reference-message-com.daysofwonder.async.AskPlayerInfoRequest: .. _reference-field-com.daysofwonder.async.AskPlayerInfoRequest: AskPlayerInfoRequest ^^^^^^^^^^^^^^^^^^^^ Sent by the client when more details are needed for a given player. This is used for instance when clicking on a player in the lobby player list. More information can be found in :ref:`workflow-lobby-ask` section. C -> S * request_number: 605 * field_name: ask_player_info_request Possible Responses: * :ref:`LobbyPlayerInfoRequest ` * :ref:`ErrorRequest ` .. csv-table:: AskPlayerInfoRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "player_id", :ref:`int32 `, "The player to ask information for" :ref:`Top ` .. _req-AskServerStatisticsRequest: .. _reference-message-com.daysofwonder.async.AskServerStatisticsRequest: .. _reference-field-com.daysofwonder.async.AskServerStatisticsRequest: AskServerStatisticsRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client when it wants to have some statistics about the server (like number of hosted games, connected clients...). When ``subscribe`` is ``true``, the server sends a continuous stream of statistics updates. More information can be found in :ref:`workflow-statistics` section. C -> S * request_number: 408 * field_name: ask_server_statistics_request Possible Responses: * :ref:`ServerStatisticsRequest ` .. csv-table:: AskServerStatisticsRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "subscribe", :ref:`bool `, "| If ``false``, the server will return statistics only once. | If ``true``, the server will send a stream of statistics message, and will stop | only when the client sends an ask request with ``subscribe == false``" :ref:`Top ` .. _req-AsyncAuthRequest: .. _reference-message-com.daysofwonder.async.AsyncAuthRequest: .. _reference-field-com.daysofwonder.async.AsyncAuthRequest: AsyncAuthRequest ^^^^^^^^^^^^^^^^ Used to: * either authentify a player 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:`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 player 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-AsyncAuthRequest.UserAgent: .. _reference-message-com.daysofwonder.async.AsyncAuthRequest.UserAgent: .. _reference-field-com.daysofwonder.async.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-AsyncBuddy: .. _reference-message-com.daysofwonder.async.AsyncBuddy: .. _reference-field-com.daysofwonder.async.AsyncBuddy: AsyncBuddy ^^^^^^^^^^ This represents a buddy. More information can be found in :ref:`workflow-buddylist` section. .. csv-table:: AsyncBuddy :widths: 20 10 40 :header: "Field", "Type", "Description" "player_id", :ref:`int32 `, "Unique global id" "activity", :ref:`com.daysofwonder.PlayerActivity `, "This buddy's current activity" :ref:`Top ` .. _req-AsyncBuddyAddedRequest: .. _reference-message-com.daysofwonder.async.AsyncBuddyAddedRequest: .. _reference-field-com.daysofwonder.async.AsyncBuddyAddedRequest: AsyncBuddyAddedRequest ^^^^^^^^^^^^^^^^^^^^^^ Sent by the server when a buddy has been added. More information can be found in :ref:`workflow-buddylist` section. S -> C * request_number: 519 * field_name: async_buddy_added_request In response to: * :ref:`AsyncBuddyManagementRequest ` .. csv-table:: AsyncBuddyAddedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "added_buddy", :ref:`com.daysofwonder.Player `, "The full player information of the added buddy" :ref:`Top ` .. _req-AsyncBuddyList: .. _reference-message-com.daysofwonder.async.AsyncBuddyList: .. _reference-field-com.daysofwonder.async.AsyncBuddyList: AsyncBuddyList ^^^^^^^^^^^^^^ This represents a list of buddy. More information can be found in :ref:`workflow-buddylist` section. .. csv-table:: AsyncBuddyList :widths: 20 10 40 :header: "Field", "Type", "Description" "buddy", :ref:`AsyncBuddy[] `, "| Buddies information, contains the activities" "player", :ref:`com.daysofwonder.Player[] `, "| Buddies' Player information, order is not guaranteed to be the same as the ``buddy`` field" "present", :ref:`int32[] `, "| Buddies whose global id are listed here are connected - note this is optional and | this list might be empty (especially during the phase where | the server doesn't yet support presence)" :ref:`Top ` .. _req-AsyncBuddyListContentRequest: .. _reference-message-com.daysofwonder.async.AsyncBuddyListContentRequest: .. _reference-field-com.daysofwonder.async.AsyncBuddyListContentRequest: AsyncBuddyListContentRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent in response to a given :ref:`AsyncBuddyListRequest `. S -> C * request_number: 516 * field_name: async_buddy_list_content_request In response to: * :ref:`AsyncBuddyListRequest ` .. csv-table:: AsyncBuddyListContentRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "buddies", :ref:`AsyncBuddyList `, "The current full buddy list (filtered if asked to)" :ref:`Top ` .. _req-AsyncBuddyListRequest: .. _reference-message-com.daysofwonder.async.AsyncBuddyListRequest: .. _reference-field-com.daysofwonder.async.AsyncBuddyListRequest: AsyncBuddyListRequest ^^^^^^^^^^^^^^^^^^^^^ Sent by the client to ask the connected user buddy list. C -> S * request_number: 515 * field_name: async_buddy_list_request Possible Responses: * :ref:`AsyncBuddyListContentRequest ` .. csv-table:: AsyncBuddyListRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "webcard_filter", :ref:`string[] `, "Pass an optional array of webcards to filter out users that don't have this webcard in their account" :ref:`Top ` .. _req-AsyncBuddyManagementRequest: .. _reference-message-com.daysofwonder.async.AsyncBuddyManagementRequest: .. _reference-field-com.daysofwonder.async.AsyncBuddyManagementRequest: AsyncBuddyManagementRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client to add or remove a buddy. A player cannot add herself to her own buddy list. More information can be found in :ref:`workflow-buddylist` section. C -> S * request_number: 518 * field_name: async_buddy_management_request Possible Responses: * :ref:`AsyncBuddyAddedRequest ` * :ref:`AsyncBuddyRemovedRequest ` .. csv-table:: AsyncBuddyManagementRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "operation", :ref:`AsyncBuddyManagementRequest.Operation `, "Whether to add or remove a buddy" "buddy", :ref:`AsyncBuddy `, "The buddy to be added or removed" :ref:`Top ` .. _req-AsyncBuddyPresencePartialUpdateRequest: .. _reference-message-com.daysofwonder.async.AsyncBuddyPresencePartialUpdateRequest: .. _reference-field-com.daysofwonder.async.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-AsyncBuddyRemovedRequest: .. _reference-message-com.daysofwonder.async.AsyncBuddyRemovedRequest: .. _reference-field-com.daysofwonder.async.AsyncBuddyRemovedRequest: AsyncBuddyRemovedRequest ^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server when a buddy has been removed. More information can be found in :ref:`workflow-buddylist` section. S -> C * request_number: 520 * field_name: async_buddy_removed_request In response to: * :ref:`AsyncBuddyManagementRequest ` .. csv-table:: AsyncBuddyRemovedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "removed_buddy", :ref:`AsyncBuddy `, "The removed buddy" :ref:`Top ` .. _req-AsyncConnectedRequest: .. _reference-message-com.daysofwonder.async.AsyncConnectedRequest: .. _reference-field-com.daysofwonder.async.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 player session" "player", :ref:`com.daysofwonder.Player `, "The current player information" :ref:`Top ` .. _req-AsyncConnectionErrorRequest: .. _reference-message-com.daysofwonder.async.AsyncConnectionErrorRequest: .. _reference-field-com.daysofwonder.async.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-AsyncDeviceUnlinkedRequest: .. _reference-message-com.daysofwonder.async.AsyncDeviceUnlinkedRequest: .. _reference-field-com.daysofwonder.async.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-AsyncDisconnectRequest: .. _reference-message-com.daysofwonder.async.AsyncDisconnectRequest: .. _reference-field-com.daysofwonder.async.AsyncDisconnectRequest: AsyncDisconnectRequest ^^^^^^^^^^^^^^^^^^^^^^ When a player 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-AsyncIgnore: .. _reference-message-com.daysofwonder.async.AsyncIgnore: .. _reference-field-com.daysofwonder.async.AsyncIgnore: AsyncIgnore ^^^^^^^^^^^ This represents an ignored player. .. csv-table:: AsyncIgnore :widths: 20 10 40 :header: "Field", "Type", "Description" "player_id", :ref:`int32 `, "Unique global id" :ref:`Top ` .. _req-AsyncIgnoreAddedRequest: .. _reference-message-com.daysofwonder.async.AsyncIgnoreAddedRequest: .. _reference-field-com.daysofwonder.async.AsyncIgnoreAddedRequest: AsyncIgnoreAddedRequest ^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server when an ignore have been added. More information can be found in :ref:`workflow-ignorelist` section. S -> C * request_number: 563 * field_name: async_ignore_added_request In response to: * :ref:`AsyncIgnoreManagementRequest ` .. csv-table:: AsyncIgnoreAddedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "added_ignore", :ref:`com.daysofwonder.Player `, "The ``Player`` information of the user who has been ignored" :ref:`Top ` .. _req-AsyncIgnoreList: .. _reference-message-com.daysofwonder.async.AsyncIgnoreList: .. _reference-field-com.daysofwonder.async.AsyncIgnoreList: AsyncIgnoreList ^^^^^^^^^^^^^^^ This represents a list of ignored players. .. csv-table:: AsyncIgnoreList :widths: 20 10 40 :header: "Field", "Type", "Description" "ignore", :ref:`AsyncIgnore[] `, "AsyncIgnore information list of the players being ignored" "player", :ref:`com.daysofwonder.Player[] `, "Player information of the ignored users, order is not guaranteed to be the same as the ``ignore`` field" :ref:`Top ` .. _req-AsyncIgnoreListContentRequest: .. _reference-message-com.daysofwonder.async.AsyncIgnoreListContentRequest: .. _reference-field-com.daysofwonder.async.AsyncIgnoreListContentRequest: AsyncIgnoreListContentRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent in response to a given :ref:`AsyncIgnoreListRequest `. More information can be found in :ref:`workflow-ignorelist` section. S -> C * request_number: 561 * field_name: async_ignore_list_content_request In response to: * :ref:`AsyncIgnoreListRequest ` .. csv-table:: AsyncIgnoreListContentRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "ignores", :ref:`AsyncIgnoreList `, "The current full ignore list (filtered if asked to)" :ref:`Top ` .. _req-AsyncIgnoreListRequest: .. _reference-message-com.daysofwonder.async.AsyncIgnoreListRequest: .. _reference-field-com.daysofwonder.async.AsyncIgnoreListRequest: AsyncIgnoreListRequest ^^^^^^^^^^^^^^^^^^^^^^ Sent by the client to fetch the user ignore list. More information can be found in :ref:`workflow-ignorelist` section. C -> S * request_number: 560 * field_name: async_ignore_list_request Possible Responses: * :ref:`AsyncIgnoreListContentRequest ` .. _req-AsyncIgnoreManagementRequest: .. _reference-message-com.daysofwonder.async.AsyncIgnoreManagementRequest: .. _reference-field-com.daysofwonder.async.AsyncIgnoreManagementRequest: AsyncIgnoreManagementRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client to add or remove a buddy. A player cannot add herself to her own ignore list. More information can be found in :ref:`workflow-ignorelist` section. C -> S * request_number: 562 * field_name: async_ignore_management_request Possible Responses: * :ref:`AsyncIgnoreAddedRequest ` * :ref:`AsyncIgnoreRemovedRequest ` .. csv-table:: AsyncIgnoreManagementRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "operation", :ref:`AsyncIgnoreManagementRequest.Operation `, "Operation to perform" "ignore", :ref:`AsyncIgnore `, "Ignored player the operation applies to" :ref:`Top ` .. _req-AsyncIgnoreRemovedRequest: .. _reference-message-com.daysofwonder.async.AsyncIgnoreRemovedRequest: .. _reference-field-com.daysofwonder.async.AsyncIgnoreRemovedRequest: AsyncIgnoreRemovedRequest ^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server when an ignore has been removed. More information can be found in :ref:`workflow-ignorelist` section. S -> C * request_number: 564 * field_name: async_ignore_removed_request In response to: * :ref:`AsyncIgnoreManagementRequest ` .. csv-table:: AsyncIgnoreRemovedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "removed_ignore", :ref:`AsyncIgnore `, "The ``AsyncIgnore`` (containing the global id) of the player who is not ignored anymore" :ref:`Top ` .. _req-AsyncUnlinkDeviceRequest: .. _reference-message-com.daysofwonder.async.AsyncUnlinkDeviceRequest: .. _reference-field-com.daysofwonder.async.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:`ErrorRequest `: 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 player session" :ref:`Top ` .. _req-ChatHistoryEntry: .. _reference-message-com.daysofwonder.async.ChatHistoryEntry: .. _reference-field-com.daysofwonder.async.ChatHistoryEntry: ChatHistoryEntry ^^^^^^^^^^^^^^^^ An entry of a chat history. More information about the chat can be found in :ref:`workflow-chat` section. .. csv-table:: ChatHistoryEntry :widths: 20 10 40 :header: "Field", "Type", "Description" "from", :ref:`string `, "Sender name" "text", :ref:`string `, "Chat message" "player_id", :ref:`int32 `, "For in game chat history it's the local game 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-ClientChatBlockedRequest: .. _reference-message-com.daysofwonder.async.ClientChatBlockedRequest: .. _reference-field-com.daysofwonder.async.ClientChatBlockedRequest: ClientChatBlockedRequest ^^^^^^^^^^^^^^^^^^^^^^^^ Sent to the :ref:`MulticastChatRequest ` 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:`MulticastChatRequest ` .. csv-table:: ClientChatBlockedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id (might be 0 if coming from the lobby)" "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:`MulticastChatRequest ` | 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-ClientChatHistoryRequest: .. _reference-message-com.daysofwonder.async.ClientChatHistoryRequest: .. _reference-field-com.daysofwonder.async.ClientChatHistoryRequest: ClientChatHistoryRequest ^^^^^^^^^^^^^^^^^^^^^^^^ Sent to in response to :ref:`GetChatHistoryRequest ` 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:`GetChatHistoryRequest ` .. csv-table:: ClientChatHistoryRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id (might be ``0`` if coming from the lobby)" "entry", :ref:`ChatHistoryEntry[] `, "Chat entries in chronological order" :ref:`Top ` .. _req-ClientChatRequest: .. _reference-message-com.daysofwonder.async.ClientChatRequest: .. _reference-field-com.daysofwonder.async.ClientChatRequest: ClientChatRequest ^^^^^^^^^^^^^^^^^ Sent by the server in response to a :ref:`MulticastChatRequest ` to the players of the game ``game_id`` as long as they were listed in ``MulticastChatRequest.recipient_ids`` (or to all players 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:`MulticastChatRequest ` .. csv-table:: ClientChatRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id (might be ``0`` if coming from the lobby)" "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-ClientDataRequest: .. _reference-message-com.daysofwonder.async.ClientDataRequest: .. _reference-field-com.daysofwonder.async.ClientDataRequest: ClientDataRequest ^^^^^^^^^^^^^^^^^ When one of the player 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" "game_id", :ref:`int64 `, "System assigned game id" "data", :ref:`bytes `, "Any data that was sent by the sender" "sender", :ref:`com.daysofwonder.Player `, "Sender player" :ref:`Top ` .. _req-ClockPausedRequest: .. _reference-message-com.daysofwonder.async.ClockPausedRequest: .. _reference-field-com.daysofwonder.async.ClockPausedRequest: ClockPausedRequest ^^^^^^^^^^^^^^^^^^ Sent by the server when the clock has been paused. S -> C * request_number: 543 * field_name: clock_paused_request .. csv-table:: ClockPausedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "Game id" "clock", :ref:`StatusReport.PlayerClock[] `, "Optional list of all player clocks" "error", :ref:`ErrorCode `, "If an error occurs, this field is set. Otherwise it's not" :ref:`Top ` .. _req-ClockResumedRequest: .. _reference-message-com.daysofwonder.async.ClockResumedRequest: .. _reference-field-com.daysofwonder.async.ClockResumedRequest: ClockResumedRequest ^^^^^^^^^^^^^^^^^^^ Sent by the server when the player clock is resumed S -> C * request_number: 545 * field_name: clock_resumed_request .. csv-table:: ClockResumedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "Game id" "clock", :ref:`StatusReport.PlayerClock[] `, "Optional list of all player clocks" "error", :ref:`ErrorCode `, "If an error occurs, this field is set. Otherwise it's not" :ref:`Top ` .. _req-ClocksStatusRequest: .. _reference-message-com.daysofwonder.async.ClocksStatusRequest: .. _reference-field-com.daysofwonder.async.ClocksStatusRequest: ClocksStatusRequest ^^^^^^^^^^^^^^^^^^^ Sent by the server in response to the :ref:`GetClocksRequest `. More information can be found in :ref:`workflow-player-clock` section. S -> C * request_number: 547 * field_name: clocks_status_request In response to: * :ref:`GetClocksRequest ` .. csv-table:: ClocksStatusRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "Game id the clocks are running in" "clock", :ref:`StatusReport.PlayerClock[] `, "List of all player clocks in the game" :ref:`Top ` .. _req-CommitActionRequest: .. _reference-message-com.daysofwonder.async.CommitActionRequest: .. _reference-field-com.daysofwonder.async.CommitActionRequest: CommitActionRequest ^^^^^^^^^^^^^^^^^^^ When a player has finished her action, she sends a :ref:`CommitActionRequest ` with the current game state and the list of next active players in turn. More information can be found in :ref:`workflow-turn`, :ref:`workflow-simultaneous` or :ref:`workflow-interruption` sections. C -> S * request_number: 501 * field_name: commit_action_request In response to: * :ref:`ActionRequiredRequest ` * :ref:`PlayerTimeoutRequest ` Possible Responses: * :ref:`ActionCommitedRequest ` * :ref:`GameStateUpdatedRequest ` * :ref:`ErrorRequest `: NOT_YOUR_TURN (1) * :ref:`ErrorRequest `: UNKNOWN_PLAYER (2) * :ref:`ErrorRequest `: UNKNOWN_GAME (3) * :ref:`ErrorRequest `: YOU_FORFEITED (7) * :ref:`ErrorRequest `: YOU_RAN_OUT_OF_TIME (8) * :ref:`ErrorRequest `: YOU_LEFT (9) .. csv-table:: CommitActionRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" "player_id", :ref:`int32 `, "| Local player id of the acting player. | In case of a robot hosted on a different | player device, this should be the robot | impersonating local player id" "next_state", :ref:`bytes `, "The next game state" "next_player_ids", :ref:`int32[] `, "| The ordered list (in action order) of the next player ids. | Please provide as much players as possible for robot hotswap to work correctly" "next_summary_data", :ref:`bytes `, "| Summary data of the ``next_state`` field. | Will end up in the ``StatusReport.summary_data`` of this game. | If not provided (or with empty bytes), the next ``StatusReport.summary_data`` won't be provided | (this can be used to clear the summary data if needed)" "turn_index", :ref:`int32 `, "| The turn index this action is supposed to played in. | It is recommended to provide it, the correct value is given by the last :ref:`ActionRequiredRequest ` / :ref:`PlayerTimeoutRequest ` and others" "next_simultaneous", :ref:`bool `, "Is the next turn a simultaneous turn?" "simultaneous_players", :ref:`int32[] `, "List of players required to play for the simultaneous turn" "broadcast", :ref:`bool `, "Set to ``true`` if ``next_state`` should be sent to all active players and observers (see :ref:`GameStateUpdatedRequest `)" "interruption_window_duration", :ref:`int32 `, "| Duration (in ms) for which the previous action can be interrupted by the players defined in ``interruption_player`` array. | If 0, the action is not interruptible" "interruption_player", :ref:`int32[] `, "Which players are authorized to interrupt the previous action" "pause_time", :ref:`int32 `, "Next player's clock will start after this delay (in seconds)" "idle_time", :ref:`int32 `, "| Set a duration in seconds to override the game configuration ``idle_time`` (for this action see :ref:`GameConfiguration `). | Set zero to use default timer if enabled in game configuration; this field has no impact if there is no game configuration ``idle_time`` defined." :ref:`Top ` .. _req-EngageGameWithFriendsRequest: .. _reference-message-com.daysofwonder.async.EngageGameWithFriendsRequest: .. _reference-field-com.daysofwonder.async.EngageGameWithFriendsRequest: EngageGameWithFriendsRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Start an invitation to a list of `friends`. In return a :ref:`GameCreatedRequest ` is sent back. More information can be found in :ref:`workflow-invitation` section. C -> S * request_number: 405 * field_name: engage_game_with_friends_request Possible Responses: * :ref:`GameCreatedRequest ` * :ref:`ErrorRequest `: INVITATION_DENIED (13) .. csv-table:: EngageGameWithFriendsRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "friends", :ref:`int32[] `, "| Friends global id (add ``0`` to invite robots). | Unless specified the server doesn't accept an empty list or a list with only robots" "configuration", :ref:`GameConfiguration `, "| Game configuration. | Note: not all settings in configuration are valid for an invitation game | (like for instance ``private`` or ``name``)" "user_data", :ref:`bytes `, "| This specific user data for this game. | This can be used to encode this player capabilities" "initial_state", :ref:`bytes `, "| In case you need to have an initial state | (`ie` game data) when the first player | has to play, fill this field" "initial_summary_data", :ref:`bytes `, "If you need to have an initial summary, for display purposes" :ref:`Top ` .. _req-EnterLobbyRequest: .. _reference-message-com.daysofwonder.async.EnterLobbyRequest: .. _reference-field-com.daysofwonder.async.EnterLobbyRequest: EnterLobbyRequest ^^^^^^^^^^^^^^^^^ Sent by the client when it wants to enter the lobby. This automatically subscribes the client to the following streams: * chat messages * player list updates * games offer updates More information can be found in :ref:`workflow-lobby-entering` section. C -> S * request_number: 600 * field_name: enter_lobby_request Possible Responses: * :ref:`LobbyEnteredRequest ` * :ref:`ErrorRequest `: PLAYER_ALREADY_IN_LOBBY (10) .. _req-ErrorRequest: .. _reference-message-com.daysofwonder.async.ErrorRequest: .. _reference-field-com.daysofwonder.async.ErrorRequest: ErrorRequest ^^^^^^^^^^^^ Sent in response to a client request that generated an error. S -> C * request_number: 505 * field_name: error_request .. csv-table:: ErrorRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "| System assigned game id. | Might be ``0`` for errors not pertaining to a game" "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" "turn_index", :ref:`int32 `, "The current turn index if in a game" "player_id", :ref:`int32 `, "The player who sent the original request when in a game" :ref:`Top ` .. _req-ExitLobbyRequest: .. _reference-message-com.daysofwonder.async.ExitLobbyRequest: .. _reference-field-com.daysofwonder.async.ExitLobbyRequest: ExitLobbyRequest ^^^^^^^^^^^^^^^^ Sent by the client when it wants to exit the lobby. This automatically unsubscribes the client from all the streams of lobby updates. More information can be found in :ref:`workflow-lobby-exiting` section. C -> S * request_number: 602 * field_name: exit_lobby_request Possible Responses: * :ref:`LobbyExitedRequest ` .. _req-GameAbortedConfirmationRequest: .. _reference-message-com.daysofwonder.async.GameAbortedConfirmationRequest: .. _reference-field-com.daysofwonder.async.GameAbortedConfirmationRequest: GameAbortedConfirmationRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by a client to validate it showed the abort to the players. Once all players sent this, the game will go from ``ABORTING`` state to ``ABORTED``. C -> S * request_number: 531 * field_name: game_aborted_confirmation_request In response to: * :ref:`GameAbortedRequest ` .. csv-table:: GameAbortedConfirmationRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" "player_id", :ref:`int32 `, "The local player id that confirms the game outcome" :ref:`Top ` .. _req-GameAbortedRequest: .. _reference-message-com.daysofwonder.async.GameAbortedRequest: .. _reference-field-com.daysofwonder.async.GameAbortedRequest: GameAbortedRequest ^^^^^^^^^^^^^^^^^^ Sent by the server if there's no player (all timed out, or all withdrawn) to keep the game alive. The server goes in ``ABORTING`` state, and players will all have to send :ref:`GameAbortedConfirmationRequest `. More information can be found in :ref:`workflow-abort` section. S -> C * request_number: 530 * field_name: game_aborted_request In response to: * :ref:`GameForfeitRequest ` * :ref:`LeaveSyncGameRequest ` * A player timed out, and no human active players left in the game Possible Responses: * :ref:`GameAbortedConfirmationRequest ` .. csv-table:: GameAbortedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" "aborting_player_ids", :ref:`int32[] `, "List of local player ids of the offenders" "ranking_update", :ref:`com.daysofwonder.PlayerRankingUpdate[] `, "This contains the ranking change for the players" "karma_update", :ref:`KarmaUpdate[] `, "Contains the increase/decrease of karma of a given player global id" "data", :ref:`bytes `, "Custom game data to be sent to other players" :ref:`Top ` .. _req-GameClock: .. _reference-message-com.daysofwonder.async.GameClock: .. _reference-field-com.daysofwonder.async.GameClock: GameClock ^^^^^^^^^ Represents a given in game player clock. .. csv-table:: GameClock :widths: 20 10 40 :header: "Field", "Type", "Description" "started_at", :ref:`int64 `, "When the player first turn started (in milliseconds since unix epoch)" "last_started_at", :ref:`int64 `, "When this player clocks started last (in milliseconds since unix epoch)" "remaining", :ref:`int64 `, "How many milliseconds this player has before the clock exhausts" "duration", :ref:`int64 `, "How many milliseconds players are allowed to play for a full game" "armed", :ref:`bool `, "Is the clock ticking?" "timestamp", :ref:`int64 `, "Timestamp of the message in number of milliseconds since the Unix epoch" "paused", :ref:`bool `, "True when this clock has been paused" :ref:`Top ` .. _req-GameConfiguration: .. _reference-message-com.daysofwonder.async.GameConfiguration: .. _reference-field-com.daysofwonder.async.GameConfiguration: GameConfiguration ^^^^^^^^^^^^^^^^^ Represents a given game configuration. .. csv-table:: GameConfiguration :widths: 20 10 40 :header: "Field", "Type", "Description" "name", :ref:`string `, "Valid only for lobby games" "private", :ref:`bool `, "Private games must have a password filled - valid only for lobby games" "lurkable", :ref:`bool `, "| Is this game observable? Who can observe this game | is defined in the ``observable_by`` field" "rated", :ref:`bool `, "Ranked game or not" "min_players", :ref:`int32 `, "| Minimum number of players for this game. | It's best to put ``min`` and ``max`` at the same value | Valid only for lobby games" "max_players", :ref:`int32 `, "| Maximum number of players for this game. | It's best to put ``min`` and ``max`` at the same value | Valid only for lobby games" "min_karma", :ref:`int32 `, "Minimum karma to be able to join this game" "first_player", :ref:`int32 `, "| This will contain the human player seat number 1-based robot excluded. | If 0, that means choose randomly" "game_mode", :ref:`GameConfiguration.GameMode `, "| Type of game. | Note: for invitation game, this mode is ignored | as the game will default to ``ASYNCHRONOUS``" "timeout", :ref:`int32 `, "The player timer (in seconds)" "data", :ref:`bytes `, "| Specific game data | (to support options specific to a given game, like `SW` auto-redeploy)" "require_first_user_data_round", :ref:`bool `, "| If ``true``, this game type requires that the server initiates a first round where all players | have to send their own user-data; aka a first simultaneous turn | and the merger will be the ``first_player``." "observable_by", :ref:`GameConfiguration.Observers `, "Who is allowed to observe this game" "min_rankscore", :ref:`int32 `, "Minimum of rank score to be able to join this game" "main_variant", :ref:`string `, "| Contains the main variant of this game for computing ranking, you can pass an empty string if you want (if you have no variant). | Please note that the underscore ('_') character is not allowed in variant names. If variant contains this character, it will be treated as the overall variant" "extra_ranking_variants", :ref:`string[] `, "| Contains the extra variants for computing additional rankings. | Even if there are some entries here, | we'll still compute the default variant ranking (`ie` 'TT' or 'SW'). | This field is optional for games without any variant. | Please note that the underscore ('_') character is not allowed in variant names. If a variant contains this character, it will be treated as the overall variant" "rules_engine_version", :ref:`int32 `, "| Rules engine version, used to manage multiple versions of the game client. | The server does not enforce version checks: it is the responsibility of the client to | ensure it supports this given version before allowing the player to join this game" "idle_time", :ref:`int32 `, "| Set a duration in seconds for which the player is allowed to play her turn before being replaced by a robot (for this action). | Set zero to disable this timer, in which case only the player clock will be used." :ref:`Top ` .. _req-GameCreatedRequest: .. _reference-message-com.daysofwonder.async.GameCreatedRequest: .. _reference-field-com.daysofwonder.async.GameCreatedRequest: GameCreatedRequest ^^^^^^^^^^^^^^^^^^ Confirmation that a game has been created. If the game is an invitation, all clients need to accept or decline it by sending an :ref:`AnswerInvitationRequest `. An invitation game can be detected by having ``invited_by`` containing the ``local_id`` of the inviter (usually first entry of the players list). Note also that you can access the game configuration through the details field. More information can be found in :ref:`workflow-lobby-starting` section. S -> C * request_number: 404 * field_name: game_created_request In response to: * :ref:`EngageGameWithFriendsRequest ` * :ref:`LobbyJoinGameRequest `: when last player joins * :ref:`LobbyStartGameRequest `: early start .. csv-table:: GameCreatedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "local_player_id", :ref:`int32 `, "Your local player id" "invited_by", :ref:`int32 `, "| This will the local id if the game resulted from an invitation from this player. | This will be 0 if the game is a lobby game" "details", :ref:`GameDetails `, "Full details about this created game" :ref:`Top ` .. _req-GameDetails: .. _reference-message-com.daysofwonder.async.GameDetails: .. _reference-field-com.daysofwonder.async.GameDetails: GameDetails ^^^^^^^^^^^ Represents a given ``Game``. .. csv-table:: GameDetails :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "The game reference" "players", :ref:`com.daysofwonder.Player[] `, "Players in the game" "configuration", :ref:`GameConfiguration `, "Original game configuration" "user_data", :ref:`PlayerPregameData[] `, "Contains all the players user data sent in :ref:`LobbyJoinGameRequest ` or :ref:`LobbyCreateGameRequest `" :ref:`Top ` .. _req-GameForfeitRequest: .. _reference-message-com.daysofwonder.async.GameForfeitRequest: .. _reference-field-com.daysofwonder.async.GameForfeitRequest: GameForfeitRequest ^^^^^^^^^^^^^^^^^^ Sent by the player when she wants to withdraw definitely from the current game. This might abort the whole game if all players have timed out, forfeited or left, in which case the clients will receive a :ref:`GameAbortedRequest ` after receiving a :ref:`GameForfeitedRequest `. More information can be found in :ref:`workflow-forfeit` section. C -> S * request_number: 513 * field_name: game_forfeit_request Possible Responses: * :ref:`GameForfeitedRequest ` * :ref:`ErrorRequest `: UNKNOWN_GAME (3) * :ref:`ErrorRequest `: NOT_YOUR_INVITATION (11) .. csv-table:: GameForfeitRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" :ref:`Top ` .. _req-GameForfeitedRequest: .. _reference-message-com.daysofwonder.async.GameForfeitedRequest: .. _reference-field-com.daysofwonder.async.GameForfeitedRequest: GameForfeitedRequest ^^^^^^^^^^^^^^^^^^^^ Sent by the server upon reception of a :ref:`GameForfeitRequest ` to all the connected players, or if all players in a game have timed out. More information can be found in :ref:`workflow-forfeit` section. S -> C * request_number: 514 * field_name: game_forfeited_request In response to: * :ref:`GameForfeitRequest ` .. csv-table:: GameForfeitedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" "player_id", :ref:`int32 `, "The player that forfeited or aborted the game" "aborted", :ref:`bool `, "``true`` if the game is fully aborted, ``false`` if the player forfeited" :ref:`Top ` .. _req-GameList: .. _reference-message-com.daysofwonder.async.GameList: .. _reference-field-com.daysofwonder.async.GameList: GameList ^^^^^^^^ List of Games, as used in the :ref:`LobbyGameListRequest ` and :ref:`ObservableGameListRequest `. .. csv-table:: GameList :widths: 20 10 40 :header: "Field", "Type", "Description" "games", :ref:`GameDetails[] `, "List of games" :ref:`Top ` .. _req-GameNotification: .. _reference-message-com.daysofwonder.async.GameNotification: .. _reference-field-com.daysofwonder.async.GameNotification: GameNotification ^^^^^^^^^^^^^^^^ This is the message that will be sent to the async players (`ie` players not connected to the server) as the ``payload`` parameter of the push notification when something happens in the game. Note: the ``actionKey``, ``localizedKey`` and ``localized`` arguments of a notification are configured in the server configuration file. .. csv-table:: GameNotification :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "The ID of the game this notification was sent for" "event", :ref:`GameNotification.Event `, "Type of notification" "turn_index", :ref:`int32 `, "The current turn index if in a game" "recipientDowId", :ref:`int32 `, "Global player id of the recipient (to discard misplaced notifications)" :ref:`Top ` .. _req-GameObservedRequest: .. _reference-message-com.daysofwonder.async.GameObservedRequest: .. _reference-field-com.daysofwonder.async.GameObservedRequest: GameObservedRequest ^^^^^^^^^^^^^^^^^^^ Sent by the server after receiving a :ref:`StartObserveGameRequest ` or a :ref:`StopObserveGameRequest `. More information can be found in :ref:`workflow-lobby-observing` or :ref:`workflow-game-observing` section. S -> C * request_number: 652 * field_name: game_observed_request In response to: * :ref:`StartObserveGameRequest ` * :ref:`StopObserveGameRequest ` .. csv-table:: GameObservedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "The game to observe / stop observing" "status", :ref:`GameObservedRequest.Status `, "| If OK, the observe starts (or stops), | otherwise it fails with this status" "game_status", :ref:`StatusReport `, "| The latest known game status, | this contains all the information about this game. | This is valid only if ``status == OK``" :ref:`Top ` .. _req-GameOutcomeConfirmationRequest: .. _reference-message-com.daysofwonder.async.GameOutcomeConfirmationRequest: .. _reference-field-com.daysofwonder.async.GameOutcomeConfirmationRequest: GameOutcomeConfirmationRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by a client to validate it displayed the outcome to the player. More information can be found in :ref:`workflow-game-over` section. C -> S * request_number: 522 * field_name: game_outcome_confirmation_request In response to: * :ref:`GameOutcomeRequest ` .. csv-table:: GameOutcomeConfirmationRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" "player_id", :ref:`int32 `, "The local player id that confirms the game outcome" :ref:`Top ` .. _req-GameOutcomeRequest: .. _reference-message-com.daysofwonder.async.GameOutcomeRequest: .. _reference-field-com.daysofwonder.async.GameOutcomeRequest: GameOutcomeRequest ^^^^^^^^^^^^^^^^^^ Sent by the server to all present players after receiving a :ref:`GameOverRequest `. It allows the client to display ranking updates, achievements earned, final scores. Non present players can get access to the same information in the game status report from a :ref:`WhatsNewPussycatRequest `. More information can be found in :ref:`workflow-game-over` section. S -> C * request_number: 508 * field_name: game_outcome_request In response to: * :ref:`GameOverRequest ` Possible Responses: * :ref:`GameOutcomeConfirmationRequest ` .. csv-table:: GameOutcomeRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" "ranking_update", :ref:`com.daysofwonder.PlayerRankingUpdate[] `, "| This contains the ranking change for the players, | note there can be more than one entry per player | if you submitted more than one variant in the :ref:`GameOverRequest `" "achievements_awarded", :ref:`com.daysofwonder.PlayerAchievementUpdate[] `, "This contains the list of awarded achievements per player" "karma_update", :ref:`KarmaUpdate[] `, "Contains the increase/decrease in karma of a given player global id" "data", :ref:`bytes `, "Custom game data to be sent to other players" :ref:`Top ` .. _req-GameOverRequest: .. _reference-message-com.daysofwonder.async.GameOverRequest: .. _reference-field-com.daysofwonder.async.GameOverRequest: GameOverRequest ^^^^^^^^^^^^^^^ Sent by the last playing player to the server with the game results to signal that the game is over. The game will then be in state ``Outcome`` and send back :ref:`GameOutcomeRequest `. Upon a timeout or reception of :ref:`GameOutcomeConfirmationRequest ` of all players, then the game will be in ``GameOver`` state and won't be reported to :ref:`WhatsNewPussycatRequest ` anymore. More information can be found in :ref:`workflow-game-over` section. C -> S * request_number: 507 * field_name: game_over_request Possible Responses: * :ref:`GameOutcomeRequest ` * :ref:`ErrorRequest `: UNKNOWN_GAME (3) .. csv-table:: GameOverRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" "achievements_awarded", :ref:`com.daysofwonder.PlayerAchievementUpdate[] `, "This contains the list of awarded achievements per player" "data", :ref:`bytes `, "Custom game data to be sent to other players" "finalScores", :ref:`com.daysofwonder.FinalScore[] `, "| Winners. | This field is mandatory for all players" "is_ranked", :ref:`bool `, "| Is that game ranked finally? | This member is deprecated: please use ``GameConfiguration.rated`` instead" "variants", :ref:`string[] `, "| Contains the extra variants | for computing additional rankings, even if there are some entries here, | we'll still compute the default variant ranking (`ie` 'TT' or 'SW'). | You can still pass it as an empty string if you want. | This member is deprecated, please provide variants directly in GameConfiguration" :ref:`Top ` .. _req-GameStateUpdatedRequest: .. _reference-message-com.daysofwonder.async.GameStateUpdatedRequest: .. _reference-field-com.daysofwonder.async.GameStateUpdatedRequest: GameStateUpdatedRequest ^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server when it receives a :ref:`CommitActionRequest ` from a player when the broadcast parameter is set to ``true``. It is sent to all the present players and observers. S -> C * request_number: 568 * field_name: game_state_updated_request In response to: * :ref:`CommitActionRequest ` .. csv-table:: GameStateUpdatedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "| System assigned game id" "player_id", :ref:`int32 `, "| Local player id of the acting player. | In case of a robot hosted on a different | player device, this should be the robot | impersonating local player id" "turn_index", :ref:`int32 `, "| Monotonically incremented turn index after each round by the server, this should allow | the client to know which request it should act on. | It has the same value as provided in last :ref:`CommitActionRequest `, if correct" "state", :ref:`bytes `, "Current state of the game after last action" "interruption_window_duration", :ref:`int32 `, "Define interruption window time frame (ms) of the interruptible turn for the previous action" "interruption_player", :ref:`int32[] `, "Which players are authorized to interrupt the previous action" "clock", :ref:`StatusReport.PlayerClock[] `, "List of all player clocks" :ref:`Top ` .. _req-GameStatusReportRequest: .. _reference-message-com.daysofwonder.async.GameStatusReportRequest: .. _reference-field-com.daysofwonder.async.GameStatusReportRequest: GameStatusReportRequest ^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server in response to a :ref:`WhatsNewPussycatRequest ` More information can be found in :ref:`workflow-whatsnew` section. S -> C * request_number: 512 * field_name: game_status_report_request In response to: * :ref:`WhatsNewPussycatRequest ` .. csv-table:: GameStatusReportRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "reports", :ref:`StatusReport[] `, "All the game statuses" :ref:`Top ` .. _req-GameUserDataUpdatedRequest: .. _reference-message-com.daysofwonder.async.GameUserDataUpdatedRequest: .. _reference-field-com.daysofwonder.async.GameUserDataUpdatedRequest: GameUserDataUpdatedRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server when it receives an :ref:`UpdateUserDataRequest ` from a player when the broadcast parameter is set to ``true``. It is sent to all the present players and observers. More information can be found in :ref:`workflow-simultaneous` section. S -> C * request_number: 569 * field_name: game_user_data_updated_request In response to: * :ref:`UpdateUserDataRequest ` .. csv-table:: GameUserDataUpdatedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "| System assigned game id" "player_id", :ref:`int32 `, "| Local player id of the acting player. | In case of a robot hosted on a different | player device, this should be the robot | impersonating local player id" "turn_index", :ref:`int32 `, "| Monotonically incremented turn index after each round by the server, this should allow | the client to know which request it should act on. | It has the same value as provided in last :ref:`CommitActionRequest `, if correct" "user_data", :ref:`PlayerPregameData[] `, "| Current user data if in simultaneous turn" :ref:`Top ` .. _req-GetChatHistoryRequest: .. _reference-message-com.daysofwonder.async.GetChatHistoryRequest: .. _reference-field-com.daysofwonder.async.GetChatHistoryRequest: GetChatHistoryRequest ^^^^^^^^^^^^^^^^^^^^^ 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:`ClientChatHistoryRequest ` .. csv-table:: GetChatHistoryRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id (set ``0`` or leave empty to get the lobby's messages history)" :ref:`Top ` .. _req-GetClocksRequest: .. _reference-message-com.daysofwonder.async.GetClocksRequest: .. _reference-field-com.daysofwonder.async.GetClocksRequest: GetClocksRequest ^^^^^^^^^^^^^^^^ Sent by the client when one client wants to get the values of the player clocks. More information can be found in :ref:`workflow-player-clock` section. C -> S * request_number: 546 * field_name: get_clocks_request Possible Responses: * :ref:`ClocksStatusRequest ` * :ref:`ErrorRequest `: UNKNOWN_GAME (3) .. csv-table:: GetClocksRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "Game id to retrieve clocks from" :ref:`Top ` .. _req-InterruptActionErrorRequest: .. _reference-message-com.daysofwonder.async.InterruptActionErrorRequest: .. _reference-field-com.daysofwonder.async.InterruptActionErrorRequest: InterruptActionErrorRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server when an error occurred during the interruption. S -> C * request_number: 573 * field_name: interrupt_action_error_request In response to: * :ref:`InterruptActionRequest ` .. csv-table:: InterruptActionErrorRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "The game in which this interruption has failed" "error_code", :ref:`InterruptActionErrorRequest.Error `, "The error type" :ref:`Top ` .. _req-InterruptActionRequest: .. _reference-message-com.daysofwonder.async.InterruptActionRequest: .. _reference-field-com.daysofwonder.async.InterruptActionRequest: InterruptActionRequest ^^^^^^^^^^^^^^^^^^^^^^ Sent by the client during interrupted turn. More information can be found in :ref:`workflow-interruption` section. C -> S * request_number: 570 * field_name: interrupt_action_request Possible Responses: * :ref:`ActionInterruptedRequest ` * :ref:`InterruptActionErrorRequest ` .. csv-table:: InterruptActionRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "| System assigned game id" "player_id", :ref:`int32 `, "| Local id of the player interrupting the action" "turn_index", :ref:`int32 `, "| Turn index, as provided by :ref:`ActionCommitedRequest `" "interruption_data", :ref:`bytes `, "| Interruption is done with this data. It will be relayed by :ref:`ActionInterruptedRequest `, and when asking to merge with an :ref:`ActionRequiredRequest `" "no_more_interruption", :ref:`bool `, "| If ``true``, the server will stop the interruption phase after receiving this interruption. | If ``false``, it will continue until ``interruption_window_duration`` (cf :ref:`CommitActionRequest `)" :ref:`Top ` .. _req-InterruptionOverRequest: .. _reference-message-com.daysofwonder.async.InterruptionOverRequest: .. _reference-field-com.daysofwonder.async.InterruptionOverRequest: InterruptionOverRequest ^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server to inform the end of the interruption period for this turn. More information can be found in :ref:`workflow-interruption` section. S -> C * request_number: 572 * field_name: interruption_over_request .. csv-table:: InterruptionOverRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "The game id where this event happened" "turn_index", :ref:`int32 `, "The turn index at which the interruption turn ends" :ref:`Top ` .. _req-InvitationAnsweredRequest: .. _reference-message-com.daysofwonder.async.InvitationAnsweredRequest: .. _reference-field-com.daysofwonder.async.InvitationAnsweredRequest: InvitationAnsweredRequest ^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server to all participants in the invitation each time one of the players sends an :ref:`AnswerInvitationRequest `. More information can be found in :ref:`workflow-invitation` section. S -> C * request_number: 541 * field_name: invitation_answered_request In response to: * :ref:`AnswerInvitationRequest ` .. csv-table:: InvitationAnsweredRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "Game id of the accepted/declined invitation" "accept", :ref:`bool `, "``true`` means invitee accepted the invitation, ``false`` otherwise" "invitee", :ref:`com.daysofwonder.Player `, "Player that accepted or refused this invitation" :ref:`Top ` .. _req-InvitationDetails: .. _reference-message-com.daysofwonder.async.InvitationDetails: .. _reference-field-com.daysofwonder.async.InvitationDetails: InvitationDetails ^^^^^^^^^^^^^^^^^ Information about an invitation. .. csv-table:: InvitationDetails :widths: 20 10 40 :header: "Field", "Type", "Description" "invited_by", :ref:`int32 `, "Player local id of the inviter (in the list of the players of the game)" "confirmation", :ref:`InvitationDetails.Confirmation[] `, "| List of players that accepted (or declined) the invitation. | A player not listed means that she didn't yet confirm or decline" "timeout", :ref:`int64 `, "| How long this invitation is valid for (in seconds). | Add this to ``game_started_at`` to know if it's expired or not" :ref:`Top ` .. _req-InvitationDetails.Confirmation: .. _reference-message-com.daysofwonder.async.InvitationDetails.Confirmation: .. _reference-field-com.daysofwonder.async.InvitationDetails.Confirmation: InvitationDetails.Confirmation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. csv-table:: InvitationDetails.Confirmation :widths: 20 10 40 :header: "Field", "Type", "Description" "player_id", :ref:`int32 `, "Local ID of the player who answered the invitation" "accepted", :ref:`bool `, "``true`` if the player accepted the invitation, ``false`` otherwise" :ref:`Top ` .. _req-KarmaUpdate: .. _reference-message-com.daysofwonder.async.KarmaUpdate: .. _reference-field-com.daysofwonder.async.KarmaUpdate: KarmaUpdate ^^^^^^^^^^^ Give the change in karma of a given ``player_id`` at the end of game. .. csv-table:: KarmaUpdate :widths: 20 10 40 :header: "Field", "Type", "Description" "player_id", :ref:`int32 `, "Global ID of the player whose karma has been updated" "old_karma", :ref:`int32 `, "The previous value of the karma" "new_karma", :ref:`int32 `, "The current value of the karma, according to game outcome and player behavior during the game" :ref:`Top ` .. _req-LeaveSyncGameRequest: .. _reference-message-com.daysofwonder.async.LeaveSyncGameRequest: .. _reference-field-com.daysofwonder.async.LeaveSyncGameRequest: LeaveSyncGameRequest ^^^^^^^^^^^^^^^^^^^^ Sent by the client to leave a synchronous game. This will allow the server to schedule a robot for this player. In response the server will broadcast a :ref:`PlayerReplacedRequest `. C -> S * request_number: 538 * field_name: leave_sync_game_request Possible Responses: * :ref:`PlayerReplacedRequest ` * :ref:`ErrorRequest `: UNKNOWN_GAME (3) .. csv-table:: LeaveSyncGameRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "The game where this event happened" :ref:`Top ` .. _req-LobbyCreateGameRequest: .. _reference-message-com.daysofwonder.async.LobbyCreateGameRequest: .. _reference-field-com.daysofwonder.async.LobbyCreateGameRequest: LobbyCreateGameRequest ^^^^^^^^^^^^^^^^^^^^^^ Create an open game in the lobby for other players to join. The player must be in the lobby first. Note: this request might fail if the player has too many games in progress, in which case the server will return an :ref:`ErrorRequest ` with error ``TOO_MANY_OFFERS``. More information can be found in :ref:`workflow-lobby-create` section. C -> S * request_number: 607 * field_name: lobby_create_game_request Possible Responses: * :ref:`LobbyGameCreatedRequest ` * :ref:`ErrorRequest `: TOO_MANY_OFFERS (5) .. csv-table:: LobbyCreateGameRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "configuration", :ref:`GameConfiguration `, "| Game configuration where to specify | number of players, private data, etc..." "password", :ref:`string `, "| Optional password to be used only when the game is private. | A blank password is considered as 'no password'" "user_data", :ref:`bytes `, "| This specific user data for this game. | This can be used to encode this player capabilities" "initial_state", :ref:`bytes `, "| In case you need to have an initial state (`ie` game data) when the first player | has to play, fill this field" "initial_summary_data", :ref:`bytes `, "If you need to have an initial summary, for display purposes" :ref:`Top ` .. _req-LobbyEnteredRequest: .. _reference-message-com.daysofwonder.async.LobbyEnteredRequest: .. _reference-field-com.daysofwonder.async.LobbyEnteredRequest: LobbyEnteredRequest ^^^^^^^^^^^^^^^^^^^ Sent by the server to confirm that the client entered the lobby in response to :ref:`EnterLobbyRequest `. More information can be found in :ref:`workflow-lobby-entering` section. S -> C * request_number: 601 * field_name: lobby_entered_request In response to: * :ref:`EnterLobbyRequest ` .. _req-LobbyExitedRequest: .. _reference-message-com.daysofwonder.async.LobbyExitedRequest: .. _reference-field-com.daysofwonder.async.LobbyExitedRequest: LobbyExitedRequest ^^^^^^^^^^^^^^^^^^ Sent by the server to confirm that the client has exited the lobby. More information can be found in :ref:`workflow-lobby-exiting` section. S -> C * request_number: 603 * field_name: lobby_exited_request In response to: * :ref:`ExitLobbyRequest ` .. _req-LobbyGameCreatedRequest: .. _reference-message-com.daysofwonder.async.LobbyGameCreatedRequest: .. _reference-field-com.daysofwonder.async.LobbyGameCreatedRequest: LobbyGameCreatedRequest ^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server after receiving a :ref:`LobbyCreateGameRequest ` for confirmation that the operation succeeded. More information can be found in :ref:`workflow-lobby-create` section. S -> C * request_number: 608 * field_name: lobby_game_created_request In response to: * :ref:`LobbyCreateGameRequest ` .. csv-table:: LobbyGameCreatedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game", :ref:`GameDetails `, "All the information about the given created game" :ref:`Top ` .. _req-LobbyGameListRequest: .. _reference-message-com.daysofwonder.async.LobbyGameListRequest: .. _reference-field-com.daysofwonder.async.LobbyGameListRequest: LobbyGameListRequest ^^^^^^^^^^^^^^^^^^^^ Sent by the server from time to time to send the currently open game list. More information can be found in :ref:`workflow-lobby-game-list` section. S -> C * request_number: 609 * field_name: lobby_game_list_request .. csv-table:: LobbyGameListRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_list", :ref:`bytes `, "| This is a 'Deflate' compressed version of the :ref:`GameList ` message, | check `zlib` for a native deflate implementation" :ref:`Top ` .. _req-LobbyJoinDeniedRequest: .. _reference-message-com.daysofwonder.async.LobbyJoinDeniedRequest: .. _reference-field-com.daysofwonder.async.LobbyJoinDeniedRequest: LobbyJoinDeniedRequest ^^^^^^^^^^^^^^^^^^^^^^ Sent to the joining player if the server denies the join. More information can be found in :ref:`workflow-lobby-join` section. S -> C * request_number: 612 * field_name: lobby_join_denied_request In response to: * :ref:`LobbyJoinGameRequest ` .. csv-table:: LobbyJoinDeniedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "Game to join" "cause", :ref:`LobbyJoinDeniedRequest.JoinError `, "Cause of the denial" :ref:`Top ` .. _req-LobbyJoinGameRequest: .. _reference-message-com.daysofwonder.async.LobbyJoinGameRequest: .. _reference-field-com.daysofwonder.async.LobbyJoinGameRequest: LobbyJoinGameRequest ^^^^^^^^^^^^^^^^^^^^ Join an open game in the lobby. The player must be in the lobby first. This request can return a :ref:`LobbyJoinDeniedRequest ` if joining is denied for instance if: * player hasn't enough `Karma` * `game` is full * player gave an incorrect private game `password` * player is in the game creator `ignore list` * player hasn't enough `rank score` More information can be found in :ref:`workflow-lobby-join` section. C -> S * request_number: 610 * field_name: lobby_join_game_request Possible Responses: * :ref:`LobbyNewPlayerRequest ` * :ref:`LobbyJoinDeniedRequest ` * :ref:`ErrorRequest `: UNKNOWN_GAME (3) .. csv-table:: LobbyJoinGameRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "Game to join" "password", :ref:`string `, "Optional password to be used only when the game is private" "user_data", :ref:`bytes `, "This specific user data for this game. This can be used to encode this player capabilities" :ref:`Top ` .. _req-LobbyLeaveGameRequest: .. _reference-message-com.daysofwonder.async.LobbyLeaveGameRequest: .. _reference-field-com.daysofwonder.async.LobbyLeaveGameRequest: LobbyLeaveGameRequest ^^^^^^^^^^^^^^^^^^^^^ Sent by the client to leave a waiting open game. More information can be found in :ref:`workflow-lobby-leaving` section. C -> S * request_number: 613 * field_name: lobby_leave_game_request Possible Responses: * :ref:`LobbyPlayerLeftGameRequest ` * :ref:`ErrorRequest `: UNKNOWN_GAME (3) .. csv-table:: LobbyLeaveGameRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "Game to leave" :ref:`Top ` .. _req-LobbyNewPlayerRequest: .. _reference-message-com.daysofwonder.async.LobbyNewPlayerRequest: .. _reference-field-com.daysofwonder.async.LobbyNewPlayerRequest: LobbyNewPlayerRequest ^^^^^^^^^^^^^^^^^^^^^ Sent to all the players present in the game (and the joining player) when a player joins a given game and she succeeds. More information can be found in :ref:`workflow-lobby-join` section. S -> C * request_number: 611 * field_name: lobby_new_player_request In response to: * :ref:`LobbyJoinGameRequest ` .. csv-table:: LobbyNewPlayerRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game", :ref:`GameDetails `, "Joined game (includes all the players)" "joining_player", :ref:`int32 `, "Unique global id of the player that just joined the game (it should normally be always the last player of ``game.players``)" :ref:`Top ` .. _req-LobbyPlayerInfoRequest: .. _reference-message-com.daysofwonder.async.LobbyPlayerInfoRequest: .. _reference-field-com.daysofwonder.async.LobbyPlayerInfoRequest: LobbyPlayerInfoRequest ^^^^^^^^^^^^^^^^^^^^^^ Sent by the server in response of the :ref:`AskPlayerInfoRequest ` when in the lobby. It contains the full details of a given player. More information can be found in :ref:`workflow-lobby-ask` section. S -> C * request_number: 606 * field_name: lobby_player_info_request In response to: * :ref:`AskPlayerInfoRequest ` .. csv-table:: LobbyPlayerInfoRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "player", :ref:`com.daysofwonder.Player `, "| The player information asked from :ref:`AskPlayerInfoRequest ` in the lobby. | This field can be omitted if the given player is not in the lobby" :ref:`Top ` .. _req-LobbyPlayerLeftGameRequest: .. _reference-message-com.daysofwonder.async.LobbyPlayerLeftGameRequest: .. _reference-field-com.daysofwonder.async.LobbyPlayerLeftGameRequest: LobbyPlayerLeftGameRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server in response to the :ref:`LobbyLeaveGameRequest ` to all the players in the game and the leaving player. More information can be found in :ref:`workflow-lobby-leaving` section. S -> C * request_number: 614 * field_name: lobby_player_left_game_request In response to: * :ref:`LobbyLeaveGameRequest ` .. csv-table:: LobbyPlayerLeftGameRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game", :ref:`GameDetails `, "Game the player just left" "leaving_player", :ref:`com.daysofwonder.Player `, "Leaving player" :ref:`Top ` .. _req-LobbyPlayerListRequest: .. _reference-message-com.daysofwonder.async.LobbyPlayerListRequest: .. _reference-field-com.daysofwonder.async.LobbyPlayerListRequest: LobbyPlayerListRequest ^^^^^^^^^^^^^^^^^^^^^^ Sent by the server from time to time to send the whole list of Players in the lobby. Note that the ``player_list`` field is a byte array resulting of the compression of the ``PlayerList`` message. More information can be found in :ref:`workflow-lobby-player-list` section. S -> C * request_number: 604 * field_name: lobby_player_list_request .. csv-table:: LobbyPlayerListRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "player_list", :ref:`bytes `, "| This is a 'Deflate' compressed version of the :ref:`LobbyPlayerListRequest.PlayerList ` message, | check `zlib` for a native deflate implementation" :ref:`Top ` .. _req-LobbyPlayerListRequest.PlayerList: .. _reference-message-com.daysofwonder.async.LobbyPlayerListRequest.PlayerList: .. _reference-field-com.daysofwonder.async.LobbyPlayerListRequest.PlayerList: LobbyPlayerListRequest.PlayerList ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ List of players .. csv-table:: LobbyPlayerListRequest.PlayerList :widths: 20 10 40 :header: "Field", "Type", "Description" "players", :ref:`SmallPlayer[] `, "Simplified players" :ref:`Top ` .. _req-LobbyStartGameDeniedRequest: .. _reference-message-com.daysofwonder.async.LobbyStartGameDeniedRequest: .. _reference-field-com.daysofwonder.async.LobbyStartGameDeniedRequest: LobbyStartGameDeniedRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent to the player if the server denies the start of the game. More information can be found in :ref:`workflow-lobby-starting` section. S -> C * request_number: 616 * field_name: lobby_start_game_denied_request In response to: * :ref:`LobbyStartGameRequest ` .. csv-table:: LobbyStartGameDeniedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "Game to start" "cause", :ref:`LobbyStartGameDeniedRequest.StartError `, "Cause of the denial" :ref:`Top ` .. _req-LobbyStartGameRequest: .. _reference-message-com.daysofwonder.async.LobbyStartGameRequest: .. _reference-field-com.daysofwonder.async.LobbyStartGameRequest: LobbyStartGameRequest ^^^^^^^^^^^^^^^^^^^^^ Sent by the client to start early a game irrespective of the ``GameConfiguration.max_players`` (this means that one can start a lobby game before this one is complete). Only the game creator can start the game. It is not possible to start a game containing only the creator. This request can return a :ref:`LobbyStartGameDeniedRequest ` if starting is denied for instance if: * not enough player * game is unknown * another player tries to start the game instead of creator More information can be found in :ref:`workflow-lobby-starting` section. C -> S * request_number: 615 * field_name: lobby_start_game_request Possible Responses: * :ref:`LobbyStartGameDeniedRequest ` .. csv-table:: LobbyStartGameRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "Game to start" "fillWithRobots", :ref:`bool `, "Fill with robot, you can choose to add to the max the remaining spot with a robot" "data", :ref:`bytes `, "Override game configuration data (specify which bot level, color, ...)" :ref:`Top ` .. _req-MulticastChatRequest: .. _reference-message-com.daysofwonder.async.MulticastChatRequest: .. _reference-field-com.daysofwonder.async.MulticastChatRequest: MulticastChatRequest ^^^^^^^^^^^^^^^^^^^^ Sends a chat to the server, the server will then multicast the text to the other players in the given game. If no ``game_id`` is given, then the chat message is sent to the lobby (provided the connected user entered the lobby). 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:`ClientChatRequest ` * :ref:`ClientChatBlockedRequest ` * :ref:`ErrorRequest `: UNKNOWN_GAME (3) .. csv-table:: MulticastChatRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id (do not fill to send to the lobby)" "text", :ref:`string `, "Text chat" "recipient_ids", :ref:`int32[] `, "| List of local player ids that will receive the data for non empty ``game_id``. | List of global player ids that will receive the data for empty ``game_id`` (`ie` lobby) | If empty, then the chat is broadcast to all the players 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-MulticastDataRequest: .. _reference-message-com.daysofwonder.async.MulticastDataRequest: .. _reference-field-com.daysofwonder.async.MulticastDataRequest: MulticastDataRequest ^^^^^^^^^^^^^^^^^^^^ A player can decide to send arbitrary data to a set or subset of the players in the same game. 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:`ErrorRequest `: UNKNOWN_GAME (3) .. csv-table:: MulticastDataRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" "data", :ref:`bytes `, "Any data that will be sent verbatim to the recipient_ids" "recipient_ids", :ref:`int32[] `, "List of local player ids that will receive the data" "present_players_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-ObservableGameListRequest: .. _reference-message-com.daysofwonder.async.ObservableGameListRequest: .. _reference-field-com.daysofwonder.async.ObservableGameListRequest: ObservableGameListRequest ^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server on a regular basis to client that subscribed to it. More information can be found in :ref:`workflow-lobby-observable-list` section. S -> C * request_number: 622 * field_name: observable_game_list_request .. csv-table:: ObservableGameListRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_list", :ref:`bytes `, "| This is a 'Deflate' compressed version of the :ref:`GameList ` message, | check `zlib` for a native deflate implementation" :ref:`Top ` .. _req-PlayerIdleProgressRequest: .. _reference-message-com.daysofwonder.async.PlayerIdleProgressRequest: .. _reference-field-com.daysofwonder.async.PlayerIdleProgressRequest: PlayerIdleProgressRequest ^^^^^^^^^^^^^^^^^^^^^^^^^ If an `idle timer` was set in game configuration, the server will send this request regularly to inform of the idle timer progress. S -> C * request_number: 509 * field_name: player_idle_progress_request .. csv-table:: PlayerIdleProgressRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" "player_ids", :ref:`int32[] `, "Local ids of players that should play and still made no action" "progress", :ref:`int32 `, "Percentage of the timer that has been consumed (between 0 and 100)" "initial", :ref:`int32 `, "Current idle timer configured from New game or CommitRequest" "remaining", :ref:`int32 `, "Approximate time remaining for this idle timer: initial * (100 - progress) / 100" :ref:`Top ` .. _req-PlayerInfoRequest: .. _reference-message-com.daysofwonder.async.PlayerInfoRequest: .. _reference-field-com.daysofwonder.async.PlayerInfoRequest: PlayerInfoRequest ^^^^^^^^^^^^^^^^^ Sent by the server in response of the :ref:`AskAnyPlayerInfoRequest ` when not in lobby. It contains the full details of a given player. S -> C * request_number: 631 * field_name: player_info_request In response to: * :ref:`AskAnyPlayerInfoRequest ` .. csv-table:: PlayerInfoRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "player", :ref:`com.daysofwonder.Player `, "The player information asked from :ref:`AskAnyPlayerInfoRequest ` outside of lobby" :ref:`Top ` .. _req-PlayerPregameData: .. _reference-message-com.daysofwonder.async.PlayerPregameData: .. _reference-field-com.daysofwonder.async.PlayerPregameData: PlayerPregameData ^^^^^^^^^^^^^^^^^ Contains specific opaque data per player (like capabilities) that can be sent when joining/starting a game or accepting an invitation. .. csv-table:: PlayerPregameData :widths: 20 10 40 :header: "Field", "Type", "Description" "player_id", :ref:`int32 `, "Global player id" "data", :ref:`bytes `, "This player opaque data" :ref:`Top ` .. _req-PlayerPresenceUpdateRequest: .. _reference-message-com.daysofwonder.async.PlayerPresenceUpdateRequest: .. _reference-field-com.daysofwonder.async.PlayerPresenceUpdateRequest: PlayerPresenceUpdateRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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:: PlayerPresenceUpdateRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" "present", :ref:`int32[] `, "Those players local-game-id are now present" "absent", :ref:`int32[] `, "Those players local-game-id are now absent" "in_game", :ref:`int32[] `, "| Valid when ``game_id`` is set, contains the set of players that declared being inside this ``game_id`` | by sending a :ref:`SwitchedToGameRequest `" :ref:`Top ` .. _req-PlayerReplacedRequest: .. _reference-message-com.daysofwonder.async.PlayerReplacedRequest: .. _reference-field-com.daysofwonder.async.PlayerReplacedRequest: PlayerReplacedRequest ^^^^^^^^^^^^^^^^^^^^^ Sent by the server when a player has been replaced by a robot, or when the player comes back (in `Synchronous` games). More information can be found in :ref:`workflow-game-hotswap` section. S -> C * request_number: 537 * field_name: player_replaced_request In response to: * :ref:`LeaveSyncGameRequest ` .. csv-table:: PlayerReplacedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "The game where this event happened" "player_id", :ref:`int32 `, "Local id of the player that has been replaced or replaces" "become_robot", :ref:`bool `, "``true`` when the player is replaced by a robot, ``false`` if the reverse" "status", :ref:`PlayerTimeoutRequest.PlayerStatus `, "| Does this player timed out or forfeited? | Valid only when ``become_robot`` is ``true``" :ref:`Top ` .. _req-PlayerTimeoutRequest: .. _reference-message-com.daysofwonder.async.PlayerTimeoutRequest: .. _reference-field-com.daysofwonder.async.PlayerTimeoutRequest: PlayerTimeoutRequest ^^^^^^^^^^^^^^^^^^^^ If the server never got a :ref:`CommitActionRequest ` from the `"active player"` in the required time, or this player forfeited, this message is sent to the next player in turn with the hope that it could ever implement a bot that could take this player's turn. More information can be found in :ref:`workflow-game-hotswap` section. S -> C * request_number: 504 * field_name: player_timeout_request Possible Responses: * :ref:`CommitActionRequest ` .. csv-table:: PlayerTimeoutRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" "state", :ref:`bytes `, "Last game state before timeout" "offender_id", :ref:`int32 `, "Local player id of the player that timed out" "players", :ref:`com.daysofwonder.Player[] `, "List of players (in no particular order) in this game" "next_player_ids", :ref:`int32[] `, "| List of the next player local ids in turn | (the receiving player will be the first one)" "status", :ref:`PlayerTimeoutRequest.PlayerStatus `, "Does this player timed out or forfeited?" "turn_index", :ref:`int32 `, "| Monotonically incremented turn index after each round by the server, this should allow | the client to know which request it should act on. | It has the same value as provided in last :ref:`CommitActionRequest `, if correct" "game_status", :ref:`GameStatus `, "Whether we're ``IN_PROGRESS`` or ``FIRST_USER_DATA_ROUND``" "user_data", :ref:`PlayerPregameData[] `, "| User-data sent during simultaneous turn: | in case the :ref:`ActionRequiredRequest ` merger did not respond, | a robot will have to perform the merge of all user data | in the latest state" "interruption_data", :ref:`PlayerPregameData[] `, "| Interruption-data sent during interruption turn, | in case the :ref:`ActionRequiredRequest ` merger did not respond, | a robot will have to perform the merge of all interruption data | in the latest state" :ref:`Top ` .. _req-RegisterPresenceRequest: .. _reference-message-com.daysofwonder.async.RegisterPresenceRequest: .. _reference-field-com.daysofwonder.async.RegisterPresenceRequest: RegisterPresenceRequest ^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client to monitor the presence of a set of players. Once sent and when subscribed to the presence system, the client will receive presence changes for those players. 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" "player_ids", :ref:`int32[] `, "List of global player ids to monitor presence of" :ref:`Top ` .. _req-ResumeSyncGameRequest: .. _reference-message-com.daysofwonder.async.ResumeSyncGameRequest: .. _reference-field-com.daysofwonder.async.ResumeSyncGameRequest: ResumeSyncGameRequest ^^^^^^^^^^^^^^^^^^^^^ Sent by the client to rejoin a left game. In response the server will broadcast a :ref:`PlayerReplacedRequest `. C -> S * request_number: 539 * field_name: resume_sync_game_request Possible Responses: * :ref:`PlayerReplacedRequest ` * :ref:`ErrorRequest `: UNKNOWN_GAME (3) .. csv-table:: ResumeSyncGameRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "The game where this event happened" :ref:`Top ` .. _req-ServerStatisticsRequest: .. _reference-message-com.daysofwonder.async.ServerStatisticsRequest: .. _reference-field-com.daysofwonder.async.ServerStatisticsRequest: ServerStatisticsRequest ^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server during statistics broadcast, or after an initial :ref:`AskServerStatisticsRequest ` More information can be found in :ref:`workflow-statistics` section. S -> C * request_number: 409 * field_name: server_statistics_request In response to: * :ref:`AskServerStatisticsRequest ` .. csv-table:: ServerStatisticsRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "hosted_games", :ref:`int32 `, "Total number of games running" "players", :ref:`int32 `, "Total number of players engaged into those games" "connected_players", :ref:`int32 `, "Total number of players currently connected" :ref:`Top ` .. _req-Session: .. _reference-message-com.daysofwonder.async.Session: .. _reference-field-com.daysofwonder.async.Session: Session ^^^^^^^ Documentation can be found in :ref:`concept-session` section. .. csv-table:: Session :widths: 20 10 40 :header: "Field", "Type", "Description" "id", :ref:`int64 `, "Server-assigned ID of a client session" :ref:`Top ` .. _req-SmallPlayer: .. _reference-message-com.daysofwonder.async.SmallPlayer: .. _reference-field-com.daysofwonder.async.SmallPlayer: SmallPlayer ^^^^^^^^^^^ This is a smaller player structure than the regular ``Game.Player``, this is used in the streaming of player lists. If you want more information about a player, use :ref:`AskPlayerInfoRequest `. .. csv-table:: SmallPlayer :widths: 20 10 40 :header: "Field", "Type", "Description" "w_w_w_id", :ref:`int32 `, "Unique global id" "name", :ref:`string `, "Player name" "karma", :ref:`int32 `, "Player current karma" "rank_score", :ref:`double `, "Player current rank score (ex: 1500.00)" "rank", :ref:`int32 `, "Player current rank (ex: #1)" "nb_games", :ref:`int32 `, "Number of games played" "language", :ref:`int32 `, "Language code of this player" "partner_user", :ref:`com.daysofwonder.PartnerUser `, "Player's partner information given at auth" "avatar", :ref:`com.daysofwonder.Avatar `, "Player avatar" :ref:`Top ` .. _req-StartObserveGameRequest: .. _reference-message-com.daysofwonder.async.StartObserveGameRequest: .. _reference-field-com.daysofwonder.async.StartObserveGameRequest: StartObserveGameRequest ^^^^^^^^^^^^^^^^^^^^^^^ Send this to observe a specific game. In return the server will send the :ref:`GameObservedRequest `, and if successful the stream of observed events as if the player was part of the game. To stop observing a game, send a :ref:`StopObserveGameRequest `. More information can be found in :ref:`workflow-lobby-observing` or :ref:`workflow-game-observing` section. C -> S * request_number: 650 * field_name: start_observe_game_request Possible Responses: * :ref:`GameObservedRequest `: OK (1) * :ref:`GameObservedRequest `: IN_GAME_ERROR (2) * :ref:`GameObservedRequest `: NO_SUCH_GAME_ERROR (3) * :ref:`GameObservedRequest `: FORBIDDEN_ERROR (4) * :ref:`GameObservedRequest `: GAME_NOT_STARTED (5) .. csv-table:: StartObserveGameRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "The game to observe" :ref:`Top ` .. _req-StatusReport: .. _reference-message-com.daysofwonder.async.StatusReport: .. _reference-field-com.daysofwonder.async.StatusReport: StatusReport ^^^^^^^^^^^^ Game full state. More information can be found in :ref:`workflow-whatsnew` section. .. csv-table:: StatusReport :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "ID of the game this report describes" "status", :ref:`GameStatus `, "Game status" "data", :ref:`bytes `, "Current data of the game as last committed" "turn_id", :ref:`int32 `, "| Local id of the player that must now play: 'whose turn it is'. | ``turn_id`` might refer to a player in the ``timed_out_players`` list, in which case another player might play for her (see ``active_player``). | The server has no preferences on the player that will play (anyone)" "next_player_ids", :ref:`int32[] `, "| The ordered list (in action order) of the next player ids | as sent by the last commit action message (the first one should be ``turn_id``)" "players", :ref:`com.daysofwonder.Player[] `, "List of players (in no particular order) in this game" "ranking_update", :ref:`com.daysofwonder.PlayerRankingUpdate[] `, "| This contains the ranking change for the players | if the game is over (for karma updates, see below)" "achievements_awarded", :ref:`com.daysofwonder.PlayerAchievementUpdate[] `, "| This contains the list of awarded achievements | per players if the game is over" "turn_timeout", :ref:`int32 `, "| A timeout for this turn - this is be the clamped value (in seconds) | sent during game creation" "start_turn_time", :ref:`int64 `, "| When the turn started for this player (in milliseconds unix timestamp). | This is in fact at which time we decided to send this message" "turn_index", :ref:`int32 `, "| Monotonically incremented turn index after each round by the server. | This should allow the client to know which request it should act on. | It has the same value as provided in last :ref:`CommitActionRequest `, if correct" "forfeiters", :ref:`int32[] `, "Local ids of the player that forfeited (`ie` withdrawn)" "timed_out_players", :ref:`int32[] `, "All those players that have timed out in" "configuration", :ref:`GameConfiguration `, "This game configuration" "clock", :ref:`StatusReport.PlayerClock[] `, "List of all player clocks" "active_player", :ref:`int32 `, "| The player we actually expect an action from. | Usually it is the same as ``turn_id``, but | this 'active player' is requested to play for her in case she has : | * timed out (and thus is in ``timed_out_players`` list) | * forfeited (and thus is in ``forfeiters`` list) | * left (and thus is in ``left_players`` list)" "left_players", :ref:`int32[] `, "| Local id of players that left a synchronous game | and that have been replaced by a robot" "user_data", :ref:`PlayerPregameData[] `, "| Optionally sent user pre-game data. Each chunk of data comes from the respective user ``LobbyCreateGame`` and ``LobbyJoinGame`` requests. | Note that this list might be filled only during the first turn of the game" "invitation", :ref:`InvitationDetails `, "Details about the invitation status. This is valid only when status is ``WAITING_INVITATION``" "game_created_at", :ref:`int64 `, "Milliseconds since epoch time at which this game was created" "player_user_data_updated", :ref:`int32[] `, "| List of the local player id of players that already updated their user data, | in case of a game that has ``require_first_user_data_round`` at ``true`` or SIMULTANEOUS turn" "summary_data", :ref:`bytes `, "| The last published summary data. This data should be kept small and should be a public summary | of the data field to be displayed in things like game lists or small game summaries | To publish a summary data, fill in the ``summary_data`` field in the :ref:`CommitActionRequest `" "outcome_not_seen", :ref:`int32[] `, "| List of the players that have not yet confirmed the outcome. The UI shouldn't | present this game if the player is not in this list" "karma_update", :ref:`KarmaUpdate[] `, "Contains the increase/decrease of karma of a given player global id" "interruption_window_duration", :ref:`int32 `, "Interruption window time frame (ms)" "interruption_player", :ref:`int32[] `, "Players authorized to do interruption action" "interruption_remaining_duration", :ref:`int32 `, "Estimated remaining duration time of the interruption window" "interruption_data", :ref:`PlayerPregameData[] `, "When in an interruption turn: data already sent by interrupting players" "player_user_data_required", :ref:`int32[] `, "| List of the local player id of players that are required to update their user data, | with all players in case of a game that has ``require_first_user_data_round`` at ``true`` | or this list is coming from CommitActionRequest.simultaneous_players when the simultaneous turn started." "idle_players", :ref:`int32[] `, "Local ids of the players that are considered idle (ie players that haven't yet sent their response after the idle timer expired)" :ref:`Top ` .. _req-StatusReport.PlayerClock: .. _reference-message-com.daysofwonder.async.StatusReport.PlayerClock: .. _reference-field-com.daysofwonder.async.StatusReport.PlayerClock: StatusReport.PlayerClock ^^^^^^^^^^^^^^^^^^^^^^^^ A given player clock. The ``player_id`` is the local player id .. csv-table:: StatusReport.PlayerClock :widths: 20 10 40 :header: "Field", "Type", "Description" "player_id", :ref:`int32 `, "Local id of the player" "clock", :ref:`GameClock `, "Clock status of the player" :ref:`Top ` .. _req-StopObserveGameRequest: .. _reference-message-com.daysofwonder.async.StopObserveGameRequest: .. _reference-field-com.daysofwonder.async.StopObserveGameRequest: StopObserveGameRequest ^^^^^^^^^^^^^^^^^^^^^^ Stop observing a game that the connected user was observing. This stops the stream of this game event. More information can be found in :ref:`workflow-lobby-observing` or :ref:`workflow-game-observing` section. C -> S * request_number: 651 * field_name: stop_observe_game_request Possible Responses: * :ref:`GameObservedRequest `: OK (1) * :ref:`GameObservedRequest `: NO_SUCH_GAME_ERROR (3) .. csv-table:: StopObserveGameRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "The game to observe" :ref:`Top ` .. _req-SubscribePresenceServiceRequest: .. _reference-message-com.daysofwonder.async.SubscribePresenceServiceRequest: .. _reference-field-com.daysofwonder.async.SubscribePresenceServiceRequest: SubscribePresenceServiceRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client to start monitoring the presence of players given by :ref:`RegisterPresenceRequest `. Once sent, the client will receive :ref:`AsyncBuddyPresencePartialUpdateRequest ` whenever the presence of one or more player changes. More information can be found in :ref:`workflow-presence` section. C -> S * request_number: 532 * field_name: subscribe_presence_service_request .. _req-SubscribeToObservableGameListRequest: .. _reference-message-com.daysofwonder.async.SubscribeToObservableGameListRequest: .. _reference-field-com.daysofwonder.async.SubscribeToObservableGameListRequest: SubscribeToObservableGameListRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client to start receiving the observable game list stream. More information can be found in :ref:`workflow-lobby-observable-list` section. C -> S * request_number: 620 * field_name: subscribe_to_observable_game_list_request Possible Responses: * :ref:`SubscribedToObservableGameListRequest ` .. csv-table:: SubscribeToObservableGameListRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "subscribe", :ref:`bool `, "``true`` to subscribe, ``false`` to unsubscribe" :ref:`Top ` .. _req-SubscribedToObservableGameListRequest: .. _reference-message-com.daysofwonder.async.SubscribedToObservableGameListRequest: .. _reference-field-com.daysofwonder.async.SubscribedToObservableGameListRequest: SubscribedToObservableGameListRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server to confirm subscription or unsubscription. More information can be found in :ref:`workflow-lobby-observable-list` section. S -> C * request_number: 621 * field_name: subscribed_to_observable_game_list_request In response to: * :ref:`SubscribeToObservableGameListRequest ` .. csv-table:: SubscribedToObservableGameListRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "subscribed", :ref:`bool `, "``true`` when subscribed, ``false`` when unsubscribed" :ref:`Top ` .. _req-SwitchedToGameRequest: .. _reference-message-com.daysofwonder.async.SwitchedToGameRequest: .. _reference-field-com.daysofwonder.async.SwitchedToGameRequest: SwitchedToGameRequest ^^^^^^^^^^^^^^^^^^^^^ Sent by the client to inform the server presence system that the connected player just entered a specific game interface. Note: the server makes sure that the player can be only in one game at a time. More information can be found in :ref:`workflow-game-switching` section. C -> S * request_number: 534 * field_name: switched_to_game_request .. csv-table:: SwitchedToGameRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "| The game id the player is switching to. | In the case where the player doesn't enter a given game | but exits to another kind of UI, do not fill this value" :ref:`Top ` .. _req-UnregisterPresenceRequest: .. _reference-message-com.daysofwonder.async.UnregisterPresenceRequest: .. _reference-field-com.daysofwonder.async.UnregisterPresenceRequest: UnregisterPresenceRequest ^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client to stop monitoring the presence of a player. 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" "player_ids", :ref:`int32[] `, "List of global player ids to stop monitoring presence" :ref:`Top ` .. _req-UnsubscribePresenceServiceRequest: .. _reference-message-com.daysofwonder.async.UnsubscribePresenceServiceRequest: .. _reference-field-com.daysofwonder.async.UnsubscribePresenceServiceRequest: UnsubscribePresenceServiceRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client to stop monitoring the presence of players 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-UpdateUserDataRequest: .. _reference-message-com.daysofwonder.async.UpdateUserDataRequest: .. _reference-field-com.daysofwonder.async.UpdateUserDataRequest: UpdateUserDataRequest ^^^^^^^^^^^^^^^^^^^^^ Sent by the client during Simultaneous turns to send data to the server. More information can be found in :ref:`workflow-simultaneous` section. C -> S * request_number: 566 * field_name: update_user_data_request Possible Responses: * :ref:`UserDataUpdatedRequest ` * :ref:`GameUserDataUpdatedRequest ` In response to: * :ref:`UserDataUpdateRequiredRequest ` .. csv-table:: UpdateUserDataRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" "user_data", :ref:`bytes `, "This specific user data for this game" "player_id", :ref:`int32 `, "Who to play for (in case of hotswap)" "expect_more_data", :ref:`bool `, "| Is this the last update? | If ``true``, then the player can send again a new user data which will replace the previously one sent. | If ``false``, this concludes the user data round for this user. | The default (``false``) is to conclude the transaction for this player" "broadcast", :ref:`bool `, "Set to ``true`` if this action data should be broadcast through :ref:`GameUserDataUpdatedRequest `" :ref:`Top ` .. _req-UserDataUpdateRequiredRequest: .. _reference-message-com.daysofwonder.async.UserDataUpdateRequiredRequest: .. _reference-field-com.daysofwonder.async.UserDataUpdateRequiredRequest: UserDataUpdateRequiredRequest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sent by the server during Simultaneous turns to require user-data from players. This happens during `simultaneous turns`, or a `first user data round`: the server configuration for a game type specifies it (see `reference.conf`: ``first_user_data_round``). Note that at this stage the game is in the state ``SIMULTANEOUS`` or ``FIRST_USER_DATA_ROUND``. More information can be found in :ref:`workflow-simultaneous` section. S -> C * request_number: 565 * field_name: user_update_data_required_request Possible Responses: * :ref:`UpdateUserDataRequest ` .. csv-table:: UserDataUpdateRequiredRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "System assigned game id" "turn_index", :ref:`int32 `, "The turn index this action is supposed to be played in. It is recommended to provide it. The correct value is passed in :ref:`ActionRequiredRequest ` / :ref:`PlayerTimeoutRequest ` / others" "participant", :ref:`int32[] `, "Ids of players supposed to provide `UserData` during this simultaneous turn" "state", :ref:`bytes `, "Last game state" "pause_time", :ref:`int32 `, "| The player's clock will start after this delay (in seconds). This can be used to | give time to play animations of previous actions before starting decreasing clock." :ref:`Top ` .. _req-UserDataUpdatedRequest: .. _reference-message-com.daysofwonder.async.UserDataUpdatedRequest: .. _reference-field-com.daysofwonder.async.UserDataUpdatedRequest: UserDataUpdatedRequest ^^^^^^^^^^^^^^^^^^^^^^ Sent by the server during Simultaneous turns to confirm user-data has been updated. More information can be found in :ref:`workflow-simultaneous` section. S -> C * request_number: 567 * field_name: user_data_updated_request In response to: * :ref:`UpdateUserDataRequest ` .. csv-table:: UserDataUpdatedRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "The game id where this event happened" "user_data", :ref:`bytes `, "This specific user data for this game" "player_id", :ref:`int32 `, "Who updated" :ref:`Top ` .. _req-WhatsNewPussycatRequest: .. _reference-message-com.daysofwonder.async.WhatsNewPussycatRequest: .. _reference-field-com.daysofwonder.async.WhatsNewPussycatRequest: WhatsNewPussycatRequest ^^^^^^^^^^^^^^^^^^^^^^^ Sent by the client to get an up-to-date status of all data of either a given game or for all games this player is part of. More information can be found in :ref:`workflow-whatsnew` section. C -> S * request_number: 511 * field_name: whats_new_pussycat_request Possible Responses: * :ref:`GameStatusReportRequest ` .. csv-table:: WhatsNewPussycatRequest :widths: 20 10 40 :header: "Field", "Type", "Description" "game_id", :ref:`int64 `, "If not transmitted (or 0) returns messages for all current games" "summary_data_only", :ref:`bool `, "| If ``true`` (defaults to ``false``), the returned :ref:`StatusReport ` will not provide ``data`` of the last :ref:`CommitActionRequest `, but only the ``summary_data``. | This is useful when you don't need the whole data so you can request a smaller packet (for instance, for display purposes)" :ref:`Top ` Enums ----- .. _reference-enum-com.daysofwonder.async.AsyncBuddyManagementRequest.Operation: .. _reference-field-com.daysofwonder.async.AsyncBuddyManagementRequest.Operation: AsyncBuddyManagementRequest.Operation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Buddy management operation type .. csv-table:: AsyncBuddyManagementRequest.Operation :widths: 20 10 40 :header: "Name", "Number", "Description" "NOOP", "0", "Do not use" "ADD", "1", "Add a player to the buddy list" "REMOVE", "2", "Remove a player from the buddy list" :ref:`Top ` .. _reference-enum-com.daysofwonder.async.AsyncConnectionErrorRequest.ConnectionError: .. _reference-field-com.daysofwonder.async.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 player has been either temporarily or definitely banned" :ref:`Top ` .. _reference-enum-com.daysofwonder.async.AsyncIgnoreManagementRequest.Operation: .. _reference-field-com.daysofwonder.async.AsyncIgnoreManagementRequest.Operation: AsyncIgnoreManagementRequest.Operation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Ignore list management operations .. csv-table:: AsyncIgnoreManagementRequest.Operation :widths: 20 10 40 :header: "Name", "Number", "Description" "NOOP", "0", "Do not use" "ADD", "1", "Add a player to the ignore list" "REMOVE", "2", "Remove a player from the ignore list" :ref:`Top ` .. _reference-enum-com.daysofwonder.async.ErrorCode: .. _reference-field-com.daysofwonder.async.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" "NOT_YOUR_TURN", "1", "Player tried to play but it was not her turn (or she was not in the list of possible players)" "UNKNOWN_PLAYER", "2", "An invalid player local ID has been provided in a field" "UNKNOWN_GAME", "3", "The provided game ID does not exist, or the player is not part of this game" "MAINTENANCE_MODE", "4", "The server cannot respond due to temporary maintenance operation" "TOO_MANY_OFFERS", "5", "The current player 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 player)" "YOU_FORFEITED", "7", "Sent in response to :ref:`CommitActionRequest ` when player has already forfeited" "YOU_RAN_OUT_OF_TIME", "8", "Sent in response to :ref:`CommitActionRequest ` when player has no time left to play" "YOU_LEFT", "9", "Sent in response to :ref:`CommitActionRequest ` when player has left the game" "PLAYER_ALREADY_IN_LOBBY", "10", "Sent in response to :ref:`EnterLobbyRequest ` when sent multiple times" "NOT_YOUR_INVITATION", "11", "Sent in response to a :ref:`GameForfeitRequest ` of an invitation if sender is not inviter" "INVITATION_DENIED", "13", "One of the invited player has the game creator in his ignore list - the invitation is automatically cancelled" "BAD_REQUEST", "14", "The request had invalid parameters" "WRONG_STATE", "15", "The request was sent while the game 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" "PLAYER_NOT_IN_LOBBY", "17", "The current request meant something if the player was in the lobby, but she's not anymore, request is ignored" "INDEX_CONFLICT", "18", "The provided turn index doesn't match the current turn index" :ref:`Top ` .. _reference-enum-com.daysofwonder.async.GameConfiguration.GameMode: .. _reference-field-com.daysofwonder.async.GameConfiguration.GameMode: GameConfiguration.GameMode ^^^^^^^^^^^^^^^^^^^^^^^^^^ Type of game .. csv-table:: GameConfiguration.GameMode :widths: 20 10 40 :header: "Name", "Number", "Description" "DEFAULT_MODE", "0", "Do not use" "SYNCHRONOUS", "1", "Synchronous game: leaving players are replaced by a robot" "ASYNCHRONOUS", "2", "Asynchronous game: leaving players will not be replaced, active players' clocks will keep running" :ref:`Top ` .. _reference-enum-com.daysofwonder.async.GameConfiguration.Observers: .. _reference-field-com.daysofwonder.async.GameConfiguration.Observers: GameConfiguration.Observers ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Type of observers .. csv-table:: GameConfiguration.Observers :widths: 20 10 40 :header: "Name", "Number", "Description" "DEFAULT_OBSERVERS", "0", "Default is ``ALL``" "ALL", "1", "Game is observable by every user not in a creator's ignore list" "BUDDIES", "2", "Game is only observable by creator's buddies" "TOURNAMENT", "3", "Not implemented - same as ``ALL``" :ref:`Top ` .. _reference-enum-com.daysofwonder.async.GameNotification.Event: .. _reference-field-com.daysofwonder.async.GameNotification.Event: GameNotification.Event ^^^^^^^^^^^^^^^^^^^^^^ .. csv-table:: GameNotification.Event :widths: 20 10 40 :header: "Name", "Number", "Description" "NO_EVENT", "0", "Do not use" "YOUR_TURN", "1", "Sent to the current player in a game" "GAME_OVER", "2", "Sent to a player to inform her that the game ended. When all players saw the outcome, the game can be deleted" "YOUR_TURN_INVITE", "3", "Sent to the current player of an invitation game" "YOUR_TURN_ROBOT", "4", "Sent to the player selected to play a robot for another player" "CONFIRM_INVITATION", "5", "Sent to a player that has been invited to a game so that she can confirm or deny the invitation" "INVITEE_ACCEPTED", "6", "Sent to a player to inform her that an invitee confirmed the invitation" "INVITEE_DECLINED", "7", "Sent to a player to inform her that an invitee denied the invitation" :ref:`Top ` .. _reference-enum-com.daysofwonder.async.GameObservedRequest.Status: .. _reference-field-com.daysofwonder.async.GameObservedRequest.Status: GameObservedRequest.Status ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. csv-table:: GameObservedRequest.Status :widths: 20 10 40 :header: "Name", "Number", "Description" "RESERVED", "0", "Do not use" "OK", "1", "Everything is ok" "IN_GAME_ERROR", "2", "You're already playing in this game" "NO_SUCH_GAME_ERROR", "3", "There's no game with this id" "FORBIDDEN_ERROR", "4", "This game prevented observer to observe" "GAME_NOT_STARTED", "5", "Game has been created, but is not yet started" "GAME_OVER", "6", "Game is now over" "NOT_IN_LOBBY", "7", "Cannot observe a game if not in lobby" :ref:`Top ` .. _reference-enum-com.daysofwonder.async.GameStatus: .. _reference-field-com.daysofwonder.async.GameStatus: GameStatus ^^^^^^^^^^ Game internal status. .. csv-table:: GameStatus :widths: 20 10 40 :header: "Name", "Number", "Description" "RESERVED", "0", "Do not use" "IN_PROGRESS", "1", "Game is running" "OVER", "2", "Game is now over" "NOT_STARTED", "3", "Game hasn't started yet" "ABORTED", "4", "Cause is player forfeited" "OUTCOME", "5", "Game is not over yet, waiting for players to see the outcome" "PLAYER_TIMEOUT", "6", "One (or more) player has timed out, someone needs to do something" "ABORTING", "7", "Game is not over yet, waiting for player to see the abort notification" "WAITING_INVITATION", "8", "Game still waits for some player confirmation" "FIRST_USER_DATA_ROUND", "9", "For game that requires a special first user data round, it is the first state after ``NOT_STARTED`` and before ``IN_PROGRESS``" "SIMULTANEOUS", "10", "Game is in a simultaneous turn" "INTERRUPTIBLE", "11", "Game is in an interruption turn" :ref:`Top ` .. _reference-enum-com.daysofwonder.async.InterruptActionErrorRequest.Error: .. _reference-field-com.daysofwonder.async.InterruptActionErrorRequest.Error: InterruptActionErrorRequest.Error ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Possible errors returned by the server when failing to perform an interruption .. csv-table:: InterruptActionErrorRequest.Error :widths: 20 10 40 :header: "Name", "Number", "Description" "UNKNOWN", "0", "An unknown error occurred" "BAD_STATE", "1", "Provided empty interruption data" "INDEX_CONFLICT", "2", "Wrong ``turn_index`` provided" "FORBIDDEN", "3", "Player is not allowed to interrupt the previous action" :ref:`Top ` .. _reference-enum-com.daysofwonder.async.LobbyJoinDeniedRequest.JoinError: .. _reference-field-com.daysofwonder.async.LobbyJoinDeniedRequest.JoinError: LobbyJoinDeniedRequest.JoinError ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. csv-table:: LobbyJoinDeniedRequest.JoinError :widths: 20 10 40 :header: "Name", "Number", "Description" "RESERVED", "0", "Do not use" "SERVER_ERROR", "1", "The server experienced an unexpected error" "NOT_ENOUGH_KARMA", "2", "The minimum karma requirement as defined in configuration is not fulfilled" "TOO_MANY_GAMES", "3", "The joining player already has the maximum number of games concurrently running for a single player" "GAME_FULL", "4", "The game's maximum number of player has already been reached" "IGNORED", "5", "Tried to join a game where a player ignores the joining user" "PASSWORD_MISMATCH", "6", "The provided password does not match the game password" "UNKNOWN_GAME", "7", "There is no such open game ID in the Lobby" "PLAYER_DUPLICATE", "8", "The joining player already is in the game's player list" "ACCESS_DENIED", "9", "Player is not authorized to join this game" "NOT_ENOUGH_RANKSCORE", "10", "The minimum rankscore requirement as defined in configuration is not fulfilled" "NOT_ENOUGH_RANKED_GAMES_PLAYED", "11", "The minimum number of ranked games played required required by the configuration is not reached" :ref:`Top ` .. _reference-enum-com.daysofwonder.async.LobbyStartGameDeniedRequest.StartError: .. _reference-field-com.daysofwonder.async.LobbyStartGameDeniedRequest.StartError: LobbyStartGameDeniedRequest.StartError ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. csv-table:: LobbyStartGameDeniedRequest.StartError :widths: 20 10 40 :header: "Name", "Number", "Description" "RESERVED", "0", "Do not use" "SERVER_ERROR", "1", "The server experienced an unexpected error" "UNKNOWN_GAME", "2", "Tried to start a game ID unknown to the server" "NOT_ENOUGH_PLAYER", "3", "Not enough players to start the game (check :ref:`GameConfiguration.min_players `)" "ACCESS_DENIED", "4", "If another player tries to start instead of creator" :ref:`Top ` .. _reference-enum-com.daysofwonder.async.PlayerTimeoutRequest.PlayerStatus: .. _reference-field-com.daysofwonder.async.PlayerTimeoutRequest.PlayerStatus: PlayerTimeoutRequest.PlayerStatus ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Status of an hot-swapped player .. csv-table:: PlayerTimeoutRequest.PlayerStatus :widths: 20 10 40 :header: "Name", "Number", "Description" "RESERVED", "0", "Do not use" "TIMEOUT", "1", "Player ran out of time" "FORFEIT", "2", "Player withdrew from the game" "LEFT", "3", "Player left the game" "ROBOT", "4", "Player is in fact a robot" "IDLE", "5", "Player was inactive during her last turn" :ref:`Top ` .. _reference-file-common.proto: common.proto ============ Messages -------- .. _req-PartnerToken: .. _reference-message-com.daysofwonder.async.PartnerToken: .. _reference-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-file-game.proto: game.proto ========== Messages -------- .. _req-AccessRights: .. _reference-message-com.daysofwonder.AccessRights: .. _reference-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-AccessRights.Right: .. _reference-message-com.daysofwonder.AccessRights.Right: .. _reference-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-Achievement: .. _reference-message-com.daysofwonder.Achievement: .. _reference-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-AchievementUpdate: .. _reference-message-com.daysofwonder.AchievementUpdate: .. _reference-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-Activity: .. _reference-message-com.daysofwonder.Activity: .. _reference-field-com.daysofwonder.Activity: Activity ^^^^^^^^ Represents a type of activity. .. _req-Avatar: .. _reference-message-com.daysofwonder.Avatar: .. _reference-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-FinalScore: .. _reference-message-com.daysofwonder.FinalScore: .. _reference-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-PartnerUser: .. _reference-message-com.daysofwonder.PartnerUser: .. _reference-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-Player: .. _reference-message-com.daysofwonder.Player: .. _reference-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-PlayerAchievement: .. _reference-message-com.daysofwonder.PlayerAchievement: .. _reference-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-PlayerAchievementUpdate: .. _reference-message-com.daysofwonder.PlayerAchievementUpdate: .. _reference-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-PlayerActivity: .. _reference-message-com.daysofwonder.PlayerActivity: .. _reference-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-PlayerRankingUpdate: .. _reference-message-com.daysofwonder.PlayerRankingUpdate: .. _reference-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-Rank: .. _reference-message-com.daysofwonder.Rank: .. _reference-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-RankingUpdate: .. _reference-message-com.daysofwonder.RankingUpdate: .. _reference-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-enum-com.daysofwonder.Achievement.Status: .. _reference-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-enum-com.daysofwonder.Achievement.Type: .. _reference-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-enum-com.daysofwonder.Activity.Code: .. _reference-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-file-request.proto: request.proto ============= Messages -------- .. _req-Message: .. _reference-message-com.daysofwonder.mm.Message: .. _reference-field-com.daysofwonder.mm.Message: Message ^^^^^^^ Network 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:`com.daysofwonder.async.AsyncAuthRequest `, "400" "async_disconnect_request", :ref:`com.daysofwonder.async.AsyncDisconnectRequest `, "401" "game_created_request", :ref:`com.daysofwonder.async.GameCreatedRequest `, "404" "engage_game_with_friends_request", :ref:`com.daysofwonder.async.EngageGameWithFriendsRequest `, "405" "async_connected_request", :ref:`com.daysofwonder.async.AsyncConnectedRequest `, "406" "async_connection_error_request", :ref:`com.daysofwonder.async.AsyncConnectionErrorRequest `, "407" "ask_server_statistics_request", :ref:`com.daysofwonder.async.AskServerStatisticsRequest `, "408" "server_statistics_request", :ref:`com.daysofwonder.async.ServerStatisticsRequest `, "409" "async_unlink_device_request", :ref:`com.daysofwonder.async.AsyncUnlinkDeviceRequest `, "412" "async_device_unlinked_request", :ref:`com.daysofwonder.async.AsyncDeviceUnlinkedRequest `, "413" "action_required_request", :ref:`com.daysofwonder.async.ActionRequiredRequest `, "500" "commit_action_request", :ref:`com.daysofwonder.async.CommitActionRequest `, "501" "multicast_data_request", :ref:`com.daysofwonder.async.MulticastDataRequest `, "502" "client_data_request", :ref:`com.daysofwonder.async.ClientDataRequest `, "503" "player_timeout_request", :ref:`com.daysofwonder.async.PlayerTimeoutRequest `, "504" "error_request", :ref:`com.daysofwonder.async.ErrorRequest `, "505" "player_presence_update_request", :ref:`com.daysofwonder.async.PlayerPresenceUpdateRequest `, "506" "game_over_request", :ref:`com.daysofwonder.async.GameOverRequest `, "507" "game_outcome_request", :ref:`com.daysofwonder.async.GameOutcomeRequest `, "508" "player_idle_progress_request", :ref:`com.daysofwonder.async.PlayerIdleProgressRequest `, "509" "whats_new_pussycat_request", :ref:`com.daysofwonder.async.WhatsNewPussycatRequest `, "511" "game_status_report_request", :ref:`com.daysofwonder.async.GameStatusReportRequest `, "512" "game_forfeit_request", :ref:`com.daysofwonder.async.GameForfeitRequest `, "513" "game_forfeited_request", :ref:`com.daysofwonder.async.GameForfeitedRequest `, "514" "async_buddy_list_request", :ref:`com.daysofwonder.async.AsyncBuddyListRequest `, "515" "async_buddy_list_content_request", :ref:`com.daysofwonder.async.AsyncBuddyListContentRequest `, "516" "async_buddy_presence_partial_update_request", :ref:`com.daysofwonder.async.AsyncBuddyPresencePartialUpdateRequest `, "517" "async_buddy_management_request", :ref:`com.daysofwonder.async.AsyncBuddyManagementRequest `, "518" "async_buddy_added_request", :ref:`com.daysofwonder.async.AsyncBuddyAddedRequest `, "519" "async_buddy_removed_request", :ref:`com.daysofwonder.async.AsyncBuddyRemovedRequest `, "520" "game_outcome_confirmation_request", :ref:`com.daysofwonder.async.GameOutcomeConfirmationRequest `, "522" "action_commited_request", :ref:`com.daysofwonder.async.ActionCommitedRequest `, "523" "multicast_chat_request", :ref:`com.daysofwonder.async.MulticastChatRequest `, "524" "client_chat_request", :ref:`com.daysofwonder.async.ClientChatRequest `, "525" "client_chat_blocked_request", :ref:`com.daysofwonder.async.ClientChatBlockedRequest `, "526" "register_presence_request", :ref:`com.daysofwonder.async.RegisterPresenceRequest `, "527" "unregister_presence_request", :ref:`com.daysofwonder.async.UnregisterPresenceRequest `, "528" "game_aborted_request", :ref:`com.daysofwonder.async.GameAbortedRequest `, "530" "game_aborted_confirmation_request", :ref:`com.daysofwonder.async.GameAbortedConfirmationRequest `, "531" "subscribe_presence_request", :ref:`com.daysofwonder.async.SubscribePresenceServiceRequest `, "532" "unsubscribe_presence_request", :ref:`com.daysofwonder.async.UnsubscribePresenceServiceRequest `, "533" "switched_to_game_request", :ref:`com.daysofwonder.async.SwitchedToGameRequest `, "534" "get_chat_history_request", :ref:`com.daysofwonder.async.GetChatHistoryRequest `, "535" "client_chat_history_request", :ref:`com.daysofwonder.async.ClientChatHistoryRequest `, "536" "player_replaced_request", :ref:`com.daysofwonder.async.PlayerReplacedRequest `, "537" "leave_sync_game_request", :ref:`com.daysofwonder.async.LeaveSyncGameRequest `, "538" "resume_sync_game_request", :ref:`com.daysofwonder.async.ResumeSyncGameRequest `, "539" "answer_invitation_request", :ref:`com.daysofwonder.async.AnswerInvitationRequest `, "540" "invitation_answered_request", :ref:`com.daysofwonder.async.InvitationAnsweredRequest `, "541" "clock_paused_request", :ref:`com.daysofwonder.async.ClockPausedRequest `, "543" "clock_resumed_request", :ref:`com.daysofwonder.async.ClockResumedRequest `, "545" "get_clocks_request", :ref:`com.daysofwonder.async.GetClocksRequest `, "546" "clocks_status_request", :ref:`com.daysofwonder.async.ClocksStatusRequest `, "547" "async_ignore_list_request", :ref:`com.daysofwonder.async.AsyncIgnoreListRequest `, "560" "async_ignore_list_content_request", :ref:`com.daysofwonder.async.AsyncIgnoreListContentRequest `, "561" "async_ignore_management_request", :ref:`com.daysofwonder.async.AsyncIgnoreManagementRequest `, "562" "async_ignore_added_request", :ref:`com.daysofwonder.async.AsyncIgnoreAddedRequest `, "563" "async_ignore_removed_request", :ref:`com.daysofwonder.async.AsyncIgnoreRemovedRequest `, "564" "user_update_data_required_request", :ref:`com.daysofwonder.async.UserDataUpdateRequiredRequest `, "565" "update_user_data_request", :ref:`com.daysofwonder.async.UpdateUserDataRequest `, "566" "user_data_updated_request", :ref:`com.daysofwonder.async.UserDataUpdatedRequest `, "567" "game_state_updated_request", :ref:`com.daysofwonder.async.GameStateUpdatedRequest `, "568" "game_user_data_updated_request", :ref:`com.daysofwonder.async.GameUserDataUpdatedRequest `, "569" "interrupt_action_request", :ref:`com.daysofwonder.async.InterruptActionRequest `, "" "action_interrupted_request", :ref:`com.daysofwonder.async.ActionInterruptedRequest `, "" "interruption_over_request", :ref:`com.daysofwonder.async.InterruptionOverRequest `, "" "interrupt_action_error_request", :ref:`com.daysofwonder.async.InterruptActionErrorRequest `, "" "enter_lobby_request", :ref:`com.daysofwonder.async.EnterLobbyRequest `, "600" "lobby_entered_request", :ref:`com.daysofwonder.async.LobbyEnteredRequest `, "601" "exit_lobby_request", :ref:`com.daysofwonder.async.ExitLobbyRequest `, "602" "lobby_exited_request", :ref:`com.daysofwonder.async.LobbyExitedRequest `, "603" "lobby_player_list_request", :ref:`com.daysofwonder.async.LobbyPlayerListRequest `, "604" "ask_player_info_request", :ref:`com.daysofwonder.async.AskPlayerInfoRequest `, "605" "lobby_player_info_request", :ref:`com.daysofwonder.async.LobbyPlayerInfoRequest `, "606" "lobby_create_game_request", :ref:`com.daysofwonder.async.LobbyCreateGameRequest `, "607" "lobby_game_created_request", :ref:`com.daysofwonder.async.LobbyGameCreatedRequest `, "608" "lobby_game_list_request", :ref:`com.daysofwonder.async.LobbyGameListRequest `, "609" "lobby_join_game_request", :ref:`com.daysofwonder.async.LobbyJoinGameRequest `, "610" "lobby_new_player_request", :ref:`com.daysofwonder.async.LobbyNewPlayerRequest `, "611" "lobby_join_denied_request", :ref:`com.daysofwonder.async.LobbyJoinDeniedRequest `, "612" "lobby_leave_game_request", :ref:`com.daysofwonder.async.LobbyLeaveGameRequest `, "613" "lobby_player_left_game_request", :ref:`com.daysofwonder.async.LobbyPlayerLeftGameRequest `, "614" "lobby_start_game_request", :ref:`com.daysofwonder.async.LobbyStartGameRequest `, "615" "lobby_start_game_denied_request", :ref:`com.daysofwonder.async.LobbyStartGameDeniedRequest `, "616" "subscribe_to_observable_game_list_request", :ref:`com.daysofwonder.async.SubscribeToObservableGameListRequest `, "620" "subscribed_to_observable_game_list_request", :ref:`com.daysofwonder.async.SubscribedToObservableGameListRequest `, "621" "observable_game_list_request", :ref:`com.daysofwonder.async.ObservableGameListRequest `, "622" "ask_any_player_info_request", :ref:`com.daysofwonder.async.AskAnyPlayerInfoRequest `, "630" "player_info_request", :ref:`com.daysofwonder.async.PlayerInfoRequest `, "631" "start_observe_game_request", :ref:`com.daysofwonder.async.StartObserveGameRequest `, "650" "stop_observe_game_request", :ref:`com.daysofwonder.async.StopObserveGameRequest `, "651" "game_observed_request", :ref:`com.daysofwonder.async.GameObservedRequest `, "652" :ref:`Top ` .. _req-Packet: .. _reference-message-com.daysofwonder.mm.Packet: .. _reference-field-com.daysofwonder.mm.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-PingRequest: .. _reference-message-com.daysofwonder.mm.PingRequest: .. _reference-field-com.daysofwonder.mm.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-file-push.proto: push.proto ========== Messages -------- .. _req-Device: .. _reference-message-com.daysofwonder.game.push.Device: .. _reference-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-DeviceType: .. _reference-message-com.daysofwonder.game.push.DeviceType: .. _reference-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-Devices: .. _reference-message-com.daysofwonder.game.push.Devices: .. _reference-field-com.daysofwonder.game.push.Devices: Devices ^^^^^^^ Enums ----- .. _reference-enum-com.daysofwonder.game.push.Devices.Type: .. _reference-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-scalar-value-types: Scalar Value Types ================== Standard protobuf types .. _reference-field-double: .. _reference-field-float: .. _reference-field-int32: .. _reference-field-int64: .. _reference-field-uint32: .. _reference-field-uint64: .. _reference-field-sint32: .. _reference-field-sint64: .. _reference-field-fixed32: .. _reference-field-fixed64: .. _reference-field-sfixed32: .. _reference-field-sfixed64: .. _reference-field-bool: .. _reference-field-string: .. _reference-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 `