ossapi 5.1.2__tar.gz → 5.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. {ossapi-5.1.2 → ossapi-5.1.3}/PKG-INFO +1 -1
  2. {ossapi-5.1.2 → ossapi-5.1.3}/ossapi/models.py +1 -1
  3. {ossapi-5.1.2 → ossapi-5.1.3}/ossapi/ossapiv2.py +11 -2
  4. {ossapi-5.1.2 → ossapi-5.1.3}/ossapi.egg-info/PKG-INFO +1 -1
  5. {ossapi-5.1.2 → ossapi-5.1.3}/pyproject.toml +1 -1
  6. {ossapi-5.1.2 → ossapi-5.1.3}/tests/test_endpoints.py +2 -0
  7. {ossapi-5.1.2 → ossapi-5.1.3}/.gitignore +0 -0
  8. {ossapi-5.1.2 → ossapi-5.1.3}/.nojekyll +0 -0
  9. {ossapi-5.1.2 → ossapi-5.1.3}/LICENSE +0 -0
  10. {ossapi-5.1.2 → ossapi-5.1.3}/Makefile +0 -0
  11. {ossapi-5.1.2 → ossapi-5.1.3}/README.md +0 -0
  12. {ossapi-5.1.2 → ossapi-5.1.3}/docs/_static/custom.css +0 -0
  13. {ossapi-5.1.2 → ossapi-5.1.3}/docs/advanced.rst +0 -0
  14. {ossapi-5.1.2 → ossapi-5.1.3}/docs/api-reference.rst +0 -0
  15. {ossapi-5.1.2 → ossapi-5.1.3}/docs/async.rst +0 -0
  16. {ossapi-5.1.2 → ossapi-5.1.3}/docs/beatmap packs.rst +0 -0
  17. {ossapi-5.1.2 → ossapi-5.1.3}/docs/beatmaps.rst +0 -0
  18. {ossapi-5.1.2 → ossapi-5.1.3}/docs/beatmapsets.rst +0 -0
  19. {ossapi-5.1.2 → ossapi-5.1.3}/docs/changelog.rst +0 -0
  20. {ossapi-5.1.2 → ossapi-5.1.3}/docs/chat.rst +0 -0
  21. {ossapi-5.1.2 → ossapi-5.1.3}/docs/comments.rst +0 -0
  22. {ossapi-5.1.2 → ossapi-5.1.3}/docs/conf.py +0 -0
  23. {ossapi-5.1.2 → ossapi-5.1.3}/docs/creating-a-client.rst +0 -0
  24. {ossapi-5.1.2 → ossapi-5.1.3}/docs/domains.rst +0 -0
  25. {ossapi-5.1.2 → ossapi-5.1.3}/docs/endpoints.rst +0 -0
  26. {ossapi-5.1.2 → ossapi-5.1.3}/docs/events.rst +0 -0
  27. {ossapi-5.1.2 → ossapi-5.1.3}/docs/expandable-models.rst +0 -0
  28. {ossapi-5.1.2 → ossapi-5.1.3}/docs/foreign-keys.rst +0 -0
  29. {ossapi-5.1.2 → ossapi-5.1.3}/docs/forums.rst +0 -0
  30. {ossapi-5.1.2 → ossapi-5.1.3}/docs/friends.rst +0 -0
  31. {ossapi-5.1.2 → ossapi-5.1.3}/docs/generate_docs.py +0 -0
  32. {ossapi-5.1.2 → ossapi-5.1.3}/docs/generate_readme_list.py +0 -0
  33. {ossapi-5.1.2 → ossapi-5.1.3}/docs/grants.rst +0 -0
  34. {ossapi-5.1.2 → ossapi-5.1.3}/docs/home.rst +0 -0
  35. {ossapi-5.1.2 → ossapi-5.1.3}/docs/index.rst +0 -0
  36. {ossapi-5.1.2 → ossapi-5.1.3}/docs/matches.rst +0 -0
  37. {ossapi-5.1.2 → ossapi-5.1.3}/docs/me.rst +0 -0
  38. {ossapi-5.1.2 → ossapi-5.1.3}/docs/news.rst +0 -0
  39. {ossapi-5.1.2 → ossapi-5.1.3}/docs/oauth.rst +0 -0
  40. {ossapi-5.1.2 → ossapi-5.1.3}/docs/pagination.rst +0 -0
  41. {ossapi-5.1.2 → ossapi-5.1.3}/docs/quickstart.rst +0 -0
  42. {ossapi-5.1.2 → ossapi-5.1.3}/docs/rankings.rst +0 -0
  43. {ossapi-5.1.2 → ossapi-5.1.3}/docs/rooms.rst +0 -0
  44. {ossapi-5.1.2 → ossapi-5.1.3}/docs/scores.rst +0 -0
  45. {ossapi-5.1.2 → ossapi-5.1.3}/docs/seasonal backgrounds.rst +0 -0
  46. {ossapi-5.1.2 → ossapi-5.1.3}/docs/serializing-models.rst +0 -0
  47. {ossapi-5.1.2 → ossapi-5.1.3}/docs/spotlights.rst +0 -0
  48. {ossapi-5.1.2 → ossapi-5.1.3}/docs/users.rst +0 -0
  49. {ossapi-5.1.2 → ossapi-5.1.3}/docs/wiki.rst +0 -0
  50. {ossapi-5.1.2 → ossapi-5.1.3}/ossapi/__init__.py +0 -0
  51. {ossapi-5.1.2 → ossapi-5.1.3}/ossapi/encoder.py +0 -0
  52. {ossapi-5.1.2 → ossapi-5.1.3}/ossapi/enums.py +0 -0
  53. {ossapi-5.1.2 → ossapi-5.1.3}/ossapi/mod.py +0 -0
  54. {ossapi-5.1.2 → ossapi-5.1.3}/ossapi/ossapi.py +0 -0
  55. {ossapi-5.1.2 → ossapi-5.1.3}/ossapi/ossapiv2_async.py +0 -0
  56. {ossapi-5.1.2 → ossapi-5.1.3}/ossapi/replay.py +0 -0
  57. {ossapi-5.1.2 → ossapi-5.1.3}/ossapi/utils.py +0 -0
  58. {ossapi-5.1.2 → ossapi-5.1.3}/ossapi.egg-info/SOURCES.txt +0 -0
  59. {ossapi-5.1.2 → ossapi-5.1.3}/ossapi.egg-info/dependency_links.txt +0 -0
  60. {ossapi-5.1.2 → ossapi-5.1.3}/ossapi.egg-info/requires.txt +0 -0
  61. {ossapi-5.1.2 → ossapi-5.1.3}/ossapi.egg-info/top_level.txt +0 -0
  62. {ossapi-5.1.2 → ossapi-5.1.3}/setup.cfg +0 -0
  63. {ossapi-5.1.2 → ossapi-5.1.3}/tests/__init__.py +0 -0
  64. {ossapi-5.1.2 → ossapi-5.1.3}/tests/test_cursor.py +0 -0
  65. {ossapi-5.1.2 → ossapi-5.1.3}/tests/test_models.py +0 -0
  66. {ossapi-5.1.2 → ossapi-5.1.3}/tests/test_v1.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ossapi
