Skip to content

Commit a4967bd

Browse files
committed
chore(TopGG): reorder functions
1 parent 90bc426 commit a4967bd

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

dbots/service.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,22 @@ def _post(
12791279
json=payload
12801280
)
12811281

1282+
def get_user(self, user_id: str) -> HTTPResponse:
1283+
"""|httpres|\n
1284+
Gets the user listed on this service.
1285+
1286+
Parameters
1287+
-----------
1288+
user_id: :class:`str`
1289+
The user's ID.
1290+
"""
1291+
return self._request(
1292+
method='GET',
1293+
path=f'/users/{user_id}',
1294+
headers={'Authorization': self.token},
1295+
requires_token=True
1296+
)
1297+
12821298
def get_bots(self, **query) -> HTTPResponse:
12831299
"""|httpres|\n
12841300
Gets a list of bots on this service.
@@ -1312,9 +1328,9 @@ def get_bot(self, bot_id: str) -> HTTPResponse:
13121328
requires_token=True
13131329
)
13141330

1315-
def get_bot_votes(self, bot_id: str) -> HTTPResponse:
1331+
def get_bot_stats(self, bot_id: str) -> HTTPResponse:
13161332
"""|httpres|\n
1317-
Gets the list of people who voted this bot on this service.
1333+
Gets the bot's stats listed on this service.
13181334
13191335
Parameters
13201336
-----------
@@ -1323,58 +1339,42 @@ def get_bot_votes(self, bot_id: str) -> HTTPResponse:
13231339
"""
13241340
return self._request(
13251341
method='GET',
1326-
path=f'/bots/{bot_id}/votes',
1342+
path=f'/bots/{bot_id}/stats',
13271343
headers={'Authorization': self.token},
13281344
requires_token=True
13291345
)
13301346

1331-
def user_voted(self, bot_id: str, user_id: str) -> HTTPResponse:
1347+
def get_bot_votes(self, bot_id: str) -> HTTPResponse:
13321348
"""|httpres|\n
13331349
Gets the list of people who voted this bot on this service.
13341350
13351351
Parameters
13361352
-----------
13371353
bot_id: :class:`str`
13381354
The bot's ID.
1339-
user_id: :class:`str`
1340-
The user's ID.
13411355
"""
13421356
return self._request(
13431357
method='GET',
1344-
path=f'/bots/{bot_id}/check',
1345-
query={'userId': user_id},
1358+
path=f'/bots/{bot_id}/votes',
13461359
headers={'Authorization': self.token},
13471360
requires_token=True
13481361
)
13491362

1350-
def get_bot_stats(self, bot_id: str) -> HTTPResponse:
1363+
def user_voted(self, bot_id: str, user_id: str) -> HTTPResponse:
13511364
"""|httpres|\n
1352-
Gets the bot's stats listed on this service.
1365+
Gets the list of people who voted this bot on this service.
13531366
13541367
Parameters
13551368
-----------
13561369
bot_id: :class:`str`
13571370
The bot's ID.
1358-
"""
1359-
return self._request(
1360-
method='GET',
1361-
path=f'/bots/{bot_id}/stats',
1362-
headers={'Authorization': self.token},
1363-
requires_token=True
1364-
)
1365-
1366-
def get_user(self, user_id: str) -> HTTPResponse:
1367-
"""|httpres|\n
1368-
Gets the user listed on this service.
1369-
1370-
Parameters
1371-
-----------
13721371
user_id: :class:`str`
13731372
The user's ID.
13741373
"""
13751374
return self._request(
13761375
method='GET',
1377-
path=f'/users/{user_id}',
1376+
path=f'/bots/{bot_id}/check',
1377+
query={'userId': user_id},
13781378
headers={'Authorization': self.token},
13791379
requires_token=True
13801380
)

0 commit comments

Comments
 (0)