OpenMLBB 4.0.3__tar.gz → 4.0.4__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.
@@ -0,0 +1,71 @@
1
+ # OpenMLBB Python SDK
2
+
3
+ OpenMLBB is the official Python SDK for `https://mlbb.rone.dev/api`.
4
+
5
+ - API base: `https://mlbb.rone.dev/api`
6
+ - Docs: `https://mlbb.rone.dev/openmlbb`
7
+ - Groups: `academy`, `mlbb`, `user`, `addon`
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ pip install OpenMLBB
13
+ ```
14
+
15
+ ## Quick Start
16
+
17
+ ```python
18
+ from OpenMLBB import OpenMLBB
19
+
20
+ client = OpenMLBB()
21
+
22
+ heroes = client.mlbb.heroes(size=5, index=1, order="desc", lang="en")
23
+ academy_roles = client.academy.roles(lang="en")
24
+ win_rate = client.addon.win_rate_calculator(match_now=100, wr_now=50, wr_future=60)
25
+
26
+ print(heroes)
27
+ print(academy_roles)
28
+ print(win_rate)
29
+ ```
30
+
31
+ Every SDK method returns API JSON as a Python dictionary.
32
+
33
+ ## Endpoint Coverage
34
+
35
+ OpenMLBB follows the same route coverage as API routers:
36
+
37
+ - `academy`: version, heroes, roles, equipment, spells, emblems, ranks, recommendations, ratings
38
+ - `mlbb`: heroes list, rank, positions, details, stats, combos, trends, relations, counters, compatibility
39
+ - `user`: auth, profile, stats, privacy, season, matches, hero matches, friends
40
+ - `addon`: win-rate calculator, IP lookup
41
+
42
+ See the interactive SDK docs at `https://mlbb.rone.dev/openmlbb` for endpoint-by-endpoint usage examples.
43
+
44
+ ## Common Examples
45
+
46
+ ```python
47
+ from OpenMLBB import OpenMLBB
48
+
49
+ client = OpenMLBB()
50
+
51
+ # academy
52
+ academy_version = client.academy.meta_version(size=20, index=1, order="desc", lang="en")
53
+
54
+ # mlbb
55
+ hero_list = client.mlbb.heroes(size=10, index=1, order="desc", lang="en")
56
+
57
+ # addon
58
+ wr_calc = client.addon.win_rate_calculator(match_now=100, wr_now=50, wr_future=60)
59
+
60
+ print(academy_version)
61
+ print(hero_list)
62
+ print(wr_calc)
63
+ ```
64
+
65
+ ## User-Agent
66
+
67
+ The default `User-Agent` is:
68
+
69
+ `RoneAI-OpenMLBB-Python-SDK`
70
+
71
+ You can override it by passing `user_agent=` to `OpenMLBB(...)`.
@@ -1,3 +1,3 @@
1
1
  """Package version for OpenMLBB."""
2
2
 
3
- __version__ = "4.0.3"
3
+ __version__ = "4.0.4"
@@ -141,6 +141,9 @@ class AcademyClient:
141
141
  def heroes_ratings(self, **params: Any) -> dict[str, Any]:
142
142
  return self._transport.request("GET", "/academy/heroes/ratings", params=params)
143
143
 
144
+ def heroes_ratings_subject(self, subject: str, **params: Any) -> dict[str, Any]:
145
+ return self._transport.request("GET", f"/academy/heroes/ratings/{subject}", params=params)
146
+
144
147
 
145
148
  class MlbbClient:
146
149
  def __init__(self, transport: _Transport) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: OpenMLBB
3
- Version: 4.0.3
3
+ Version: 4.0.4
4
4
  Summary: Official Python SDK for the MLBB Public Data API
5
5
  Author: ridwaanhall
6
6
  License: BSD-3-Clause
@@ -20,6 +20,10 @@ Dynamic: license-file
20
20
 
21
21
  OpenMLBB is the official Python SDK for `https://mlbb.rone.dev/api`.
22
22
 
23
+ - API base: `https://mlbb.rone.dev/api`
24
+ - Docs: `https://mlbb.rone.dev/openmlbb`
25
+ - Groups: `academy`, `mlbb`, `user`, `addon`
26
+
23
27
  ## Install
24
28
 
