TornAPIWrapper 2.7.0__tar.gz → 2.8.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 (39) hide show
  1. {tornapiwrapper-2.7.0/src/TornAPIWrapper.egg-info → tornapiwrapper-2.8.0}/PKG-INFO +2 -2
  2. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/README.md +1 -1
  3. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/__init__.py +2 -2
  4. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints/company.py +33 -0
  5. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints_async/company.py +33 -0
  6. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/params/map.py +1 -0
  7. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/type_hints.py +2 -0
  8. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0/src/TornAPIWrapper.egg-info}/PKG-INFO +2 -2
  9. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/LICENSE +0 -0
  10. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/pyproject.toml +0 -0
  11. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/setup.cfg +0 -0
  12. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/__main__.py +0 -0
  13. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/client.py +0 -0
  14. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/client_async.py +0 -0
  15. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints/__init__.py +0 -0
  16. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints/faction.py +0 -0
  17. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints/forum.py +0 -0
  18. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints/key.py +0 -0
  19. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints/market.py +0 -0
  20. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints/property.py +0 -0
  21. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints/racing.py +0 -0
  22. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints/torn.py +0 -0
  23. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints/user.py +0 -0
  24. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints_async/__init__.py +0 -0
  25. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints_async/faction.py +0 -0
  26. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints_async/forum.py +0 -0
  27. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints_async/key.py +0 -0
  28. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints_async/market.py +0 -0
  29. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints_async/property.py +0 -0
  30. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints_async/racing.py +0 -0
  31. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints_async/torn.py +0 -0
  32. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/endpoints_async/user.py +0 -0
  33. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/errors.py +0 -0
  34. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/params/__init__.py +0 -0
  35. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper/params/builders.py +0 -0
  36. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper.egg-info/SOURCES.txt +0 -0
  37. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper.egg-info/dependency_links.txt +0 -0
  38. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.0}/src/TornAPIWrapper.egg-info/requires.txt +0 -0
  39. {tornapiwrapper-2.7.0 → tornapiwrapper-2.8.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.7.0
3
+ Version: 2.8.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-08.05.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-21.05.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-08.05.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-21.05.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.7.0"
30
- __patch__ = "08.05.2026"
29
+ __version__ = "2.8.0"
30
+ __patch__ = "21.05.2026"
31
31
 
32
32
  from .errors import (
33
33
  WrapperError,
@@ -27,6 +27,7 @@ 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 CpnyNewsCatOptions, SortOptions
30
31
 
31
32
  if TYPE_CHECKING:
32
33
  from ..client import TornAPIWrapper
@@ -64,6 +65,38 @@ class Company:
64
65
  """
65
66
  return self.api.request("/company/employees", build_params(self.get_employees, locals()))
66
67
 
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):
69
+ """
70
+ Get your company's news details.
71
+ API key (Minimal).
72
+ :param news_category: News category type.
73
+ :param striptags: Determines if fields include HTML or not ('Hospitalized by user' vs 'Hospitalized by user').
74
+ :param limit: Number of results to return.
75
+ :param sort: Sorted by the greatest timestamps.
76
+ :param to: Timestamp that sets the upper limit for the data returned. Data returned will be up to and including this time.
77
+ :param from_: Timestamp that sets the lower limit for the data returned. Data returned will be after this time.
78
+ :param timestamp: Timestamp to bypass cache.
79
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
80
+ :return: API response data.
81
+ :rtype: dict
82
+ """
83
+ return self.api.request("/company/news", build_params(self.get_news, locals()))
84
+
85
+ def get_companies(self, company_type_id: int, striptags: bool = True, limit: int = 20, offset: int = None, timestamp: int = None, comment: str = None):
86
+ """
87
+ Get a list of companies for a specific company type.
88
+ API key (Public).
89
+ :param company_type_id: Company type id.
90
+ :param limit: Number of results to return.
91
+ :param offset: Number of rows to skip before returning results.
92
+ :param striptags: Determines if fields include HTML or not ('Hospitalized by user' vs 'Hospitalized by user').
93
+ :param timestamp: Timestamp to bypass cache.
94
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
95
+ :return: API response data.
96
+ :rtype: dict
97
+ """
98
+ return self.api.request("/company/companies", build_params(self.get_companies, locals()))
99
+
67
100
  def get_profile(self, company_id: int = None, striptags: bool = True, timestamp: int = None, comment: str = None):
68
101
  """
69
102
  Get a company's profile.
@@ -27,6 +27,7 @@ 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 CpnyNewsCatOptions, SortOptions
30
31
 
31
32
  if TYPE_CHECKING:
32
33
  from ..client_async import TornAPIWrapperAsync
@@ -64,6 +65,38 @@ class Company:
64
65
  """
65
66
  return await self.api.request("/company/employees", build_params(self.get_employees, locals()))
66
67
 
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):
69
+ """
70
+ Get your company's news details.
71
+ API key (Minimal).
72
+ :param news_category: News category type.
73
+ :param striptags: Determines if fields include HTML or not ('Hospitalized by user' vs 'Hospitalized by user').
74
+ :param limit: Number of results to return.
75
+ :param sort: Sorted by the greatest timestamps.
76
+ :param to: Timestamp that sets the upper limit for the data returned. Data returned will be up to and including this time.
77
+ :param from_: Timestamp that sets the lower limit for the data returned. Data returned will be after this time.
78
+ :param timestamp: Timestamp to bypass cache.
79
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
80
+ :return: API response data.
81
+ :rtype: dict
82
+ """
83
+ return await self.api.request("/company/news", build_params(self.get_news, locals()))
84
+
85
+ async def get_companies(self, company_type_id: int, striptags: bool = True, limit: int = 20, offset: int = None, timestamp: int = None, comment: str = None):
86
+ """
87
+ Get a list of companies for a specific company type.
88
+ API key (Public).
89
+ :param company_type_id: Company type id.
90
+ :param limit: Number of results to return.
91
+ :param offset: Number of rows to skip before returning results.
92
+ :param striptags: Determines if fields include HTML or not ('Hospitalized by user' vs 'Hospitalized by user').
93
+ :param timestamp: Timestamp to bypass cache.
94
+ :param comment: Comment for your tool/service/bot/website to be visible in the logs.
95
+ :return: API response data.
96
+ :rtype: dict
97
+ """
98
+ return await self.api.request("/company/companies", build_params(self.get_companies, locals()))
99
+
67
100
  async def get_profile(self, company_id: int = None, striptags: bool = True, timestamp: int = None, comment: str = None):
68
101
  """
69
102
  Get a company's profile.
@@ -8,6 +8,7 @@ param_filters = {"attack_filters", "crimes_filter", "property_filters"}
8
8
  param_id = {
9
9
  "chain_id",
10
10
  "company_id",
11
+ "company_type_id",
11
12
  "crime_id",
12
13
  "faction_id",
13
14
  "item_id",
@@ -43,6 +43,8 @@ FacCrimesCatOptions = Literal["all", "recruiting", "planning", "failure", "succe
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"]
45
45
 
46
+ CpnyNewsCatOptions = Literal["main", "funds", "training", "employees", "all"]
47
+
46
48
  MrktBazaarCatOptions = Literal["Alcohol", "Artifact", "Booster", "Candy", "Car", "Clothing", "Collectible", "Defensive", "Drug", "Energy Drink", "Enhancer", "Flower", "Jewelry", "Material", "Medical", "Melee", "Other", "Plushie", "Primary", "Secondary", "Special", "Supply Pack", "Temporary", "Tool"]
47
49
  MrktItemBonusOptions = Literal["Any", "Double", "Yellow", "Orange", "Red", "Achilles", "Assassinate", "Backstab", "Berserk", "Bleed", "Blindfire", "Blindside", "Bloodlust", "Burn", "Comeback", "Conserve", "Cripple", "Crusher", "Cupid", "Deadeye", "Deadly", "Demoralize", "Disarm", "Double-edged", "Double Tap", "Emasculate", "Empower", "Eviscerate", "Execute", "Expose", "Finale", "Focus", "Freeze", "Frenzy", "Fury", "Grace", "Hazardous", "Home run", "Irradiate", "Lacerate", "Motivation", "Paralyze", "Parry", "Penetrate", "Plunder", "Poison", "Powerful", "Proficience", "Puncture", "Quicken", "Rage", "Revitalize", "Roshambo", "Shock", "Sleep", "Slow", "Smash", "Smurf", "Specialist", "Spray", "Storage", "Stricken", "Stun", "Suppress", "Sure Shot", "Throttle", "Toxin", "Warlord", "Weaken", "Wind-up", "Wither"]
48
50
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TornAPIWrapper
3
- Version: 2.7.0
3
+ Version: 2.8.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-08.05.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-21.05.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
File without changes