TornAPIWrapper 2.12.0__tar.gz → 2.14.0__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 (40) hide show
  1. {tornapiwrapper-2.12.0/src/TornAPIWrapper.egg-info → tornapiwrapper-2.14.0}/PKG-INFO +2 -2
  2. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/README.md +1 -1
  3. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/__init__.py +2 -2
  4. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints/company.py +1 -1
  5. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints/faction.py +65 -9
  6. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints/torn.py +44 -0
  7. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints/user.py +31 -2
  8. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints_async/company.py +1 -1
  9. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints_async/faction.py +65 -9
  10. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints_async/torn.py +44 -0
  11. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints_async/user.py +31 -2
  12. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/params/map.py +2 -2
  13. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/type_hints.py +2 -2
  14. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0/src/TornAPIWrapper.egg-info}/PKG-INFO +2 -2
  15. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/LICENSE +0 -0
  16. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/pyproject.toml +0 -0
  17. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/setup.cfg +0 -0
  18. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/__main__.py +0 -0
  19. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/client.py +0 -0
  20. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/client_async.py +0 -0
  21. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints/__init__.py +0 -0
  22. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints/forum.py +0 -0
  23. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints/key.py +0 -0
  24. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints/market.py +0 -0
  25. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints/property.py +0 -0
  26. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints/racing.py +0 -0
  27. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints_async/__init__.py +0 -0
  28. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints_async/forum.py +0 -0
  29. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints_async/key.py +0 -0
  30. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints_async/market.py +0 -0
  31. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints_async/property.py +0 -0
  32. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/endpoints_async/racing.py +0 -0
  33. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/errors.py +0 -0
  34. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/params/__init__.py +0 -0
  35. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/params/builders.py +0 -0
  36. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper/text_response_endpoints.py +0 -0
  37. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper.egg-info/SOURCES.txt +0 -0
  38. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper.egg-info/dependency_links.txt +0 -0
  39. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper.egg-info/requires.txt +0 -0
  40. {tornapiwrapper-2.12.0 → tornapiwrapper-2.14.0}/src/TornAPIWrapper.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TornAPIWrapper
3
- Version: 2.12.0
3
+ Version: 2.14.0
4
4
  Summary: A Python wrapper for the Torn City API, providing access to Torn City data.
5
5
  Author: cxdzc
6
6
  License: The MIT License (MIT)
@@ -53,7 +53,7 @@ Dynamic: license-file
53
53
  <a href="https://pypi.org/project/TornAPIWrapper/"><img src=https://img.shields.io/pypi/v/tornapiwrapper?cacheSeconds=300></a>
54
54
  <a href="https://pypi.org/project/TornAPIWrapper/"><img src=https://img.shields.io/pypi/pyversions/tornapiwrapper?cacheSeconds=300></a>
55
55
  <a href="https://pypi.org/project/TornAPIWrapper/"><img src=https://img.shields.io/pepy/dt/tornapiwrapper?color=blue&cacheSeconds=300></a>
56
- <a href="https://www.torn.com/api.html#:~:text=Patch%20Notes"><img src=https://img.shields.io/badge/patch-06.08.2026-c4c4c4?cacheSeconds=300></a>
56
+ <a href="https://www.torn.com/api.html#:~:text=Patch%20Notes"><img src=https://img.shields.io/badge/patch-17.08.2026-c4c4c4?cacheSeconds=300></a>
57
57
  <a rel="license" href="https://github.com/cxdzc/TornAPIWrapper/blob/main/LICENSE"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-ab1436"/></a>
58
58
  </div>
59
59
 
@@ -6,7 +6,7 @@
6
6
  <a href="https://pypi.org/project/TornAPIWrapper/"><img src=https://img.shields.io/pypi/v/tornapiwrapper?cacheSeconds=300></a>
7
7
  <a href="https://pypi.org/project/TornAPIWrapper/"><img src=https://img.shields.io/pypi/pyversions/tornapiwrapper?cacheSeconds=300></a>
8
8
  <a href="https://pypi.org/project/TornAPIWrapper/"><img src=https://img.shields.io/pepy/dt/tornapiwrapper?color=blue&cacheSeconds=300></a>
9
- <a href="https://www.torn.com/api.html#:~:text=Patch%20Notes"><img src=https://img.shields.io/badge/patch-06.08.2026-c4c4c4?cacheSeconds=300></a>
9
+ <a href="https://www.torn.com/api.html#:~:text=Patch%20Notes"><img src=https://img.shields.io/badge/patch-17.08.2026-c4c4c4?cacheSeconds=300></a>
10
10
  <a rel="license" href="https://github.com/cxdzc/TornAPIWrapper/blob/main/LICENSE"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-ab1436"/></a>
11
11
  </div>
12
12
 
@@ -26,8 +26,8 @@ __author__ = "cxdzc"
26
26
  __copyright__ = "Copyright 2023-Present cxdzc"
27
27
  __license__ = "MIT"
28
28
  __title__ = "TornAPIWrapper"
