TornAPIWrapper 2.14.0__tar.gz → 2.16.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.14.0/src/TornAPIWrapper.egg-info → tornapiwrapper-2.16.0}/PKG-INFO +2 -2
  2. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/README.md +1 -1
  3. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/__init__.py +2 -2
  4. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints/faction.py +28 -1
  5. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints/torn.py +44 -0
  6. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints_async/faction.py +28 -1
  7. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints_async/torn.py +44 -0
  8. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/params/map.py +1 -0
  9. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/type_hints.py +1 -0
  10. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0/src/TornAPIWrapper.egg-info}/PKG-INFO +2 -2
  11. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/LICENSE +0 -0
  12. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/pyproject.toml +0 -0
  13. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/setup.cfg +0 -0
  14. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/__main__.py +0 -0
  15. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/client.py +0 -0
  16. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/client_async.py +0 -0
  17. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints/__init__.py +0 -0
  18. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints/company.py +0 -0
  19. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints/forum.py +0 -0
  20. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints/key.py +0 -0
  21. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints/market.py +0 -0
  22. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints/property.py +0 -0
  23. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints/racing.py +0 -0
  24. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints/user.py +0 -0
  25. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints_async/__init__.py +0 -0
  26. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints_async/company.py +0 -0
  27. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints_async/forum.py +0 -0
  28. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints_async/key.py +0 -0
  29. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints_async/market.py +0 -0
  30. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints_async/property.py +0 -0
  31. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints_async/racing.py +0 -0
  32. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/endpoints_async/user.py +0 -0
  33. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/errors.py +0 -0
  34. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/params/__init__.py +0 -0
  35. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/params/builders.py +0 -0
  36. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper/text_response_endpoints.py +0 -0
  37. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper.egg-info/SOURCES.txt +0 -0
  38. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper.egg-info/dependency_links.txt +0 -0
  39. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.0}/src/TornAPIWrapper.egg-info/requires.txt +0 -0
  40. {tornapiwrapper-2.14.0 → tornapiwrapper-2.16.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.14.0
3
+ Version: 2.16.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-17.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-20.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-17.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-20.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.14.0"
30
- __patch__ = "17.08.2026"
29
+ __version__ = "2.16.0"
30
+ __patch__ = "20.08.2026"
31
31
 
32
32
  from .errors import (
33
33
  WrapperError,
@@ -28,7 +28,8 @@ from typing import TYPE_CHECKING
28
28
 
29
29
  from ..params.builders import build_params
30
30
  from ..type_hints import SortOptions, FacScopeCatOptions, AttackFiltersOptions, FacContributorsStatOptions, \
31
- FacCrimesCatOptions, FacCrimesFiltersOptions, FacNewsCatOptions, ReportCatOptions, FacWarChainsCatOptions
31
+ FacCrimesCatOptions, FacCrimesFiltersOptions, FacNewsCatOptions, ReportCatOptions, FacWarChainsCatOptions, \
32
+ FacInventoryCatOptions
32
33
 
33
34
  if TYPE_CHECKING:
34
35
  from ..client import TornAPIWrapper
@@ -170,6 +171,17 @@ class Faction:
170
171
  """
171
172
  return self.api.request("/faction/contributors", build_params(self.get_contributors, locals()))
172
173
 
174
+ def get_crimeexp(self, timestamp: int = None, comment: str = None) -> dict:
175
+ """
176
+ Get your faction members crime experience.
177
+ API key (Minimal).
178
+ :param timestamp: Timestamp to bypass cache.
179
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
180
+ :return: API response data.
181
+ :rtype: dict
182
+ """
183
+ return self.api.request("/faction/crimeexp", build_params(self.get_crimeexp, locals()))
184
+
173
185
  def get_crimes(self, crimes_category: FacCrimesCatOptions = "all", crimes_filter: FacCrimesFiltersOptions = None, limit: int = 20, offset: int = 0, sort: SortOptions = "DESC", to: int = None, from_: int = None, timestamp: int = None, comment: str = None) -> dict:
174
186
  """
175
187
  Get your faction's organized crimes.
@@ -230,6 +242,21 @@ class Faction:
230
242
  """
231
243
  return self.api.request("/faction/hof", build_params(self.get_hof, locals()))
232
244
 
245
+ def get_inventory(self, armory_category: FacInventoryCatOptions, limit: int = 20, offset: int = 0, timestamp: int = None, comment: str = None) -> dict:
246
+ """
247
+ Get your faction's inventory items.
248
+ API key (Limited).
249
+ Cached selection (1 hour, all items cached at once).
250
+ :param armory_category: Armory category.
251
+ :param limit: Number of results to return.
252
+ :param offset: Number of rows to skip before returning results.
253
+ :param timestamp: Timestamp to bypass cache.
254
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
255
+ :return: API response data.
256
+ :rtype: dict
257
+ """
258
+ return self.api.request("/faction/inventory", build_params(self.get_inventory, locals()))
259
+
233
260
  def get_members(self, faction_id: int = None, striptags: bool = True, timestamp: int = None, comment: str = None) -> dict:
234
261
  """
235
262
  Get a list of members for your faction or a specific faction.
@@ -54,6 +54,17 @@ class Torn:
54
54
  """
55
55
  return self.api.request("/torn/attacklog", build_params(self.get_attacklog, locals()))
56
56
 
57
+ def get_bank(self, timestamp: int = None, comment: str = None) -> dict:
58
+ """
59
+ Get current bank rates.
60
+ API key (Public).
61
+ :param timestamp: Timestamp to bypass cache.
62
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
63
+ :return: API response data.
64
+ :rtype: dict
65
+ """
66
+ return self.api.request("/torn/bank", build_params(self.get_bank, locals()))
67
+
57
68
  def get_bounties(self, limit: int = 100, offset: int = 0, timestamp: int = None, comment: str = None) -> dict:
58
69
  """
59
70
  Get bounties.
@@ -79,6 +90,28 @@ class Torn:
79
90
  """
80
91
  return self.api.request("/torn/calendar", build_params(self.get_calendar, locals()))
81
92
 
93
+ def get_cards(self, timestamp: int = None, comment: str = None) -> dict:
94
+ """
95
+ Get casino playing cards.
96
+ API key (Public).
97
+ :param timestamp: Timestamp to bypass cache.
98
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
99
+ :return: API response data.
100
+ :rtype: dict
101
+ """
102
+ return self.api.request("/torn/cards", build_params(self.get_cards, locals()))
103
+
104
+ def get_cityshops(self, timestamp: int = None, comment: str = None) -> dict:
105
+ """
106
+ Get city shops stock information.
107
+ API key (Public).
108
+ :param timestamp: Timestamp to bypass cache.
109
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
110
+ :return: API response data.
111
+ :rtype: dict
112
+ """
113
+ return self.api.request("/torn/cityshops", build_params(self.get_cityshops, locals()))
114
+
82
115
  def get_companies(self, timestamp: int = None, comment: str = None) -> dict:
83
116
  """
84
117
  Get all companies details.
@@ -323,6 +356,17 @@ class Torn:
323
356
  """
324
357
  return self.api.request("/torn/organizedcrimes", build_params(self.get_organizedcrimes, locals()))
325
358
 
359
+ def get_pokertables(self, timestamp: int = None, comment: str = None) -> dict:
360
+ """
361
+ Get active poker tables.
362
+ API key (Public).
363
+ :param timestamp: Timestamp to bypass cache.
364
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
365
+ :return: API response data.
366
+ :rtype: dict
367
+ """
368
+ return self.api.request("/torn/pokertables", build_params(self.get_pokertables, locals()))
369
+
326
370
  def get_properties(self, timestamp: int = None, comment: str = None) -> dict:
327
371
  """
328
372
  Get properties details.
@@ -28,7 +28,8 @@ from typing import TYPE_CHECKING
28
28
 
29
29
  from ..params.builders import build_params
30
30
  from ..type_hints import SortOptions, FacScopeCatOptions, AttackFiltersOptions, FacContributorsStatOptions, \
31
- FacCrimesCatOptions, FacCrimesFiltersOptions, FacNewsCatOptions, ReportCatOptions, FacWarChainsCatOptions
31
+ FacCrimesCatOptions, FacCrimesFiltersOptions, FacNewsCatOptions, ReportCatOptions, FacWarChainsCatOptions, \
32
+ FacInventoryCatOptions
32
33
 
33
34
  if TYPE_CHECKING:
34
35
  from ..client_async import TornAPIWrapperAsync
@@ -170,6 +171,17 @@ class Faction:
170
171
  """
171
172
  return await self.api.request("/faction/contributors", build_params(self.get_contributors, locals()))
172
173
 
174
+ async def get_crimeexp(self, timestamp: int = None, comment: str = None) -> dict:
175
+ """
176
+ Get your faction members crime experience.
177
+ API key (Minimal).
178
+ :param timestamp: Timestamp to bypass cache.
179
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
180
+ :return: API response data.
181
+ :rtype: dict
182
+ """
183
+ return await self.api.request("/faction/crimeexp", build_params(self.get_crimeexp, locals()))
184
+
173
185
  async def get_crimes(self, crimes_category: FacCrimesCatOptions = "all", crimes_filter: FacCrimesFiltersOptions = None, limit: int = 20, offset: int = 0, sort: SortOptions = "DESC", to: int = None, from_: int = None, timestamp: int = None, comment: str = None) -> dict:
174
186
  """
175
187
  Get your faction's organized crimes.
@@ -230,6 +242,21 @@ class Faction:
230
242
  """
231
243
  return await self.api.request("/faction/hof", build_params(self.get_hof, locals()))
232
244
 
245
+ async def get_inventory(self, armory_category: FacInventoryCatOptions, limit: int = 20, offset: int = 0, timestamp: int = None, comment: str = None) -> dict:
246
+ """
247
+ Get your faction's inventory items.
248
+ API key (Limited).
249
+ Cached selection (1 hour, all items cached at once).
250
+ :param armory_category: Armory category.
251
+ :param limit: Number of results to return.
252
+ :param offset: Number of rows to skip before returning results.
253
+ :param timestamp: Timestamp to bypass cache.
254
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
255
+ :return: API response data.
256
+ :rtype: dict
257
+ """
258
+ return await self.api.request("/faction/inventory", build_params(self.get_inventory, locals()))
259
+
233
260
  async def get_members(self, faction_id: int = None, striptags: bool = True, timestamp: int = None, comment: str = None) -> dict:
234
261
  """
235
262
  Get a list of members for your faction or a specific faction.
@@ -54,6 +54,17 @@ class Torn:
54
54
  """
55
55
  return await self.api.request("/torn/attacklog", build_params(self.get_attacklog, locals()))
56
56
 
57
+ async def get_bank(self, timestamp: int = None, comment: str = None) -> dict:
58
+ """
59
+ Get current bank rates.
60
+ API key (Public).
61
+ :param timestamp: Timestamp to bypass cache.
62
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
63
+ :return: API response data.
64
+ :rtype: dict
65
+ """
66
+ return await self.api.request("/torn/bank", build_params(self.get_bank, locals()))
67
+
57
68
  async def get_bounties(self, limit: int = 100, offset: int = 0, timestamp: int = None, comment: str = None) -> dict:
58
69
  """
59
70
  Get bounties.
@@ -79,6 +90,28 @@ class Torn:
79
90
  """
80
91
  return await self.api.request("/torn/calendar", build_params(self.get_calendar, locals()))
81
92
 
93
+ async def get_cards(self, timestamp: int = None, comment: str = None) -> dict:
94
+ """
95
+ Get casino playing cards.
96
+ API key (Public).
97
+ :param timestamp: Timestamp to bypass cache.
98
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
99
+ :return: API response data.
100
+ :rtype: dict
101
+ """
102
+ return await self.api.request("/torn/cards", build_params(self.get_cards, locals()))
103
+
104
+ async def get_cityshops(self, timestamp: int = None, comment: str = None) -> dict:
105
+ """
106
+ Get city shops stock information.
107
+ API key (Public).
108
+ :param timestamp: Timestamp to bypass cache.
109
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
110
+ :return: API response data.
111
+ :rtype: dict
112
+ """
113
+ return await self.api.request("/torn/cityshops", build_params(self.get_cityshops, locals()))
114
+
82
115
  async def get_companies(self, timestamp: int = None, comment: str = None) -> dict:
83
116
  """
84
117
  Get all companies details.
@@ -323,6 +356,17 @@ class Torn:
323
356
  """
324
357
  return await self.api.request("/torn/organizedcrimes", build_params(self.get_organizedcrimes, locals()))
325
358
 
359
+ async def get_pokertables(self, timestamp: int = None, comment: str = None) -> dict:
360
+ """
361
+ Get active poker tables.
362
+ API key (Public).
363
+ :param timestamp: Timestamp to bypass cache.
364
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
365
+ :return: API response data.
366
+ :rtype: dict
367
+ """
368
+ return await self.api.request("/torn/pokertables", build_params(self.get_pokertables, locals()))
369
+
326
370
  async def get_properties(self, timestamp: int = None, comment: str = None) -> dict:
327
371
  """
328
372
  Get properties details.
@@ -28,6 +28,7 @@ param_id = {
28
28
  "user_id",
29
29
  }
30
30
  param_cat = {
31
+ "armory_category",
31
32
  "balance_category",
32
33
  "bazaar_category",
33
34
  "car_category",
@@ -40,6 +40,7 @@ FacScopeCatOptions = Literal["all", "current"]
40
40
  FacWarChainsCatOptions = Literal["active", "complete"]
41
41
  FacCrimesFiltersOptions = Literal["created_at", "executed_at", "ready_at", "expired_at"]
42
42
  FacCrimesCatOptions = Literal["all", "recruiting", "planning", "failure", "successful", "expired", "available", "completed"]
43
+ FacInventoryCatOptions = Literal["weapons", "armor", "temporary", "medical", "consumables", "drugs", "boosters", "utilities", "loot"]
43
44
  FacNewsCatOptions = Literal["main", "attack", "armoryDeposit", "armoryAction", "territoryWar", "rankedWar", "territoryGain", "chain", "crime", "membership", "depositFunds", "giveFunds"]
44
45
  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"]
45
46
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TornAPIWrapper
3
- Version: 2.14.0
3
+ Version: 2.16.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-17.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-20.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