3
- Version: 5.1.2
3
+ Version: 5.1.3
4
4
  Summary: Complete python wrapper for osu! api v2 and v1.
5
5
  Author-email: Liam DeVoe <orionldevoe@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/tybug/ossapi
@@ -1520,7 +1520,7 @@ class RoomLeaderboardUserScore(RoomLeaderboardScore):
1520
1520
 
1521
1521
  class RoomLeaderboard(Model):
1522
1522
  leaderboard: List[RoomLeaderboardScore]
1523
- user_score: RoomLeaderboardUserScore
1523
+ user_score: Optional[RoomLeaderboardUserScore]
1524
1524
 
1525
1525
 
1526
1526
  class Match(Model):
@@ -2491,7 +2491,9 @@ class Ossapi:
2491
2491
  return self._get(Room, f"/rooms/{room_id}")
2492
2492
 
2493
2493
  @request(Scope.PUBLIC, requires_user=True, category="rooms")
2494
- def room_leaderboard(self, room_id: RoomIdT) -> RoomLeaderboard:
2494
+ def room_leaderboard(
2495
+ self, room_id: RoomIdT, limit: Optional[int] = None, page: Optional[int] = None
2496
+ ) -> RoomLeaderboard:
2495
2497
  """
2496
2498
  Get the leaderboard of a room.
2497
2499
 
@@ -2499,13 +2501,20 @@ class Ossapi:
2499
2501
  ----------
2500
2502
  room_id
2501
2503
  The room to get the leaderboard of.
2504
+ limit
2505
+ Maximum number of room scores to return.
2506
+ offset
2507
+ Offset for pagination.
2502
2508
 
2503
2509
  Notes
2504
2510
  -----
2505
2511
  Implements the `Get Room Leaderboard
2506
2512
  <https://osu.ppy.sh/docs/index.html#roomsroomleaderboard>`__ endpoint.
2507
2513
  """
2508
- return self._get(RoomLeaderboard, f"/rooms/{room_id}/leaderboard")
2514
+ params = {"limit": limit, "page": page}
2515
+ return self._get(
2516
+ RoomLeaderboard, f"/rooms/{room_id}/leaderboard", params=params
2517
+ )
2509
2518
 
2510
2519
  @request(Scope.PUBLIC, requires_user=True, category="rooms")
2511
2520
  def rooms(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ossapi
3
- Version: 5.1.2
3
+ Version: 5.1.3
4
4
  Summary: Complete python wrapper for osu! api v2 and v1.
5
5
  Author-email: Liam DeVoe <orionldevoe@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/tybug/ossapi
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ossapi"
3
- version = "5.1.2"
3
+ version = "5.1.3"
4
4
  description = "Complete python wrapper for osu! api v2 and v1."
5
5
  readme = "README.md"
6
6
  keywords = ["osu!", "wrapper", "api", "python"]
@@ -356,6 +356,8 @@ class TestRoomLeaderboard(TestCaseAuthorizationCode):
356
356
  def test_deserialize(self):
357
357
  # https://osu.ppy.sh/multiplayer/rooms/232594
358
358
  api_full.room_leaderboard(232594)
359
+ # https://osu.ppy.sh/multiplayer/rooms/1222586 (daily challenge)
360
+ api_full.room_leaderboard(1222586, page=10)
359
361
 
360
362
 
361
363
  class TestRooms(TestCaseAuthorizationCode):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes