Skip to content

Commit 84d1e9e

Browse files
committed
palworld.py comment update
Updated the comments to make it clear where the Asynch data retrieval is actually happening.
1 parent 6bca621 commit 84d1e9e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

opengsq/protocols/palworld.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class Palworld(ProtocolBase):
1010
"""
11-
This class represents the Palworld Protocol. It provides methods to interact with the Palworld Rest API.
11+
This class represents the Palworld Protocol. It provides methods to interact with the Palworld REST API.
1212
"""
1313

1414
full_name = "Palworld Protocol"
@@ -36,6 +36,9 @@ def __init__(self, host: str, port: int, api_username: str, api_password: str, t
3636
self.api_password = api_password
3737

3838
async def api_request(self,url):
39+
"""
40+
Asynchronously retrieves data from the game server through the REST API.
41+
"""
3942
auth = aiohttp.BasicAuth(self.api_username,self.api_password)
4043
async with aiohttp.ClientSession(auth=auth) as session:
4144
async with session.get(url) as response:
@@ -44,7 +47,7 @@ async def api_request(self,url):
4447

4548
async def get_status(self) -> Status:
4649
"""
47-
Asynchronously retrieves the status of the game server. The status includes the server state, name, player count and max player count.
50+
Retrieves the status of the game server. The status includes the server state, name, player count and max player count.
4851
"""
4952
info_data = await self.api_request(f"{self.api_url}/info")
5053
metrics_data = await self.api_request(f"{self.api_url}/metrics")

0 commit comments

Comments
 (0)