TornAPIWrapper 2.11.0__py3-none-any.whl → 2.13.0__py3-none-any.whl

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.
@@ -26,8 +26,8 @@ __author__ = "cxdzc"
26
26
  __copyright__ = "Copyright 2023-Present cxdzc"
27
27
  __license__ = "MIT"
28
28
  __title__ = "TornAPIWrapper"
29
- __version__ = "2.11.0"
30
- __patch__ = "27.07.2026"
29
+ __version__ = "2.13.0"
30
+ __patch__ = "12.08.2026"
31
31
 
32
32
  from .errors import (
33
33
  WrapperError,
@@ -112,6 +112,17 @@ class Market:
112
112
  """
113
113
  return self.api.request("/market/properties", build_params(self.get_properties, locals()))
114
114
 
115
+ def get_pointsmarket(self, timestamp: int = None, comment: str = None) -> dict:
116
+ """
117
+ Get points market listings.
118
+ API key (Public).
119
+ :param timestamp: Timestamp to bypass cache.
120
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
121
+ :return: API response data.
122
+ :rtype: dict
123
+ """
124
+ return self.api.request("/market/pointsmarket", build_params(self.get_pointsmarket, locals()))
125
+
115
126
  def get_rentals(self, property_type_id: int, limit: int = 20, offset: int = 0, sort: SortOptions = None, timestamp: int = None, comment: str = None) -> dict:
116
127
  """
117
128
  Get properties rental listings.
@@ -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.
@@ -554,6 +554,17 @@ class User:
554
554
  """
555
555
  return self.api.request("/user/newevents", build_params(self.get_newevents, locals()))
556
556
 
557
+ def get_networth(self, timestamp: int = None, comment: str = None) -> dict:
558
+ """
559
+ Get your networth.
560
+ API key (Limited).
561
+ :param timestamp: Timestamp to bypass cache.
562
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
563
+ :return: API response data.
564
+ :rtype: dict
565
+ """
566
+ return self.api.request("/user/networth", build_params(self.get_networth, locals()))
567
+
557
568
  def get_newmessages(self, timestamp: int = None, comment: str = None) -> dict:
558
569
  """
559
570
  Get your unseen messages.
@@ -599,6 +610,17 @@ class User:
599
610
  """
600
611
  return self.api.request("/user/organizedcrimes", build_params(self.get_organizedcrimes, locals()))
601
612
 
613
+ def get_perks(self, timestamp: int = None, comment: str = None) -> dict:
614
+ """
615
+ Get your current perks.
616
+ API key (Minimal).
617
+ :param timestamp: Timestamp to bypass cache.
618
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
619
+ :return: API response data.
620
+ :rtype: dict
621
+ """
622
+ return self.api.request("/user/perks", build_params(self.get_perks, locals()))
623
+
602
624
  def get_personalstats(self, user_id: int = None, stat_category: UserPrsnlStatsCatOptions = None, stat_keys: list[UserPrsnlStatsStatOptions] = None, timestamp: int = None, comment: str = None) -> dict:
603
625
  """
604
626
  Get your personal stats or for a specific user.
@@ -765,13 +787,29 @@ class User:
765
787
  """
766
788
  return self.api.request("/user/skills", build_params(self.get_skills, locals()))
767
789
 
790
+ def get_search(self, user_name: str = None, filters: list[str] = None, offset: int = 0, timestamp: int = None, comment: str = None) -> dict:
791
+ """
792
+ Search users by name or other criteria.
793
+ API key (Public).
794
+ This selection is standalone and cannot be used together with other selections.
795
+ It's always limited to return just 25 records.
796
+ :param user_name: The user's name you would like to search for.
797
+ :param filters: A filtering query parameter allowing a comma-separated list of filters.
798
+ :param offset: Number of rows to skip before returning results.
799
+ :param timestamp: Timestamp to bypass cache.
800
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
801
+ :return: API response data.
802
+ :rtype: dict
803
+ """
804
+ return self.api.request("/user/search", build_params(self.get_search, locals()))
805
+
768
806
  def get_snapshot(self, timestamp: int = None, comment: str = None) -> str:
769
807
  """
770
808
  Get daily active players snapshot CSV.
771
809
  API key (Public).
772
810
  Returns a CSV daily snapshot of active players.
773
811
  This selection is standalone and cannot be used together with other selections.
774
- CSV columns: id, name, gender, role, signed_up, last_action, level, rank, donator, networth, faction, company, spouse, display_case, bazaar, location, fed, fed_reason
812
+ CSV columns: id, name, gender, signed_up, level, rank, donator, faction, company, job, spouse, display_case, bazaar, fed, fed_reason, time_played, awards
775
813
  :param timestamp: Timestamp to bypass cache or get the data in specific point in time.
776
814
  :param comment: Comment for your tool/service/bot/website to be visible in the logs.
777
815
  :return: API response data.
@@ -112,6 +112,17 @@ class Market:
112
112
  """
113
113
  return await self.api.request("/market/properties", build_params(self.get_properties, locals()))
114
114
 
115
+ async def get_pointsmarket(self, timestamp: int = None, comment: str = None) -> dict:
116
+ """
117
+ Get points market listings.
118
+ API key (Public).
119
+ :param timestamp: Timestamp to bypass cache.
120
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
121
+ :return: API response data.
122
+ :rtype: dict
123
+ """
124
+ return await self.api.request("/market/pointsmarket", build_params(self.get_pointsmarket, locals()))
125
+
115
126
  async def get_rentals(self, property_type_id: int, limit: int = 20, offset: int = 0, sort: SortOptions = None, timestamp: int = None, comment: str = None) -> dict:
116
127
  """
117
128
  Get properties rental listings.
@@ -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.
@@ -554,6 +554,17 @@ class User:
554
554
  """
555
555
  return await self.api.request("/user/newevents", build_params(self.get_newevents, locals()))
556
556
 
557
+ async def get_networth(self, timestamp: int = None, comment: str = None) -> dict:
558
+ """
559
+ Get your networth.
560
+ API key (Limited).
561
+ :param timestamp: Timestamp to bypass cache.
562
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
563
+ :return: API response data.
564
+ :rtype: dict
565
+ """
566
+ return await self.api.request("/user/networth", build_params(self.get_networth, locals()))
567
+
557
568
  async def get_newmessages(self, timestamp: int = None, comment: str = None) -> dict:
558
569
  """
559
570
  Get your unseen messages.
@@ -599,6 +610,17 @@ class User:
599
610
  """
600
611
  return await self.api.request("/user/organizedcrimes", build_params(self.get_organizedcrimes, locals()))
601
612
 
613
+ async def get_perks(self, timestamp: int = None, comment: str = None) -> dict:
614
+ """
615
+ Get your current perks.
616
+ API key (Minimal).
617
+ :param timestamp: Timestamp to bypass cache.
618
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
619
+ :return: API response data.
620
+ :rtype: dict
621
+ """
622
+ return await self.api.request("/user/perks", build_params(self.get_perks, locals()))
623
+
602
624
  async def get_personalstats(self, user_id: int = None, stat_category: UserPrsnlStatsCatOptions = None, stat_keys: list[UserPrsnlStatsStatOptions] = None, timestamp: int = None, comment: str = None) -> dict:
603
625
  """
604
626
  Get your personal stats or for a specific user.
@@ -765,13 +787,29 @@ class User:
765
787
  """
766
788
  return await self.api.request("/user/skills", build_params(self.get_skills, locals()))
767
789
 
790
+ async def get_search(self, user_name: str = None, filters: list[str] = None, offset: int = 0, timestamp: int = None, comment: str = None) -> dict:
791
+ """
792
+ Search users by name or other criteria.
793
+ API key (Public).
794
+ This selection is standalone and cannot be used together with other selections.
795
+ It's always limited to return just 25 records.
796
+ :param user_name: The user's name you would like to search for.
797
+ :param filters: A filtering query parameter allowing a comma-separated list of filters.
798
+ :param offset: Number of rows to skip before returning results.
799
+ :param timestamp: Timestamp to bypass cache.
800
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
801
+ :return: API response data.
802
+ :rtype: dict
803
+ """
804
+ return await self.api.request("/user/search", build_params(self.get_search, locals()))
805
+
768
806
  async def get_snapshot(self, timestamp: int = None, comment: str = None) -> str:
769
807
  """
770
808
  Get daily active players snapshot CSV.
771
809
  API key (Public).
772
810
  Returns a CSV daily snapshot of active players.
773
811
  This selection is standalone and cannot be used together with other selections.
774
- CSV columns: id, name, gender, role, signed_up, last_action, level, rank, donator, networth, faction, company, spouse, display_case, bazaar, location, fed, fed_reason
812
+ CSV columns: id, name, gender, signed_up, level, rank, donator, faction, company, job, spouse, display_case, bazaar, fed, fed_reason, time_played, awards
775
813
  :param timestamp: Timestamp to bypass cache or get the data in specific point in time.
776
814
  :param comment: Comment for your tool/service/bot/website to be visible in the logs.
777
815
  :return: API response data.
@@ -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"}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TornAPIWrapper
3
- Version: 2.11.0
3
+ Version: 2.13.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-27.07.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-12.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
 
@@ -1,4 +1,4 @@
1
- TornAPIWrapper/__init__.py,sha256=bhrCn0UgdZ6Blx8wTBK3ffxQB4nf8oMlYLCGUFcgXgY,2764
1
+ TornAPIWrapper/__init__.py,sha256=g-o0sw1N3fPQ0b6EpTAuCAW9wv7rPk9eIi6gzQybWqQ,2764
2
2
  TornAPIWrapper/__main__.py,sha256=JKsDOr6esnYwiUO5HypNL_0ieiEc5YCItsLwdMfxyLs,1806
3
3
  TornAPIWrapper/client.py,sha256=2Mn4wNgJm8_9OWl7u5OtKM10XcXbIq71jnCmgyosl_c,3368
4
4
  TornAPIWrapper/client_async.py,sha256=AsEQBEuCmUkwtPnimoxBcwYpldn_s5sTCwXF9CnvqXA,4161
@@ -10,26 +10,26 @@ TornAPIWrapper/endpoints/company.py,sha256=67_gfWcOROMMCdM50yQ4-IFoSzCjameGk0bfe
10
10
  TornAPIWrapper/endpoints/faction.py,sha256=cTsmB8h2eMkaf7dtf4cTC43fDlt5473gfdPB9vNuVZA,31393
11
11
  TornAPIWrapper/endpoints/forum.py,sha256=OQugXQ4JoLHFYYG96nkZwnJuCymXP8f9zqcSj7mhiic,5741
12
12
  TornAPIWrapper/endpoints/key.py,sha256=GC8e7Z28mKViAauqr38gjAMJfWHns5Rn5sNOICHy854,2494
13
- TornAPIWrapper/endpoints/market.py,sha256=Iv7kQ3tCtayjXG-NQu2uTAW04dbS37zMgJx1KDf7_HU,7113
13
+ TornAPIWrapper/endpoints/market.py,sha256=lMNxf9zQaG7Zrdowf3ouC1ESxYQ3-EFn71Da9bXnLV4,7590
14
14
  TornAPIWrapper/endpoints/property.py,sha256=Ks4dbPGhMrjvA1z8H0DxU16nn6m3r2yjfL1fCxTU8fg,2852
15
15
  TornAPIWrapper/endpoints/racing.py,sha256=xjoGHTNmnqbqyhZeetBXRVcFdKYUAM_m6paomPloHj8,6097
16
- TornAPIWrapper/endpoints/torn.py,sha256=O0ulfqrYfGzHQFiFAE0LoXKRaX_6Zu7lywa2jxaQ_JM,17050
17
- TornAPIWrapper/endpoints/user.py,sha256=w86jeh71yQbpLmlIH5ENoWBlBo_rv6jFRVcdQL5-kgE,47169
16
+ TornAPIWrapper/endpoints/torn.py,sha256=_9eMpnkMllYwik74X6LEOzSPVPl-VXyBqq0931pRbs0,17515
17
+ TornAPIWrapper/endpoints/user.py,sha256=Y52KkHW1PtwX4PxNg6byYZ1t-6re6sV5pkUCi3NxE4Y,48981
18
18
  TornAPIWrapper/endpoints_async/__init__.py,sha256=1x2hi50HSEPTeUVrUD1NQTkhpLjyVGg8kDo4LcXFcP8,1132
19
19
  TornAPIWrapper/endpoints_async/company.py,sha256=K12wL-Zt72qiWjtSH5VyBpeow7h7d2h7uVKHnwrAYjk,8905
20
20
  TornAPIWrapper/endpoints_async/faction.py,sha256=pVDYejF_qmmL1kL3vva6LMFWCntUOgH5fjaucYmT5lk,31829
21
21
  TornAPIWrapper/endpoints_async/forum.py,sha256=IDGv1_2Z9tuvC3BE5tz_FjnpoXHRaXO161GuyUIv3VA,5829
22
22
  TornAPIWrapper/endpoints_async/key.py,sha256=d04B-YVkghJBqnyroGABlUX_HD-PNFAT-mI1ZYeipbk,2534
23
- TornAPIWrapper/endpoints_async/market.py,sha256=lfLwbTTUxTajdWM45XEBLVm83UX2oZRXpA7ZDupuA1g,7225
23
+ TornAPIWrapper/endpoints_async/market.py,sha256=nNEtijhRjJyMEqdt5HZELaPdexF-XhD2Dg6wrphw6IM,7714
24
24
  TornAPIWrapper/endpoints_async/property.py,sha256=uXBq0WslB9AtPaI9HKD4LE2d4SgQghIFb-PH70HJC90,2904
25
25
  TornAPIWrapper/endpoints_async/racing.py,sha256=zfJhLhem2HZQYyP8ngqp8nkOm2O3AQO-kYRPJJBD6w4,6209
26
- TornAPIWrapper/endpoints_async/torn.py,sha256=PvXVYdH-cr2ZoMy8rbySf3VHDWH5xVShRKozHT5ziw4,17390
27
- TornAPIWrapper/endpoints_async/user.py,sha256=6ojf5grgRa6WBXT5XhFATXsKKUxNXmvDTPUVjqLfH6U,47965
26
+ TornAPIWrapper/endpoints_async/torn.py,sha256=L0_wIVbb1lzHG6d6toVv1_9Jo6JJRZ_8oYMHJPRcai0,17867
27
+ TornAPIWrapper/endpoints_async/user.py,sha256=yGN8Qu-XQX-4cHifbhSQZDkoleliGzaaxPgIJrzrDRU,49813
28
28
  TornAPIWrapper/params/__init__.py,sha256=62xgULpfqEnTYmzSz_6W2MVGtna4DFb6oABy02ZsGcY,1123
29
29
  TornAPIWrapper/params/builders.py,sha256=WQIHSmMgJedNpwps8p4QjXvMLG-s09QBsT1Qynaxx1s,2057
30
- TornAPIWrapper/params/map.py,sha256=rWxyyQBpUsqQYgjoZRqNWYwr0JfinFMpQtX7FNtGTDs,1421
31
- tornapiwrapper-2.11.0.dist-info/licenses/LICENSE,sha256=tFxfnm48fk5x0JCMs1t7Ao6XDt_bHn_ogl3Y_q2EuPc,1079
32
- tornapiwrapper-2.11.0.dist-info/METADATA,sha256=lxlhXSQSgxCstUJ8apz-IW6ZIJpQ1REsz2rvvK_R98g,5070
33
- tornapiwrapper-2.11.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
34
- tornapiwrapper-2.11.0.dist-info/top_level.txt,sha256=z3QKLWbCxzb7qZb9LV37myVFXQm3hgA57PGuSWkc4R4,15
35
- tornapiwrapper-2.11.0.dist-info/RECORD,,
30
+ TornAPIWrapper/params/map.py,sha256=-EcBckEoVjX79XzpS59g32dygRqcgsynjab46n4GMFI,1434
31
+ tornapiwrapper-2.13.0.dist-info/licenses/LICENSE,sha256=tFxfnm48fk5x0JCMs1t7Ao6XDt_bHn_ogl3Y_q2EuPc,1079
32
+ tornapiwrapper-2.13.0.dist-info/METADATA,sha256=Acpvmi3s1TgcquaDxu41k4HfdjETeY85MEALL5n7hzM,5070
33
+ tornapiwrapper-2.13.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
34
+ tornapiwrapper-2.13.0.dist-info/top_level.txt,sha256=z3QKLWbCxzb7qZb9LV37myVFXQm3hgA57PGuSWkc4R4,15
35
+ tornapiwrapper-2.13.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (83.0.0)
2
+ Generator: setuptools (84.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5