@@ -1279,6 +1279,22 @@ def _post(
1279
1279
json = payload
1280
1280
)
1281
1281
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
+
1282
1298
def get_bots (self , ** query ) -> HTTPResponse :
1283
1299
"""|httpres|\n
1284
1300
Gets a list of bots on this service.
@@ -1312,9 +1328,9 @@ def get_bot(self, bot_id: str) -> HTTPResponse:
1312
1328
requires_token = True
1313
1329
)
1314
1330
1315
- def get_bot_votes (self , bot_id : str ) -> HTTPResponse :
1331
+ def get_bot_stats (self , bot_id : str ) -> HTTPResponse :
1316
1332
"""|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.
1318
1334
1319
1335
Parameters
1320
1336
-----------
@@ -1323,58 +1339,42 @@ def get_bot_votes(self, bot_id: str) -> HTTPResponse:
1323
1339
"""
1324
1340
return self ._request (
1325
1341
method = 'GET' ,
1326
- path = f'/bots/{ bot_id } /votes ' ,
1342
+ path = f'/bots/{ bot_id } /stats ' ,
1327
1343
headers = {'Authorization' : self .token },
1328
1344
requires_token = True
1329
1345
)
1330
1346
1331
- def user_voted (self , bot_id : str , user_id : str ) -> HTTPResponse :
1347
+ def get_bot_votes (self , bot_id : str ) -> HTTPResponse :
1332
1348
"""|httpres|\n
1333
1349
Gets the list of people who voted this bot on this service.
1334
1350
1335
1351
Parameters
1336
1352
-----------
1337
1353
bot_id: :class:`str`
1338
1354
The bot's ID.
1339
- user_id: :class:`str`
1340
- The user's ID.
1341
1355
"""
1342
1356
return self ._request (
1343
1357
method = 'GET' ,
1344
- path = f'/bots/{ bot_id } /check' ,
1345
- query = {'userId' : user_id },
1358
+ path = f'/bots/{ bot_id } /votes' ,
1346
1359
headers = {'Authorization' : self .token },
1347
1360
requires_token = True
1348
1361
)
1349
1362
1350
- def get_bot_stats (self , bot_id : str ) -> HTTPResponse :
1363
+ def user_voted (self , bot_id : str , user_id : str ) -> HTTPResponse :
1351
1364
"""|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.
1353
1366
1354
1367
Parameters
1355
1368
-----------
1356
1369
bot_id: :class:`str`
1357
1370
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
- -----------
1372
1371
user_id: :class:`str`
1373
1372
The user's ID.
1374
1373
"""
1375
1374
return self ._request (
1376
1375
method = 'GET' ,
1377
- path = f'/users/{ user_id } ' ,
1376
+ path = f'/bots/{ bot_id } /check' ,
1377
+ query = {'userId' : user_id },
1378
1378
headers = {'Authorization' : self .token },
1379
1379
requires_token = True
1380
1380
)
0 commit comments