29
- __version__ = "2.12.0"
30
- __patch__ = "06.08.2026"
29
+ __version__ = "2.14.0"
30
+ __patch__ = "17.08.2026"
31
31
 
32
32
  from .errors import (
33
33
  WrapperError,
@@ -68,7 +68,7 @@ class Company:
68
68
  def get_news(self, news_category: CpnyNewsCatOptions, striptags: bool = False, limit: int = 100, sort: SortOptions = "DESC", to: int = None, from_: int = None, timestamp: int = None, comment: str = None) -> dict:
69
69
  """
70
70
  Get your company's news details.
71
- API key (Minimal).
71
+ API key (Limited).
72
72
  :param news_category: News category type.
73
73
  :param striptags: Determines if fields include HTML or not ('Hospitalized by user' vs 'Hospitalized by user').
74
74
  :param limit: Number of results to return.
@@ -27,8 +27,8 @@ from __future__ import annotations
27
27
  from typing import TYPE_CHECKING
28
28
 
29
29
  from ..params.builders import build_params
30
- from ..type_hints import SortOptions, FacCatScopeOptions, AttackFiltersOptions, FacContributorsStatOptions, \
31
- FacCrimesCatOptions, FacCrimesFiltersOptions, FacNewsCatOptions, ReportCatOptions, FacWarfareCatOptions
30
+ from ..type_hints import SortOptions, FacScopeCatOptions, AttackFiltersOptions, FacContributorsStatOptions, \
31
+ FacCrimesCatOptions, FacCrimesFiltersOptions, FacNewsCatOptions, ReportCatOptions, FacWarChainsCatOptions
32
32
 
33
33
  if TYPE_CHECKING:
34
34
  from ..client import TornAPIWrapper
@@ -87,7 +87,7 @@ class Faction:
87
87
  """
88
88
  return self.api.request("/faction/attacksfull", build_params(self.get_attacksfull, locals()))
89
89
 
90
- def get_balance(self, balance_category: FacCatScopeOptions = "current", timestamp: int = None, comment: str = None) -> dict:
90
+ def get_balance(self, balance_category: FacScopeCatOptions = "current", timestamp: int = None, comment: str = None) -> dict:
91
91
  """
92
92
  Get your faction's & member's balance details.
93
93
  Requires faction API access permissions.
@@ -156,7 +156,7 @@ class Faction:
156
156
  """
157
157
  return self.api.request("/faction/chainreport", build_params(self.get_chainreport, locals()))
158
158
 
159
- def get_contributors(self, stat_key: FacContributorsStatOptions, contributors_category: FacCatScopeOptions = "current", timestamp: int = None, comment: str = None) -> dict:
159
+ def get_contributors(self, stat_key: FacContributorsStatOptions, contributors_category: FacScopeCatOptions = "current", timestamp: int = None, comment: str = None) -> dict:
160
160
  """
161
161
  Get your faction's challenge contributors.
162
162
  Requires faction API access permissions.
@@ -207,6 +207,17 @@ class Faction:
207
207
  """
208
208
  return self.api.request("/faction/crime", build_params(self.get_crime, locals()))
209
209
 
210
+ def get_dirtybombs(self, timestamp: int = None, comment: str = None) -> dict:
211
+ """
212
+ Get all dirty bombs.
213
+ API key (Public).
214
+ :param timestamp: Timestamp to bypass cache.
215
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
216
+ :return: API response data.
217
+ :rtype: dict
218
+ """
219
+ return self.api.request("/faction/dirtybombs", build_params(self.get_dirtybombs, locals()))
220
+
210
221
  def get_hof(self, faction_id: int = None, timestamp: int = None, comment: str = None) -> dict:
211
222
  """
212
223
  Get the hall of fame rankings for your faction or a specific faction.
@@ -493,22 +504,67 @@ class Faction:
493
504
  """
494
505
  return self.api.request("/faction/upgrades", build_params(self.get_upgrades, locals()))
495
506
 
496
- def get_warfare(self, warfare_category: FacWarfareCatOptions, limit: int = 100, sort: SortOptions = "DESC", to: int = None, from_: int = None, timestamp: int = None, comment: str = None) -> dict:
507
+ def get_warfarechains(self, warfare_chains_category: FacWarChainsCatOptions = "active", limit: int = 100, sort: SortOptions = "DESC", to: int = None, from_: int = None, timestamp: int = None, comment: str = None) -> dict:
508
+ """
509
+ Get all chains.
510
+ API key (Public).
511
+ By default, active chains are returned.
512
+ :param warfare_chains_category: Specify whether to return active or completed chains.
513
+ :param limit: Number of results to return.
514
+ :param sort: Sorted by the greatest timestamps.
515
+ :param from_: Timestamp that sets the lower limit for the data returned. Data returned will be after this time.
516
+ :param to: Timestamp that sets the upper limit for the data returned. Data returned will be up to and including this time.
517
+ :param timestamp: Timestamp to bypass cache.
518
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
519
+ :return: API response data.
520
+ :rtype: dict
521
+ """
522
+ return self.api.request("/faction/warfarechains", build_params(self.get_warfarechains, locals()))
523
+
524
+ def get_warfareraids(self, limit: int = 100, sort: SortOptions = None, to: int = None, from_: int = None, timestamp: int = None, comment: str = None) -> dict:
525
+ """
526
+ Get all raids.
527
+ API key (Public).
528
+ :param limit: Number of results to return.
529
+ :param sort: Sorted by the greatest timestamps.
530
+ :param from_: Timestamp that sets the lower limit for the data returned. Data returned will be after this time.
531
+ :param to: Timestamp that sets the upper limit for the data returned. Data returned will be up to and including this time.
532
+ :param timestamp: Timestamp to bypass cache.
533
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
534
+ :return: API response data.
535
+ :rtype: dict
536
+ """
537
+ return self.api.request("/faction/warfareraids", build_params(self.get_warfareraids, locals()))
538
+
539
+ def get_warfareranked(self, limit: int = 100, sort: SortOptions = None, to: int = None, from_: int = None, timestamp: int = None, comment: str = None) -> dict:
497
540
  """
498
- Get faction warfare.
541
+ Get all ranked wars.
499
542
  API key (Public).
500
- The response depends on the selected category.
501
- :param warfare_category: Warefare categories.
502
543
  :param limit: Number of results to return.
503
544
  :param sort: Sorted by the greatest timestamps.
545
+ :param from_: Timestamp that sets the lower limit for the data returned. Data returned will be after this time.
504
546
  :param to: Timestamp that sets the upper limit for the data returned. Data returned will be up to and including this time.
547
+ :param timestamp: Timestamp to bypass cache.
548
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
549
+ :return: API response data.
550
+ :rtype: dict
551
+ """
552
+ return self.api.request("/faction/warfareranked", build_params(self.get_warfareranked, locals()))
553
+
554
+ def get_warfareterritory(self, limit: int = 100, sort: SortOptions = None, to: int = None, from_: int = None, timestamp: int = None, comment: str = None) -> dict:
555
+ """
556
+ Get all territory wars.
557
+ API key (Public).
558
+ :param limit: Number of results to return.
559
+ :param sort: Sorted by the greatest timestamps.
505
560
  :param from_: Timestamp that sets the lower limit for the data returned. Data returned will be after this time.
561
+ :param to: Timestamp that sets the upper limit for the data returned. Data returned will be up to and including this time.
506
562
  :param timestamp: Timestamp to bypass cache.
507
563
  :param comment: Comment for your tool/service/bot/website to be visible in the logs.
508
564
  :return: API response data.
509
565
  :rtype: dict
510
566
  """
511
- return self.api.request("/faction/warfare", build_params(self.get_warfare, locals()))
567
+ return self.api.request("/faction/warfareterritory", build_params(self.get_warfareterritory, locals()))
512
568
 
513
569
  def get_wars(self, faction_id: int = None, timestamp: int = None, comment: str = None) -> dict:
514
570
  """
@@ -79,6 +79,17 @@ class Torn:
79
79
  """
80
80
  return self.api.request("/torn/calendar", build_params(self.get_calendar, locals()))
81
81
 
82
+ def get_companies(self, timestamp: int = None, comment: str = None) -> dict:
83
+ """
84
+ Get all companies details.
85
+ API key (Public).
86
+ :param timestamp: Timestamp to bypass cache.
87
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
88
+ :return: API response data.
89
+ :rtype: dict
90
+ """
91
+ return self.api.request("/torn/companies", build_params(self.get_companies, locals()))
92
+
82
93
  def get_crimes(self, timestamp: int = None, comment: str = None) -> dict:
83
94
  """
84
95
  Get crimes information.
@@ -152,6 +163,17 @@ class Torn:
152
163
  """
153
164
  return self.api.request("/torn/factiontree", build_params(self.get_factiontree, locals()))
154
165
 
166
+ def get_gyms(self, timestamp: int = None, comment: str = None) -> dict:
167
+ """
168
+ Get all gyms.
169
+ API key (Public).
170
+ :param timestamp: Timestamp to bypass cache.
171
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
172
+ :return: API response data.
173
+ :rtype: dict
174
+ """
175
+ return self.api.request("/torn/gyms", build_params(self.get_gyms, locals()))
176
+
155
177
  def get_honors(self, honor_ids: list[int] = None, limit: int = 20, offset: int = 0, sort: SortOptions = None, timestamp: int = None, comment: str = None) -> dict:
156
178
  """
157
179
  Get all honors or specific honors.
@@ -312,6 +334,28 @@ class Torn:
312
334
  """
313
335
  return self.api.request("/torn/properties", build_params(self.get_properties, locals()))
314
336
 
337
+ def get_searchforcash(self, timestamp: int = None, comment: str = None) -> dict:
338
+ """
339
+ Get search for cash crime statuses.
340
+ API key (Public).
341
+ :param timestamp: Timestamp to bypass cache.
342
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
343
+ :return: API response data.
344
+ :rtype: dict
345
+ """
346
+ return self.api.request("/torn/searchforcash", build_params(self.get_searchforcash, locals()))
347
+
348
+ def get_shoplifting(self, timestamp: int = None, comment: str = None) -> dict:
349
+ """
350
+ Get shoplifting crime statuses
351
+ API key (Public).
352
+ :param timestamp: Timestamp to bypass cache.
353
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
354
+ :return: API response data.
355
+ :rtype: dict
356
+ """
357
+ return self.api.request("/torn/shoplifting", build_params(self.get_shoplifting, locals()))
358
+
315
359
  def get_stocks(self, stock_id: int = None, timestamp: int = None, comment: str = None) -> dict:
316
360
  """
317
361
  Get all stocks or specific stock with chart history.
@@ -339,6 +339,17 @@ class User:
339
339
  """
340
340
  return self.api.request("/user/forumthreads", build_params(self.get_forumthreads, locals()))
341
341
 
342
+ def get_gym(self, timestamp: int = None, comment: str = None) -> dict:
343
+ """
344
+ Get your currently active gym.
345
+ API key (Public).
346
+ :param timestamp: Timestamp to bypass cache.
347
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
348
+ :return: API response data.
349
+ :rtype: dict
350
+ """
351
+ return self.api.request("/user/gym", build_params(self.get_gym, locals()))
352
+
342
353
  def get_hof(self, user_id: int = None, timestamp: int = None, comment: str = None) -> dict:
343
354
  """
344
355
  Get your hall of fame rankings or for a specific player.
@@ -483,10 +494,12 @@ class User:
483
494
  """
484
495
  return self.api.request("/user/log", build_params(self.get_log, locals()))
485
496
 
486
- def get_medals(self, timestamp: int = None, comment: str = None) -> dict:
497
+ def get_medals(self, user_id: int = None, timestamp: int = None, comment: str = None) -> dict:
487
498
  """
488
- Get your achieved medals.
499
+ Get all your achieved medals or for a specific player.
489
500
  API key (Public).
501
+ Specific User - Returns only highest medal in each category (just like profiles on site).
502
+ :param user_id: User id or user discord id.
490
503
  :param timestamp: Timestamp to bypass cache.
491
504
  :param comment: Comment for your tool/service/bot/website to be visible in the logs.
492
505
  :return: API response data.
@@ -787,6 +800,22 @@ class User:
787
800
  """
788
801
  return self.api.request("/user/skills", build_params(self.get_skills, locals()))
789
802
 
803
+ def get_search(self, user_name: str = None, filters: list[str] = None, offset: int = 0, timestamp: int = None, comment: str = None) -> dict:
804
+ """
805
+ Search users by name or other criteria.
806
+ API key (Public).
807
+ This selection is standalone and cannot be used together with other selections.
808
+ It's always limited to return just 25 records.
809
+ :param user_name: The user's name you would like to search for.
810
+ :param filters: A filtering query parameter allowing a comma-separated list of filters.
811
+ :param offset: Number of rows to skip before returning results.
812
+ :param timestamp: Timestamp to bypass cache.
813
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
814
+ :return: API response data.
815
+ :rtype: dict
816
+ """
817
+ return self.api.request("/user/search", build_params(self.get_search, locals()))
818
+
790
819
  def get_snapshot(self, timestamp: int = None, comment: str = None) -> str:
791
820
  """
792
821
  Get daily active players snapshot CSV.
@@ -68,7 +68,7 @@ class Company:
68
68
  async def get_news(self, news_category: CpnyNewsCatOptions, striptags: bool = False, limit: int = 100, sort: SortOptions = "DESC", to: int = None, from_: int = None, timestamp: int = None, comment: str = None) -> dict:
69
69
  """
70
70
  Get your company's news details.
71
- API key (Minimal).
71
+ API key (Limited).
72
72
  :param news_category: News category type.
73
73
  :param striptags: Determines if fields include HTML or not ('Hospitalized by user' vs 'Hospitalized by user').
74
74
  :param limit: Number of results to return.
@@ -27,8 +27,8 @@ from __future__ import annotations
27
27
  from typing import TYPE_CHECKING
28
28
 
29
29
  from ..params.builders import build_params
30
- from ..type_hints import SortOptions, FacCatScopeOptions, AttackFiltersOptions, FacContributorsStatOptions, \
31
- FacCrimesCatOptions, FacCrimesFiltersOptions, FacNewsCatOptions, ReportCatOptions, FacWarfareCatOptions
30
+ from ..type_hints import SortOptions, FacScopeCatOptions, AttackFiltersOptions, FacContributorsStatOptions, \
31
+ FacCrimesCatOptions, FacCrimesFiltersOptions, FacNewsCatOptions, ReportCatOptions, FacWarChainsCatOptions
32
32
 
33
33
  if TYPE_CHECKING:
34
34
  from ..client_async import TornAPIWrapperAsync
@@ -87,7 +87,7 @@ class Faction:
87
87
  """
88
88
  return await self.api.request("/faction/attacksfull", build_params(self.get_attacksfull, locals()))
89
89
 
90
- async def get_balance(self, balance_category: FacCatScopeOptions = "current", timestamp: int = None, comment: str = None) -> dict:
90
+ async def get_balance(self, balance_category: FacScopeCatOptions = "current", timestamp: int = None, comment: str = None) -> dict:
91
91
  """
92
92
  Get your faction's & member's balance details.
93
93
  Requires faction API access permissions.
@@ -156,7 +156,7 @@ class Faction:
156
156
  """
157
157
  return await self.api.request("/faction/chainreport", build_params(self.get_chainreport, locals()))
158
158
 
159
- async def get_contributors(self, stat_key: FacContributorsStatOptions, contributors_category: FacCatScopeOptions = "current", timestamp: int = None, comment: str = None) -> dict:
159
+ async def get_contributors(self, stat_key: FacContributorsStatOptions, contributors_category: FacScopeCatOptions = "current", timestamp: int = None, comment: str = None) -> dict:
160
160
  """
161
161
  Get your faction's challenge contributors.
162
162
  Requires faction API access permissions.
@@ -207,6 +207,17 @@ class Faction:
207
207
  """
208
208
  return await self.api.request("/faction/crime", build_params(self.get_crime, locals()))
209
209
 
210
+ async def get_dirtybombs(self, timestamp: int = None, comment: str = None) -> dict:
211
+ """
212
+ Get all dirty bombs.
213
+ API key (Public).
214
+ :param timestamp: Timestamp to bypass cache.
215
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
216
+ :return: API response data.
217
+ :rtype: dict
218
+ """
219
+ return await self.api.request("/faction/dirtybombs", build_params(self.get_dirtybombs, locals()))
220
+
210
221
  async def get_hof(self, faction_id: int = None, timestamp: int = None, comment: str = None) -> dict:
211
222
  """
212
223
  Get the hall of fame rankings for your faction or a specific faction.
@@ -493,22 +504,67 @@ class Faction:
493
504
  """
494
505
  return await self.api.request("/faction/upgrades", build_params(self.get_upgrades, locals()))
495
506
 
496
- async def get_warfare(self, warfare_category: FacWarfareCatOptions, limit: int = 100, sort: SortOptions = "DESC", to: int = None, from_: int = None, timestamp: int = None, comment: str = None) -> dict:
507
+ async def get_warfarechains(self, warfare_chains_category: FacWarChainsCatOptions = "active", limit: int = 100, sort: SortOptions = "DESC", to: int = None, from_: int = None, timestamp: int = None, comment: str = None) -> dict:
508
+ """
509
+ Get all chains.
510
+ API key (Public).
511
+ By default, active chains are returned.
512
+ :param warfare_chains_category: Specify whether to return active or completed chains.
513
+ :param limit: Number of results to return.
514
+ :param sort: Sorted by the greatest timestamps.
515
+ :param from_: Timestamp that sets the lower limit for the data returned. Data returned will be after this time.
516
+ :param to: Timestamp that sets the upper limit for the data returned. Data returned will be up to and including this time.
517
+ :param timestamp: Timestamp to bypass cache.
518
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
519
+ :return: API response data.
520
+ :rtype: dict
521
+ """
522
+ return await self.api.request("/faction/warfarechains", build_params(self.get_warfarechains, locals()))
523
+
524
+ async def get_warfareraids(self, limit: int = 100, sort: SortOptions = None, to: int = None, from_: int = None, timestamp: int = None, comment: str = None) -> dict:
525
+ """
526
+ Get all raids.
527
+ API key (Public).
528
+ :param limit: Number of results to return.
529
+ :param sort: Sorted by the greatest timestamps.
530
+ :param from_: Timestamp that sets the lower limit for the data returned. Data returned will be after this time.
531
+ :param to: Timestamp that sets the upper limit for the data returned. Data returned will be up to and including this time.
532
+ :param timestamp: Timestamp to bypass cache.
533
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
534
+ :return: API response data.
535
+ :rtype: dict
536
+ """
537
+ return await self.api.request("/faction/warfareraids", build_params(self.get_warfareraids, locals()))
538
+
539
+ async def get_warfareranked(self, limit: int = 100, sort: SortOptions = None, to: int = None, from_: int = None, timestamp: int = None, comment: str = None) -> dict:
497
540
  """
498
- Get faction warfare.
541
+ Get all ranked wars.
499
542
  API key (Public).
500
- The response depends on the selected category.
501
- :param warfare_category: Warefare categories.
502
543
  :param limit: Number of results to return.
503
544
  :param sort: Sorted by the greatest timestamps.
545
+ :param from_: Timestamp that sets the lower limit for the data returned. Data returned will be after this time.
504
546
  :param to: Timestamp that sets the upper limit for the data returned. Data returned will be up to and including this time.
547
+ :param timestamp: Timestamp to bypass cache.
548
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
549
+ :return: API response data.
550
+ :rtype: dict
551
+ """
552
+ return await self.api.request("/faction/warfareranked", build_params(self.get_warfareranked, locals()))
553
+
554
+ async def get_warfareterritory(self, limit: int = 100, sort: SortOptions = None, to: int = None, from_: int = None, timestamp: int = None, comment: str = None) -> dict:
555
+ """
556
+ Get all territory wars.
557
+ API key (Public).
558
+ :param limit: Number of results to return.
559
+ :param sort: Sorted by the greatest timestamps.
505
560
  :param from_: Timestamp that sets the lower limit for the data returned. Data returned will be after this time.
561
+ :param to: Timestamp that sets the upper limit for the data returned. Data returned will be up to and including this time.
506
562
  :param timestamp: Timestamp to bypass cache.
507
563
  :param comment: Comment for your tool/service/bot/website to be visible in the logs.
508
564
  :return: API response data.
509
565
  :rtype: dict
510
566
  """
511
- return await self.api.request("/faction/warfare", build_params(self.get_warfare, locals()))
567
+ return await self.api.request("/faction/warfareterritory", build_params(self.get_warfareterritory, locals()))
512
568
 
513
569
  async def get_wars(self, faction_id: int = None, timestamp: int = None, comment: str = None) -> dict:
514
570
  """
@@ -79,6 +79,17 @@ class Torn:
79
79
  """
80
80
  return await self.api.request("/torn/calendar", build_params(self.get_calendar, locals()))
81
81
 
82
+ async def get_companies(self, timestamp: int = None, comment: str = None) -> dict:
83
+ """
84
+ Get all companies details.
85
+ API key (Public).
86
+ :param timestamp: Timestamp to bypass cache.
87
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
88
+ :return: API response data.
89
+ :rtype: dict
90
+ """
91
+ return await self.api.request("/torn/companies", build_params(self.get_companies, locals()))
92
+
82
93
  async def get_crimes(self, timestamp: int = None, comment: str = None) -> dict:
83
94
  """
84
95
  Get crimes information.
@@ -152,6 +163,17 @@ class Torn:
152
163
  """
153
164
  return await self.api.request("/torn/factiontree", build_params(self.get_factiontree, locals()))
154
165
 
166
+ async def get_gyms(self, timestamp: int = None, comment: str = None) -> dict:
167
+ """
168
+ Get all gyms.
169
+ API key (Public).
170
+ :param timestamp: Timestamp to bypass cache.
171
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
172
+ :return: API response data.
173
+ :rtype: dict
174
+ """
175
+ return await self.api.request("/torn/gyms", build_params(self.get_gyms, locals()))
176
+
155
177
  async def get_honors(self, honor_ids: list[int] = None, limit: int = 20, offset: int = 0, sort: SortOptions = None, timestamp: int = None, comment: str = None) -> dict:
156
178
  """
157
179
  Get all honors or specific honors.
@@ -312,6 +334,28 @@ class Torn:
312
334
  """
313
335
  return await self.api.request("/torn/properties", build_params(self.get_properties, locals()))
314
336
 
337
+ async def get_searchforcash(self, timestamp: int = None, comment: str = None) -> dict:
338
+ """
339
+ Get search for cash crime statuses.
340
+ API key (Public).
341
+ :param timestamp: Timestamp to bypass cache.
342
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
343
+ :return: API response data.
344
+ :rtype: dict
345
+ """
346
+ return await self.api.request("/torn/searchforcash", build_params(self.get_searchforcash, locals()))
347
+
348
+ async def get_shoplifting(self, timestamp: int = None, comment: str = None) -> dict:
349
+ """
350
+ Get shoplifting crime statuses
351
+ API key (Public).
352
+ :param timestamp: Timestamp to bypass cache.
353
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
354
+ :return: API response data.
355
+ :rtype: dict
356
+ """
357
+ return await self.api.request("/torn/shoplifting", build_params(self.get_shoplifting, locals()))
358
+
315
359
  async def get_stocks(self, stock_id: int = None, timestamp: int = None, comment: str = None) -> dict:
316
360
  """
317
361
  Get all stocks or specific stock with chart history.
@@ -339,6 +339,17 @@ class User:
339
339
  """
340
340
  return await self.api.request("/user/forumthreads", build_params(self.get_forumthreads, locals()))
341
341
 
342
+ async def get_gym(self, timestamp: int = None, comment: str = None) -> dict:
343
+ """
344
+ Get your currently active gym.
345
+ API key (Public).
346
+ :param timestamp: Timestamp to bypass cache.
347
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
348
+ :return: API response data.
349
+ :rtype: dict
350
+ """
351
+ return await self.api.request("/user/gym", build_params(self.get_gym, locals()))
352
+
342
353
  async def get_hof(self, user_id: int = None, timestamp: int = None, comment: str = None) -> dict:
343
354
  """
344
355
  Get your hall of fame rankings or for a specific player.
@@ -483,10 +494,12 @@ class User:
483
494
  """
484
495
  return await self.api.request("/user/log", build_params(self.get_log, locals()))
485
496
 
486
- async def get_medals(self, timestamp: int = None, comment: str = None) -> dict:
497
+ async def get_medals(self, user_id: int = None, timestamp: int = None, comment: str = None) -> dict:
487
498
  """
488
- Get your achieved medals.
499
+ Get all your achieved medals or for a specific player.
489
500
  API key (Public).
501
+ Specific User - Returns only highest medal in each category (just like profiles on site).
502
+ :param user_id: User id or user discord id.
490
503
  :param timestamp: Timestamp to bypass cache.
491
504
  :param comment: Comment for your tool/service/bot/website to be visible in the logs.
492
505
  :return: API response data.
@@ -787,6 +800,22 @@ class User:
787
800
  """
788
801
  return await self.api.request("/user/skills", build_params(self.get_skills, locals()))
789
802
 
803
+ async def get_search(self, user_name: str = None, filters: list[str] = None, offset: int = 0, timestamp: int = None, comment: str = None) -> dict:
804
+ """
805
+ Search users by name or other criteria.
806
+ API key (Public).
807
+ This selection is standalone and cannot be used together with other selections.
808
+ It's always limited to return just 25 records.
809
+ :param user_name: The user's name you would like to search for.
810
+ :param filters: A filtering query parameter allowing a comma-separated list of filters.
811
+ :param offset: Number of rows to skip before returning results.
812
+ :param timestamp: Timestamp to bypass cache.
813
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
814
+ :return: API response data.
815
+ :rtype: dict
816
+ """
817
+ return await self.api.request("/user/search", build_params(self.get_search, locals()))
818
+
790
819
  async def get_snapshot(self, timestamp: int = None, comment: str = None) -> str:
791
820
  """
792
821
  Get daily active players snapshot CSV.
@@ -1,6 +1,6 @@
1
1
  param_from = {"from_"}
2
2
  param_target = {"target_id"}
3
- param_name = {"company_name", "faction_name"}
3
+ param_name = {"company_name", "faction_name", "user_name"}
4
4
  param_stat = {"stat_key", "stat_keys"}
5
5
  param_log = {"attack_log_id", "log_id"}
6
6
  param_ids = {"category_ids", "honor_ids", "item_ids", "medals_ids", "territory_ids"}
@@ -43,7 +43,7 @@ param_cat = {
43
43
  "report_category",
44
44
  "stat_category",
45
45
  "trade_category",
46
- "warfare_category",
46
+ "warfare_chains_category",
47
47
  }
48
48
  param_group = {
49
49
  "from": param_from,
@@ -36,9 +36,9 @@ UserInventoryCatOptions = Literal["Collectible", "Clothing", "Other", "Tool", "M
36
36
  UserPrsnlStatsCatOptions = Literal["all", "popular", "attacking", "battle_stats", "jobs", "trading", "jail", "hospital", "finishing_hits", "communication", "crimes", "bounties", "investments", "items", "travel", "drugs", "missions", "racing", "networth", "other", "itemmarketcustomers", "itemmarketsales", "itemmarketrevenue", "itemmarketfees"]
37
37
  UserPrsnlStatsStatOptions = Literal["attackswon", "attackslost", "attacksdraw", "attacksassisted", "defendswon", "defendslost", "defendsstalemated", "elo", "yourunaway", "theyrunaway", "unarmoredwon", "bestkillstreak", "attackhits", "attackmisses", "attackdamage", "bestdamage", "onehitkills", "attackcriticalhits", "roundsfired", "specialammoused", "hollowammoused", "tracerammoused", "piercingammoused", "incendiaryammoused", "attacksstealthed", "retals", "moneymugged", "largestmug", "itemslooted", "highestbeaten", "respectforfaction", "rankedwarhits", "raidhits", "territoryjoins", "territoryclears", "territorytime", "jobpointsused", "trainsreceived", "marketitemsbought", "auctionswon", "auctionsells", "itemssent", "trades", "cityitemsbought", "pointsbought", "pointssold", "bazaarcustomers", "bazaarsales", "bazaarprofit", "jailed", "peoplebusted", "failedbusts", "peoplebought", "peopleboughtspent", "hospital", "medicalitemsused", "bloodwithdrawn", "reviveskill", "revives", "revivesreceived", "heavyhits", "machinehits", "riflehits", "smghits", "shotgunhits", "pistolhits", "temphits", "piercinghits", "slashinghits", "clubbinghits", "mechanicalhits", "h2hhits", "mailssent", "friendmailssent", "factionmailssent", "companymailssent", "spousemailssent", "classifiedadsplaced", "personalsplaced", "criminaloffensesold", "sellillegalgoods", "theftold", "autotheftcrime", "drugdealscrime", "computercrime", "fraudold", "murdercrime", "othercrime", "organizedcrimes", "bountiesplaced", "totalbountyspent", "bountiescollected", "totalbountyreward", "bountiesreceived", "receivedbountyvalue", "cityfinds", "dumpfinds", "itemsdumped", "booksread", "boostersused", "consumablesused", "candyused", "alcoholused", "energydrinkused", "statenhancersused", "eastereggsfound", "eastereggsused", "virusescoded", "traveltimes", "timespenttraveling", "itemsboughtabroad", "attackswonabroad", "defendslostabroad", "argtravel", "mextravel", "uaetravel", "hawtravel", "japtravel", "uktravel", "satravel", "switravel", "chitravel", "cantravel", "caytravel", "drugsused", "overdosed", "rehabs", "rehabcost", "cantaken", "exttaken", "kettaken", "lsdtaken", "opitaken", "pcptaken", "shrtaken", "spetaken", "victaken", "xantaken", "missionscompleted", "contractscompleted", "dukecontractscompleted", "missioncreditsearned", "racingskill", "racingpointsearned", "racesentered", "raceswon", "networth", "timeplayed", "activestreak", "bestactivestreak", "awards", "refills", "nerverefills", "tokenrefills", "meritsbought", "daysbeendonator", "criminaloffenses", "vandalism", "theft", "counterfeiting", "fraud", "illicitservices", "cybercrime", "extortion", "illegalproduction", "currentkillstreak", "strength", "defense", "speed", "dexterity", "totalstats", "manuallabor", "intelligence", "endurance", "totalworkingstats", "moneyinvested", "investedprofit", "investamount", "banktimeleft", "stockprofits", "stocklosses", "stockfees", "stocknetprofits", "stockpayouts", "networthwallet", "networthvault", "networthbank", "networthcayman", "networthpoints", "networthitems", "networthdisplaycase", "networthbazaar", "networthitemmarket", "networthproperties", "networthstockmarket", "networthauctionhouse", "networthbookie", "networthcompany", "networthenlistedcars", "networthpiggybank", "networthpending", "networthloan", "networthunpaidfees", "huntingskill", "searchforcashskill", "bootleggingskill", "graffitiskill", "shopliftingskill", "pickpocketingskill", "cardskimmingskill", "burglaryskill", "hustlingskill", "disposalskill", "crackingskill", "forgeryskill", "scammingskill", "arsonskill"]
38
38
 
39
- FacCatScopeOptions = Literal["all", "current"]
39
+ FacScopeCatOptions = Literal["all", "current"]
40
+ FacWarChainsCatOptions = Literal["active", "complete"]
40
41
  FacCrimesFiltersOptions = Literal["created_at", "executed_at", "ready_at", "expired_at"]
41
- FacWarfareCatOptions = Literal["ranked", "territory", "raid", "chain", "chainOngoing", "db"]
42
42
  FacCrimesCatOptions = Literal["all", "recruiting", "planning", "failure", "successful", "expired", "available", "completed"]
43
43
  FacNewsCatOptions = Literal["main", "attack", "armoryDeposit", "armoryAction", "territoryWar", "rankedWar", "territoryGain", "chain", "crime", "membership", "depositFunds", "giveFunds"]
44
44
  FacContributorsStatOptions = Literal["medicalitemsused", "criminaloffences", "organisedcrimerespect", "organisedcrimemoney", "organisedcrimesuccess", "organisedcrimefail", "attackswon", "attackslost", "attackschain", "attacksleave", "attacksmug", "attackshosp", "bestchain", "busts", "revives", "jails", "hosps", "medicalitemrecovery", "medicalcooldownused", "gymtrains", "gymstrength", "gymspeed", "gymenergy", "gymdefense", "gymdexterity", "candyused", "alcoholused", "energydrinkused", "drugsused", "drugoverdoses", "rehabs", "caymaninterest", "traveltimes", "traveltime", "hunting", "attacksdamagehits", "attacksdamage", "hosptimegiven", "hosptimereceived", "attacksdamaging", "attacksrunaway", "highestterritories", "territoryrespect", "membersamount", "factionage", "upgradesamount"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TornAPIWrapper
3
- Version: 2.12.0
3
+ Version: 2.14.0
4
4
  Summary: A Python wrapper for the Torn City API, providing access to Torn City data.
5
5
  Author: cxdzc
6
6
  License: The MIT License (MIT)
@@ -53,7 +53,7 @@ Dynamic: license-file
53
53
  <a href="https://pypi.org/project/TornAPIWrapper/"><img src=https://img.shields.io/pypi/v/tornapiwrapper?cacheSeconds=300></a>
54
54
  <a href="https://pypi.org/project/TornAPIWrapper/"><img src=https://img.shields.io/pypi/pyversions/tornapiwrapper?cacheSeconds=300></a>
55
55
  <a href="https://pypi.org/project/TornAPIWrapper/"><img src=https://img.shields.io/pepy/dt/tornapiwrapper?color=blue&cacheSeconds=300></a>
56
- <a href="https://www.torn.com/api.html#:~:text=Patch%20Notes"><img src=https://img.shields.io/badge/patch-06.08.2026-c4c4c4?cacheSeconds=300></a>
56
+ <a href="https://www.torn.com/api.html#:~:text=Patch%20Notes"><img src=https://img.shields.io/badge/patch-17.08.2026-c4c4c4?cacheSeconds=300></a>
57
57
  <a rel="license" href="https://github.com/cxdzc/TornAPIWrapper/blob/main/LICENSE"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-ab1436"/></a>
58
58
  </div>
59
59
 
File without changes