25
29
  ```bash
@@ -44,6 +48,38 @@ print(win_rate)
44
48
 
45
49
  Every SDK method returns API JSON as a Python dictionary.
46
50
 
51
+ ## Endpoint Coverage
52
+
53
+ OpenMLBB follows the same route coverage as API routers:
54
+
55
+ - `academy`: version, heroes, roles, equipment, spells, emblems, ranks, recommendations, ratings
56
+ - `mlbb`: heroes list, rank, positions, details, stats, combos, trends, relations, counters, compatibility
57
+ - `user`: auth, profile, stats, privacy, season, matches, hero matches, friends
58
+ - `addon`: win-rate calculator, IP lookup
59
+
60
+ See the interactive SDK docs at `https://mlbb.rone.dev/openmlbb` for endpoint-by-endpoint usage examples.
61
+
62
+ ## Common Examples
63
+
64
+ ```python
65
+ from OpenMLBB import OpenMLBB
66
+
67
+ client = OpenMLBB()
68
+
69
+ # academy
70
+ academy_version = client.academy.meta_version(size=20, index=1, order="desc", lang="en")
71
+
72
+ # mlbb
73
+ hero_list = client.mlbb.heroes(size=10, index=1, order="desc", lang="en")
74
+
75
+ # addon
76
+ wr_calc = client.addon.win_rate_calculator(match_now=100, wr_now=50, wr_future=60)
77
+
78
+ print(academy_version)
79
+ print(hero_list)
80
+ print(wr_calc)
81
+ ```
82
+
47
83
  ## User-Agent
48
84
 
49
85
  The default `User-Agent` is:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: OpenMLBB
3
- Version: 4.0.3
3
+ Version: 4.0.4
4
4
  Summary: Official Python SDK for the MLBB Public Data API
5
5
  Author: ridwaanhall
6
6
  License: BSD-3-Clause
@@ -20,6 +20,10 @@ Dynamic: license-file
20
20
 
21
21
  OpenMLBB is the official Python SDK for `https://mlbb.rone.dev/api`.
22
22
 
23
+ - API base: `https://mlbb.rone.dev/api`
24
+ - Docs: `https://mlbb.rone.dev/openmlbb`
25
+ - Groups: `academy`, `mlbb`, `user`, `addon`
26
+
23
27
  ## Install
24
28
 
25
29
  ```bash
@@ -44,6 +48,38 @@ print(win_rate)
44
48
 
45
49
  Every SDK method returns API JSON as a Python dictionary.
46
50
 
51
+ ## Endpoint Coverage
52
+
53
+ OpenMLBB follows the same route coverage as API routers:
54
+
55
+ - `academy`: version, heroes, roles, equipment, spells, emblems, ranks, recommendations, ratings
56
+ - `mlbb`: heroes list, rank, positions, details, stats, combos, trends, relations, counters, compatibility
57
+ - `user`: auth, profile, stats, privacy, season, matches, hero matches, friends
58
+ - `addon`: win-rate calculator, IP lookup
59
+
60
+ See the interactive SDK docs at `https://mlbb.rone.dev/openmlbb` for endpoint-by-endpoint usage examples.
61
+
62
+ ## Common Examples
63
+
64
+ ```python
65
+ from OpenMLBB import OpenMLBB
66
+
67
+ client = OpenMLBB()
68
+
69
+ # academy
70
+ academy_version = client.academy.meta_version(size=20, index=1, order="desc", lang="en")
71
+
72
+ # mlbb
73
+ hero_list = client.mlbb.heroes(size=10, index=1, order="desc", lang="en")
74
+
75
+ # addon
76
+ wr_calc = client.addon.win_rate_calculator(match_now=100, wr_now=50, wr_future=60)
77
+
78
+ print(academy_version)
79
+ print(hero_list)
80
+ print(wr_calc)
81
+ ```
82
+
47
83
  ## User-Agent
48
84
 
49
85
  The default `User-Agent` is:
