From 683333099a21659663703e104d65378c1c980a5e Mon Sep 17 00:00:00 2001 From: Dragos Daian Date: Sun, 15 Dec 2024 17:48:05 +0100 Subject: [PATCH] update nodes --- classes/class_blaziumclient.rst | 21 +++++- classes/class_gameserverinfo.rst | 4 +- classes/class_listlobbyresponse.rst | 4 +- classes/class_lobbycallresponse.rst | 4 +- classes/class_lobbycallresult.rst | 2 +- classes/class_lobbyclient.rst | 74 ++++++++++++++++++++-- classes/class_lobbyinfo.rst | 8 +-- classes/class_lobbypeer.rst | 8 +-- classes/class_lobbyresponse.rst | 4 +- classes/class_loginclient.rst | 34 ++++++++-- classes/class_loginresponse.rst | 6 +- classes/class_loginresult.rst | 2 +- classes/class_masterserverclient.rst | 18 ++++-- classes/class_masterserverlistresponse.rst | 6 +- classes/class_masterserverresponse.rst | 4 +- classes/class_pogrclient.rst | 44 ++++++++++++- classes/class_pogrresponse.rst | 4 +- classes/class_pogrresult.rst | 8 +-- classes/class_viewlobbyresponse.rst | 4 +- 19 files changed, 203 insertions(+), 56 deletions(-) diff --git a/classes/class_blaziumclient.rst b/classes/class_blaziumclient.rst index f1d0652a507..a7969b4732d 100644 --- a/classes/class_blaziumclient.rst +++ b/classes/class_blaziumclient.rst @@ -14,14 +14,31 @@ BlaziumClient **Inherited By:** :ref:`LobbyClient`, :ref:`LoginClient`, :ref:`MasterServerClient`, :ref:`POGRClient` -An abstract base node used to connect to Blazium services. +Base node for connecting to the Blazium services. .. rst-class:: classref-introduction-group Description ----------- -An abstract base node used to connect to Blazium services. +The **BlaziumClient** node provides an interface for connecting to the Blazium services. These services are designed to simplify game development with aspects such as multiplayer, authentication, etc. + +Developers have the flexibility to either: + +- Connect to the free Blazium services hosted on the `blazium.app `__ domain. + +- Self-deploy the Blazium services on their own infrastructure for full control and customization. + +.. code:: text + + + +---------------------+ +---------------------+ + | Blazium Engine | HTTP and | Blazium Service | + |---------------------| WebSocket |---------------------| + | - Send requests | <---------> | - Handle requests | + | - Receive responses | | - Send responses | + +---------------------+ +---------------------+ + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_gameserverinfo.rst b/classes/class_gameserverinfo.rst index 08658ae8da7..6953ed9f60f 100644 --- a/classes/class_gameserverinfo.rst +++ b/classes/class_gameserverinfo.rst @@ -19,7 +19,7 @@ Game server info used by the :ref:`MasterServerClient` Description ----------- -Game server info used by the :ref:`MasterServerClient`. Used to create or update a game server. +Game server info used by the :ref:`MasterServerClient`. Used to :ref:`MasterServerClient.create_game` or :ref:`MasterServerClient.update_game`. .. rst-class:: classref-reftable-group @@ -101,7 +101,7 @@ Name of the game server. - |void| **set_id**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_id**\ (\ ) -Id of the game server. Generated after call to create game server. +Id of the game server. Generated after call to :ref:`MasterServerClient.create_game`. .. rst-class:: classref-item-separator diff --git a/classes/class_listlobbyresponse.rst b/classes/class_listlobbyresponse.rst index b753b56a34e..66efa74963f 100644 --- a/classes/class_listlobbyresponse.rst +++ b/classes/class_listlobbyresponse.rst @@ -12,14 +12,14 @@ ListLobbyResponse **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Response from a list lobby request. +Response from a :ref:`LobbyClient.list_lobbies` call. .. rst-class:: classref-introduction-group Description ----------- -Response from a list lobby request. Await on finished to get the :ref:`ListLobbyResult`. +Response from a :ref:`LobbyClient.list_lobbies` call. Await on :ref:`finished` signal to get the :ref:`ListLobbyResult`. .. rst-class:: classref-section-separator diff --git a/classes/class_lobbycallresponse.rst b/classes/class_lobbycallresponse.rst index 6b724d30d54..d0e04a85822 100644 --- a/classes/class_lobbycallresponse.rst +++ b/classes/class_lobbycallresponse.rst @@ -12,14 +12,14 @@ LobbyCallResponse **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Response from a lobby call function. +Response from a :ref:`AuthoritativeClient.lobby_call` call. .. rst-class:: classref-introduction-group Description ----------- -Response from a lobby call function. Await on finished to get the :ref:`LobbyCallResult`. +Response from a :ref:`AuthoritativeClient.lobby_call` call. Await on :ref:`finished` signal to get the :ref:`LobbyCallResult`. .. rst-class:: classref-section-separator diff --git a/classes/class_lobbycallresult.rst b/classes/class_lobbycallresult.rst index 02dd7a45cdf..a61070f1fe7 100644 --- a/classes/class_lobbycallresult.rst +++ b/classes/class_lobbycallresult.rst @@ -19,7 +19,7 @@ A result from a :ref:`LobbyCallResponse`. Description ----------- -A result from a :ref:`LobbyCallResponse`. +A result from a :ref:`LobbyCallResponse`. Contains either result or error. .. rst-class:: classref-reftable-group diff --git a/classes/class_lobbyclient.rst b/classes/class_lobbyclient.rst index a1225a9cea2..dfda3c6b138 100644 --- a/classes/class_lobbyclient.rst +++ b/classes/class_lobbyclient.rst @@ -14,14 +14,38 @@ LobbyClient **Inherited By:** :ref:`AuthoritativeClient` -A node used to connect to a lobby server. +Node for connecting to the Blazium Lobby service. Offers non-authoritative lobby making features. .. rst-class:: classref-introduction-group Description ----------- -A node used to connect to a lobby server. It can be used to do matchmaking. You can do operations such as create lobby, join lobby, etc. The server is configurable and can either be self deployed or you can use the blazium free matchmaking server. +The **LobbyClient** node provides an interface for connecting to the Blazium Lobby service. There is a free instance hosted on the `blazium.app `__ domain that is used by default. + +The normal flow is as follows: + +1. Listen to all the signals you are interested in. + +2. Connect to the server using :ref:`connect_to_lobby` method. + +3. Call any other methods to create, view or join lobbies, as well as add data to them. + +4. Close the session using :ref:`disconnect_from_lobby` method at the end of the game. + +\ **Note:** Some methods are non blocking and can be awaited in order to get the result. + +There are also members on this class that are automatically updated as the lobby gets updated, such as: + +- :ref:`peer`: The current peer. Reflects changes to the self peer. + +- :ref:`peers`: The lobby peers. Reflects changes to all peers. + +- :ref:`lobby`: The lobby. Reflects changes to the lobby. + +- :ref:`host_data`: The current lobby private data. Only works if you are host. + +- :ref:`peer_data`: The current peer private data. .. rst-class:: classref-reftable-group @@ -497,6 +521,8 @@ Method Descriptions Add data to the lobby. Only works if you are host. +Returns a :ref:`LobbyResponse` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`received_lobby_data`. .. rst-class:: classref-item-separator @@ -511,6 +537,8 @@ Generates :ref:`received_lobby_data` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`lobby_tagged`. .. rst-class:: classref-item-separator @@ -525,6 +553,8 @@ Generates :ref:`lobby_tagged`. Add data to a peer. Only works if you are host. +Returns a :ref:`LobbyResponse` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`received_peer_data`. .. rst-class:: classref-item-separator @@ -539,6 +569,8 @@ Generates :ref:`received_peer_data` Add data to all peers. Only works if you are host. +Returns a :ref:`LobbyResponse` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`received_peer_data`. .. rst-class:: classref-item-separator @@ -553,6 +585,8 @@ Generates :ref:`received_peer_data` Connect to a Blazium Lobby Server using the :ref:`game_id` and :ref:`server_url`. +Generates :ref:`connected_to_lobby` signal if successful. + .. rst-class:: classref-item-separator ---- @@ -567,6 +601,8 @@ Create a lobby and become host. If you are already in a lobby, you cannot create The new lobby can have a title, tags, max players and password. 0 max players means unlimited. +Returns a :ref:`ViewLobbyResponse` object that has a :ref:`ViewLobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`lobby_created` signal. .. rst-class:: classref-item-separator @@ -581,6 +617,8 @@ Generates :ref:`lobby_created` signal. Delete one or more keys from the lobby data. Only works if you are host. +Returns a :ref:`LobbyResponse` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`received_lobby_data`. .. rst-class:: classref-item-separator @@ -595,6 +633,8 @@ Generates :ref:`received_lobby_data` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`lobby_tagged`. .. rst-class:: classref-item-separator @@ -607,7 +647,9 @@ Generates :ref:`lobby_tagged`. :ref:`LobbyResponse` **del_peer_data**\ (\ keys\: :ref:`Array`\[:ref:`String`\], target_peer\: :ref:`String`, is_private\: :ref:`bool` = false\ ) :ref:`🔗` -one or more keys from the peer data. Only works if you are host. +Delete one or more keys from the peer data. Only works if you are host. + +Returns a :ref:`LobbyResponse` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. Generates :ref:`received_peer_data`. @@ -621,7 +663,9 @@ Generates :ref:`received_peer_data` :ref:`LobbyResponse` **del_peers_data**\ (\ keys\: :ref:`Array`\[:ref:`String`\], is_private\: :ref:`bool` = false\ ) :ref:`🔗` -one or more keys from the peers data. Only works if you are host. +Delete one or more keys from the peers data. Only works if you are host. + +Returns a :ref:`LobbyResponse` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. Generates :ref:`received_peer_data`. @@ -637,6 +681,8 @@ Generates :ref:`received_peer_data` Disconnect from the lobby server. +Generates :ref:`disconnected_from_lobby` signal. + .. rst-class:: classref-item-separator ---- @@ -663,6 +709,8 @@ Join a lobby. If you are already in a lobby, you cannot join another one. You ne If the lobby you want to join is password protected, you need to provide the password. +Returns a :ref:`ViewLobbyResponse` object that has a :ref:`ViewLobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`lobby_joined`. .. rst-class:: classref-item-separator @@ -677,6 +725,8 @@ Generates :ref:`lobby_joined`. Kick a peer. You need to be host to do so. +Returns a :ref:`LobbyResponse` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`peer_left` signal with kicked set to true. .. rst-class:: classref-item-separator @@ -691,6 +741,8 @@ Generates :ref:`peer_left` signal with kicke Leave a lobby. You need to be in a lobby to leave one. +Returns a :ref:`LobbyResponse` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`lobby_left`. .. rst-class:: classref-item-separator @@ -717,6 +769,8 @@ Lists all lobbies. Lobbies that are sealed won't show in the list, except if you Send a notification either to the host, or if you are host send data to all peers. +Returns a :ref:`LobbyResponse` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`lobby_notified` signal. .. rst-class:: classref-item-separator @@ -731,6 +785,8 @@ Generates :ref:`lobby_notified` signal. Send a notification to a peer, works only if you are host. +Returns a :ref:`LobbyResponse` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`lobby_notified` signal. .. rst-class:: classref-item-separator @@ -745,6 +801,8 @@ Generates :ref:`lobby_notified` signal. Send a chat message. Only works if you are in a lobby. +Returns a :ref:`LobbyResponse` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`peer_messaged`. .. rst-class:: classref-item-separator @@ -759,6 +817,8 @@ Generates :ref:`peer_messaged`. Ready up in the lobby. You need to be in a lobby and unready to run this. +Returns a :ref:`LobbyResponse` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`peer_ready`. .. rst-class:: classref-item-separator @@ -773,6 +833,8 @@ Generates :ref:`peer_ready`. Seals the lobby. You need to be the host to do this and the lobby needs to be unsealed. +Returns a :ref:`LobbyResponse` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`lobby_sealed`. .. rst-class:: classref-item-separator @@ -787,6 +849,8 @@ Generates :ref:`lobby_sealed`. Set your peer name. +Returns a :ref:`LobbyResponse` object that has a :ref:`LobbyResponse.finished` signal that is emitted when finished. + Generates :ref:`peer_named` signal if you are in lobby. .. rst-class:: classref-item-separator @@ -801,6 +865,8 @@ Generates :ref:`peer_named` signal if you a View data from a lobby. Returns lobby settings and peers. +Returns a :ref:`ViewLobbyResponse` object that has a :ref:`ViewLobbyResponse.finished` signal that is emitted when finished. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_lobbyinfo.rst b/classes/class_lobbyinfo.rst index 70c824991ed..d6bd263bb75 100644 --- a/classes/class_lobbyinfo.rst +++ b/classes/class_lobbyinfo.rst @@ -12,14 +12,14 @@ LobbyInfo **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Lobby information returned after a view lobby request. +Lobby information returned after a :ref:`LobbyClient` request that returns a lobby. .. rst-class:: classref-introduction-group Description ----------- -Lobby information returned after a view lobby request. +Lobby information returned after a :ref:`LobbyClient` request that returns a lobby. .. rst-class:: classref-reftable-group @@ -166,9 +166,7 @@ The maximum number of players allowed in the lobby. 0 = unlimited - :ref:`bool` **is_password_protected**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Whether the lobby is password protected. .. rst-class:: classref-item-separator diff --git a/classes/class_lobbypeer.rst b/classes/class_lobbypeer.rst index 3b25c5fe0ee..83529e30ec2 100644 --- a/classes/class_lobbypeer.rst +++ b/classes/class_lobbypeer.rst @@ -12,14 +12,14 @@ LobbyPeer **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Lobby peers information returned after a view lobby request. +Lobby information returned after a :ref:`LobbyClient` request that returns peers. .. rst-class:: classref-introduction-group Description ----------- -Lobby peers information returned after a view lobby request. +Lobby information returned after a :ref:`LobbyClient` request that returns peers. .. rst-class:: classref-reftable-group @@ -58,9 +58,7 @@ Property Descriptions - :ref:`Dictionary` **get_data**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Public data of the peer. .. rst-class:: classref-item-separator diff --git a/classes/class_lobbyresponse.rst b/classes/class_lobbyresponse.rst index c11d0adeb24..33f5fd88e07 100644 --- a/classes/class_lobbyresponse.rst +++ b/classes/class_lobbyresponse.rst @@ -12,14 +12,14 @@ LobbyResponse **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Generic response from a lobby request. +Generic response from a :ref:`LobbyClient` call. .. rst-class:: classref-introduction-group Description ----------- -Generic response from a lobby request. Await on finished to get the result. +Generic response from a :ref:`LobbyClient` call. Await on :ref:`finished` signal to get the :ref:`LobbyResult`. .. rst-class:: classref-section-separator diff --git a/classes/class_loginclient.rst b/classes/class_loginclient.rst index 3089843a1e1..8748c5e5272 100644 --- a/classes/class_loginclient.rst +++ b/classes/class_loginclient.rst @@ -12,14 +12,28 @@ LoginClient **Inherits:** :ref:`BlaziumClient` **<** :ref:`Node` **<** :ref:`Object` -A node used to connect to a login server. +Node for connecting to the Blazium Login service. Offers authentication mechanism. .. rst-class:: classref-introduction-group Description ----------- -A node used to connect to a login server. +The **LoginClient** node provides an interface for connecting to the Blazium Login service. There is a free instance hosted on the `blazium.app `__ domain that is used by default. + +The authentication flow is as follows: + +1. Listen to all the signals you are interested in. + +2. Connect to the server using the :ref:`connect_to_server` method. + +3. Then you can request login info using the :ref:`request_login_info` method. + +4. Open the resulting login url received after awaiting on the :ref:`LoginResponse.finished` signal. + +5. Obtain the jwt from the :ref:`received_jwt` signal. + +\ **Note:** Some methods are non blocking and can be awaited in order to get the result. .. rst-class:: classref-reftable-group @@ -125,7 +139,7 @@ Property Descriptions - :ref:`bool` **get_connected**\ (\ ) -True if the client is connected, else false. +Client connected state. .. rst-class:: classref-item-separator @@ -142,7 +156,9 @@ True if the client is connected, else false. - |void| **set_game_id**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_game_id**\ (\ ) -The game id. +Set what game id this client should use when connecting to the server. If this is missing connection will error. + +Can only contain alphanumeric characters. .. rst-class:: classref-item-separator @@ -159,7 +175,7 @@ The game id. - |void| **set_server_url**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_server_url**\ (\ ) -Set to what url this login should connect to. +Set to what url this client should connect to. .. rst-class:: classref-section-separator @@ -176,7 +192,9 @@ Method Descriptions :ref:`bool` **connect_to_server**\ (\ ) :ref:`🔗` -Connect to the server. +Connects to the server specified in :ref:`server_url` using the game id specified in :ref:`game_id`. Must be done before requesting login info. + +Generates :ref:`connected_to_server` when connected. .. rst-class:: classref-item-separator @@ -202,7 +220,9 @@ Generates :ref:`disconnected_from_server` **request_login_info**\ (\ login_type\: :ref:`String`\ ) :ref:`🔗` -Request login info. +Request login info using the login type specified. + +Returns a :ref:`LoginResponse` object that has a :ref:`LoginResponse.finished` signal that is emitted when finished. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_loginresponse.rst b/classes/class_loginresponse.rst index b0c3640601a..c5a3e8bb70d 100644 --- a/classes/class_loginresponse.rst +++ b/classes/class_loginresponse.rst @@ -12,14 +12,14 @@ LoginResponse **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Response from a connect request. +Response from a :ref:`LoginClient.request_login_info` call. .. rst-class:: classref-introduction-group Description ----------- -Response from a connect request. +Response from a :ref:`LoginClient.request_login_info` call. Await on :ref:`finished` signal to get the :ref:`LoginResult`. .. rst-class:: classref-section-separator @@ -34,7 +34,7 @@ Signals .. rst-class:: classref-signal -**finished**\ (\ result\: :ref:`LobbyResult`\ ) :ref:`🔗` +**finished**\ (\ result\: :ref:`LoginResult`\ ) :ref:`🔗` Signal emitted when the request is finished. diff --git a/classes/class_loginresult.rst b/classes/class_loginresult.rst index 2789faf1b06..44a2f17f4da 100644 --- a/classes/class_loginresult.rst +++ b/classes/class_loginresult.rst @@ -19,7 +19,7 @@ A result from a :ref:`LoginResponse`. Description ----------- -A result from a :ref:`LoginResponse`. +A result from a :ref:`LoginResponse`. Contains either result or error. .. rst-class:: classref-reftable-group diff --git a/classes/class_masterserverclient.rst b/classes/class_masterserverclient.rst index 0d5654b651e..d171a09277f 100644 --- a/classes/class_masterserverclient.rst +++ b/classes/class_masterserverclient.rst @@ -12,14 +12,16 @@ MasterServerClient **Inherits:** :ref:`BlaziumClient` **<** :ref:`Node` **<** :ref:`Object` -A node used to connect to a master server. +Node for connecting to the Blazium Master Server service. Offers a centralized location for game server association. .. rst-class:: classref-introduction-group Description ----------- -A node used to connect to a master server. +The **MasterServerClient** node provides an interface for connecting to the Blazium Master Server service. There is a free instance hosted on the `blazium.app `__ domain that is used by default. + +\ **Note:** All methods are non blocking and can be awaited in order to get the result. .. rst-class:: classref-reftable-group @@ -71,7 +73,9 @@ Property Descriptions - |void| **set_game_id**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_game_id**\ (\ ) -Game id of the game server. +Set what game id this client should use when connecting to the server. If this is missing connection will error. + +Can only contain alphanumeric characters. .. rst-class:: classref-item-separator @@ -88,7 +92,7 @@ Game id of the game server. - |void| **set_server_url**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_server_url**\ (\ ) -Set to what url this master server should connect to. +Set to what url this client should connect to. .. rst-class:: classref-section-separator @@ -107,6 +111,8 @@ Method Descriptions Create a game server. +Returns a :ref:`MasterServerResponse` object that has a :ref:`MasterServerResponse.finished` signal that is emitted when finished. + .. rst-class:: classref-item-separator ---- @@ -119,6 +125,8 @@ Create a game server. Get a list of recent games. +Returns a :ref:`MasterServerListResponse` object that has a :ref:`MasterServerListResponse.finished` signal that is emitted when finished. + .. rst-class:: classref-item-separator ---- @@ -131,6 +139,8 @@ Get a list of recent games. Update a game server. +Returns a :ref:`MasterServerResponse` object that has a :ref:`MasterServerResponse.finished` signal that is emitted when finished. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_masterserverlistresponse.rst b/classes/class_masterserverlistresponse.rst index 77193522469..3f838cbf44c 100644 --- a/classes/class_masterserverlistresponse.rst +++ b/classes/class_masterserverlistresponse.rst @@ -12,14 +12,14 @@ MasterServerListResponse **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Response from a list games request. +Response from a :ref:`MasterServerClient.recent_games` call. .. rst-class:: classref-introduction-group Description ----------- -Response from a list games request. +Response from a :ref:`MasterServerClient.recent_games` call. Await on :ref:`finished` signal to get the :ref:`MasterServerListResult`. .. rst-class:: classref-section-separator @@ -34,7 +34,7 @@ Signals .. rst-class:: classref-signal -**finished**\ (\ result\: :ref:`MasterServerResult`\ ) :ref:`🔗` +**finished**\ (\ result\: :ref:`MasterServerListResult`\ ) :ref:`🔗` Signal emitted when the request is finished. diff --git a/classes/class_masterserverresponse.rst b/classes/class_masterserverresponse.rst index 663760caec7..e85f457418a 100644 --- a/classes/class_masterserverresponse.rst +++ b/classes/class_masterserverresponse.rst @@ -12,14 +12,14 @@ MasterServerResponse **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Response from a create or update game request. +Response from a :ref:`MasterServerClient.create_game` or :ref:`MasterServerClient.update_game` call. .. rst-class:: classref-introduction-group Description ----------- -Response from a create or update game request. +Response from a :ref:`MasterServerClient.create_game` or :ref:`MasterServerClient.update_game` call. Await on :ref:`finished` signal to get the :ref:`MasterServerResult`. .. rst-class:: classref-section-separator diff --git a/classes/class_pogrclient.rst b/classes/class_pogrclient.rst index 4ece71b8ac0..0c22c8bea3b 100644 --- a/classes/class_pogrclient.rst +++ b/classes/class_pogrclient.rst @@ -12,14 +12,24 @@ POGRClient **Inherits:** :ref:`BlaziumClient` **<** :ref:`Node` **<** :ref:`Object` -Client for the pogr.io analytics website. +Node for connecting to the POGR analytics service. .. rst-class:: classref-introduction-group Description ----------- -Client for the pogr.io analytics website. +The **POGRClient** node provides an interface for connecting to the POGR analytics service. Find out more on the `pogr.gg `__ website. + +The normal flow is as follows: + +1. Initiate a session using :ref:`init` method. + +2. Send data using :ref:`data`, :ref:`event`, :ref:`logs`, :ref:`metrics` and :ref:`monitor` methods, depending on use case. + +3. Close the session using :ref:`end` method at the end of the game. + +\ **Note:** All methods are non blocking and can be awaited in order to get the result. .. rst-class:: classref-reftable-group @@ -32,6 +42,8 @@ Methods +-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`POGRResponse` | :ref:`data`\ (\ data\: :ref:`Dictionary`\ ) | +-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`POGRResponse` | :ref:`end`\ (\ ) | + +-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`POGRResponse` | :ref:`event`\ (\ event_name\: :ref:`String`, event_data\: :ref:`Dictionary`, event_flag\: :ref:`String`, event_key\: :ref:`String`, event_type\: :ref:`String`, event_sub_type\: :ref:`String`\ ) | +-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_build_id`\ (\ ) |const| | @@ -68,6 +80,22 @@ Method Descriptions Send unstructured data. +Returns a :ref:`POGRResponse` object that has a :ref:`POGRResponse.finished` signal that is emitted when finished. + +.. rst-class:: classref-item-separator + +---- + +.. _class_POGRClient_method_end: + +.. rst-class:: classref-method + +:ref:`POGRResponse` **end**\ (\ ) :ref:`🔗` + +Send end request. + +Returns a :ref:`POGRResponse` object that has a :ref:`POGRResponse.finished` signal that is emitted when finished. + .. rst-class:: classref-item-separator ---- @@ -80,6 +108,8 @@ Send unstructured data. Send event with unstructured data. +Returns a :ref:`POGRResponse` object that has a :ref:`POGRResponse.finished` signal that is emitted when finished. + .. rst-class:: classref-item-separator ---- @@ -126,7 +156,7 @@ Get the pogr url. :ref:`String` **get_session_id**\ (\ ) :ref:`🔗` -Get the session id. +Get the session id. This is a unique identifier for the current session generated after :ref:`init` is called. .. rst-class:: classref-item-separator @@ -140,6 +170,8 @@ Get the session id. Send init request. Needs to be called first. +Returns a :ref:`POGRResponse` object that has a :ref:`POGRResponse.finished` signal that is emitted when finished. + .. rst-class:: classref-item-separator ---- @@ -152,6 +184,8 @@ Send init request. Needs to be called first. Add logs to the analytics. +Returns a :ref:`POGRResponse` object that has a :ref:`POGRResponse.finished` signal that is emitted when finished. + .. rst-class:: classref-item-separator ---- @@ -164,6 +198,8 @@ Add logs to the analytics. Add metrics to the analytics. +Returns a :ref:`POGRResponse` object that has a :ref:`POGRResponse.finished` signal that is emitted when finished. + .. rst-class:: classref-item-separator ---- @@ -176,6 +212,8 @@ Add metrics to the analytics. Send monitor request. +Returns a :ref:`POGRResponse` object that has a :ref:`POGRResponse.finished` signal that is emitted when finished. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_pogrresponse.rst b/classes/class_pogrresponse.rst index 5d86ee955c0..c8c0a7e7ef2 100644 --- a/classes/class_pogrresponse.rst +++ b/classes/class_pogrresponse.rst @@ -12,14 +12,14 @@ POGRResponse **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -A response from a pogr.io request. +Response from a :ref:`POGRClient` call. .. rst-class:: classref-introduction-group Description ----------- -A response from a pogr.io request. +Response from a :ref:`POGRClient` call. Await on :ref:`finished` signal to get the :ref:`POGRResult`. .. rst-class:: classref-section-separator diff --git a/classes/class_pogrresult.rst b/classes/class_pogrresult.rst index dbd23f0876e..b37f5033c39 100644 --- a/classes/class_pogrresult.rst +++ b/classes/class_pogrresult.rst @@ -12,14 +12,14 @@ POGRResult **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -A result from a response from a pogr.io request. +A result from a :ref:`POGRResponse`. .. rst-class:: classref-introduction-group Description ----------- -A result from a response from a pogr.io request. +A result from a :ref:`POGRResponse`. Contains either result or error. .. rst-class:: classref-reftable-group @@ -66,7 +66,7 @@ Property Descriptions - :ref:`String` **get_error**\ (\ ) -The error message, if any. +The error message. .. rst-class:: classref-item-separator @@ -82,7 +82,7 @@ The error message, if any. - :ref:`String` **get_result**\ (\ ) -The result, if any. +The result. .. rst-class:: classref-section-separator diff --git a/classes/class_viewlobbyresponse.rst b/classes/class_viewlobbyresponse.rst index f4254e9e9e1..8ccd8868178 100644 --- a/classes/class_viewlobbyresponse.rst +++ b/classes/class_viewlobbyresponse.rst @@ -12,14 +12,14 @@ ViewLobbyResponse **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -View response from a lobby request. +Response from a :ref:`LobbyClient` call. .. rst-class:: classref-introduction-group Description ----------- -View response from a lobby request. Await on finished to get the result. +Response from a :ref:`LobbyClient` call. Await on :ref:`finished` signal to get the :ref:`ViewLobbyResult`. .. rst-class:: classref-section-separator