@@ -36,6 +36,7 @@ This API & Web provides access to hero analytics, in-game performance data, acad
36
36
  | Website Home | [mlbb.rone.dev](https://mlbb.rone.dev) | Main landing page with quick access to Demo Website and API Docs. |
37
37
  | Tutorial and Blog | [mlbb.rone.dev/blog](https://mlbb.rone.dev/blog) | Guides, tutorials, and release/changelog posts. |
38
38
  | Web Playground | [mlbb.rone.dev/web](https://mlbb.rone.dev/web) | Interactive endpoint workspace for executing API requests from browser forms. |
39
+ | OpenMLBB SDK Docs | [mlbb.rone.dev/openmlbb](https://mlbb.rone.dev/openmlbb) | Structured Python SDK docs for academy, mlbb, user, and addon clients with endpoint-level examples. |
39
40
  | Swagger UI | [mlbb.rone.dev/api/docs](https://mlbb.rone.dev/api/docs) | OpenAPI-powered docs with live request execution and authorization support. |
40
41
  | ReDoc | [mlbb.rone.dev/api/redoc](https://mlbb.rone.dev/api/redoc) | Alternative API documentation view optimized for reference reading. |
41
42
  | OpenAPI JSON | [mlbb.rone.dev/api/openapi.json](https://mlbb.rone.dev/api/openapi.json) | Raw OpenAPI schema for tooling, SDK generation, and integrations. |
@@ -60,6 +61,11 @@ https://mlbb.rone.dev/web/user # User endpoints playground
60
61
  https://mlbb.rone.dev/web/mlbb # MLBB endpoints playground
61
62
  https://mlbb.rone.dev/web/academy # Academy endpoints playground
62
63
  https://mlbb.rone.dev/web/addon # Addon endpoints playground
64
+ https://mlbb.rone.dev/openmlbb # OpenMLBB docs (redirects to /openmlbb/user)
65
+ https://mlbb.rone.dev/openmlbb/user # OpenMLBB user client docs
66
+ https://mlbb.rone.dev/openmlbb/mlbb # OpenMLBB mlbb client docs
67
+ https://mlbb.rone.dev/openmlbb/academy # OpenMLBB academy client docs
68
+ https://mlbb.rone.dev/openmlbb/addon # OpenMLBB addon client docs
63
69
  https://mlbb.rone.dev/api # API index/status
64
70
  https://mlbb.rone.dev/api/docs # Swagger UI
65
71
  https://mlbb.rone.dev/api/redoc # ReDoc
@@ -98,15 +104,14 @@ SDK defaults:
98
104
  ### Automated Release Rules (4.x.x)
99
105
 
100
106
  - Workflow file: `.github/workflows/python-publish.yml`
107
+ - Version source for release/tag/PyPI: `API_VERSION` default in `app/core/config.py`
101
108
  - Version tags use format: `4.x.x` (no `v` prefix)
102
109
  - Push behavior:
103
- - Add `[release]` in commit message to trigger publish flow.
104
- - Without `[release]`, workflow skips release/tag/publish.
105
- - Branch behavior when `[release]` is used:
106
- - `main` branch creates stable release (`4.0.1`, `4.0.2`, ...)
107
- - non-`main` branch creates prerelease (`4.0.1rc1`, `4.0.1rc2`, ...)
108
- - Manual behavior:
109
- - Run `workflow_dispatch` and set `publish=true` for forced release.
110
+ - `main` branch creates stable GitHub release and publishes to PyPI.
111
+ - non-`main` branch creates prerelease only when `ENABLE_NON_MAIN_PRERELEASE="true"`.
112
+ - Update process:
113
+ - Manually set the next version in `app/core/config.py` before pushing release commit.
114
+ - Workflow still automates release build, tag, GitHub release, and PyPI publish.
110
115
 
111
116
  ## API Coverage
112
117
 
@@ -299,5 +299,112 @@ def test_navbar_includes_tutorial_button() -> None:
299
299
  response = client.get("/web/user")
300
300
 
301
301
  assert response.status_code == 200
302
- assert ">Tutorial<" in response.text
302
+ assert "Tutorial" in response.text
303
303
  assert "href=\"/blog\"" in response.text
304
+
305
+
306
+ def test_openmlbb_page_is_available() -> None:
307
+ home_response = client.get("/openmlbb")
308
+ assert home_response.status_code == 200
309
+ assert "OpenMLBB SDK" in home_response.text
310
+ assert "pip install OpenMLBB" in home_response.text
311
+ assert '/openmlbb/user' in home_response.text
312
+
313
+ response = client.get("/openmlbb/academy/meta/version")
314
+
315
+ assert response.status_code == 200
316
+ assert "OpenMLBB SDK Docs" in response.text
317
+ assert "client.academy.meta_version" in response.text
318
+ assert "Path and Query Parameters" in response.text
319
+
320
+
321
+ def test_openmlbb_group_pages_cover_all_clients() -> None:
322
+ for group in WEB_GROUPS:
323
+ response = client.get(f"/openmlbb/{group}")
324
+ assert response.status_code == 200
325
+ assert "OpenMLBB" in response.text
326
+ assert f"/openmlbb/{group}" in response.text
327
+
328
+ user_page = client.get("/openmlbb/user")
329
+ assert user_page.status_code == 200
330
+ assert "client.user.login" in user_page.text
331
+
332
+ mlbb_page = client.get("/openmlbb/mlbb")
333
+ assert mlbb_page.status_code == 200
334
+ assert "client.mlbb.heroes" in mlbb_page.text
335
+
336
+ addon_page = client.get("/openmlbb/addon")
337
+ assert addon_page.status_code == 200
338
+ assert "client.addon.win_rate_calculator" in addon_page.text
339
+
340
+
341
+ def test_openmlbb_hub_includes_group_cards_and_copy_button() -> None:
342
+ response = client.get("/openmlbb")
343
+
344
+ assert response.status_code == 200
345
+ assert 'data-copy-pip-install' in response.text
346
+ assert '/openmlbb/user' in response.text
347
+ assert '/openmlbb/mlbb' in response.text
348
+ assert '/openmlbb/academy' in response.text
349
+ assert '/openmlbb/addon' in response.text
350
+
351
+
352
+ def test_openmlbb_endpoint_card_has_open_only_this_and_show_more() -> None:
353
+ response = client.get("/openmlbb/academy/meta/version")
354
+
355
+ assert response.status_code == 200
356
+ assert "Open Only This" in response.text
357
+ assert 'data-desc-toggle' in response.text
358
+ assert "overflow-hidden" in response.text
359
+ assert "Show more" in response.text
360
+
361
+
362
+ def test_landing_page_highlights_openmlbb_install() -> None:
363
+ response = client.get("/")
364
+
365
+ assert response.status_code == 200
366
+ assert "pip install OpenMLBB" in response.text
367
+ assert "Official Python SDK" in response.text
368
+ assert 'data-copy-pip-install' in response.text
369
+
370
+
371
+ def test_blog_list_includes_v4_0_4_release_notes() -> None:
372
+ response = client.get("/blog")
373
+
374
+ assert response.status_code == 200
375
+ assert "MLBB API Web v4.0.4 Release Notes (3.2.3 -&gt; 4.0.4)" in response.text or "MLBB API Web v4.0.4 Release Notes (3.2.3 -> 4.0.4)" in response.text
376
+
377
+
378
+ def test_blog_detail_v4_0_4_release_notes_no_commit_hash() -> None:
379
+ response = client.get("/blog/mlbb-api-web-v4-0-4-release-notes-3-2-3-4-0-4")
380
+
381
+ assert response.status_code == 200
382
+ assert "Version move: 3.2.3 -&gt; 4.0.4" in response.text or "Version move: 3.2.3 -> 4.0.4" in response.text
383
+ assert "OpenMLBB SDK documentation" in response.text
384
+ assert "799250329d76cefce207c7ed425f2606c5d57a62" not in response.text
385
+
386
+
387
+ def test_navbar_includes_openmlbb_button_between_card_and_tutorial() -> None:
388
+ response = client.get("/web/user")
389
+
390
+ assert response.status_code == 200
391
+ card_idx = response.text.find('href="https://mlbb-card.rone.dev"')
392
+ openmlbb_idx = response.text.find('href="/openmlbb"')
393
+ tutorial_idx = response.text.find('href="/blog"')
394
+
395
+ assert card_idx != -1
396
+ assert openmlbb_idx != -1
397
+ assert tutorial_idx != -1
398
+ assert card_idx < openmlbb_idx < tutorial_idx
399
+ assert 'href="/openmlbb"' in response.text
400
+ assert "OpenMLBB" in response.text
401
+
402
+
403
+ def test_navbar_group_links_follow_openmlbb_namespace() -> None:
404
+ response = client.get("/openmlbb/user")
405
+
406
+ assert response.status_code == 200
407
+ assert 'href="/openmlbb/user"' in response.text
408
+ assert 'href="/openmlbb/mlbb"' in response.text
409
+ assert 'href="/openmlbb/academy"' in response.text
410
+ assert 'href="/openmlbb/addon"' in response.text
@@ -1,35 +0,0 @@
1
- # OpenMLBB Python SDK
2
-
3
- OpenMLBB is the official Python SDK for `https://mlbb.rone.dev/api`.
4
-
5
- ## Install
6
-
7
- ```bash
8
- pip install OpenMLBB
9
- ```
10
-
11
- ## Quick Start
12
-
13
- ```python
14
- from OpenMLBB import OpenMLBB
15
-
16
- client = OpenMLBB()
17
-
18
- heroes = client.mlbb.heroes(size=5, index=1, order="desc", lang="en")
19
- academy_roles = client.academy.roles(lang="en")
20
- win_rate = client.addon.win_rate_calculator(match_now=100, wr_now=50, wr_future=60)
21
-
22
- print(heroes)
23
- print(academy_roles)
24
- print(win_rate)
25
- ```
26
-
27
- Every SDK method returns API JSON as a Python dictionary.
28
-
29
- ## User-Agent
30
-
31
- The default `User-Agent` is:
32
-
33
- `RoneAI-OpenMLBB-Python-SDK`
34
-
35
- You can override it by passing `user_agent=` to `OpenMLBB(...)`.
File without changes
File without changes
File without changes