Skip to content
This repository was archived by the owner on Dec 17, 2024. It is now read-only.

Commit 95bbd21

Browse files
committed
re
1 parent e0f0189 commit 95bbd21

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

PYPI.rst

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ and following are available sub classes
9292

9393
For a detailed description of each subclass, `__doc__` (docstring) of each sub class can be called as shown below:
9494

95-
.. _ColdWar: .. _`ColdWa`
96-
97-
.. _`ColdWa`:
95+
.. _`ColdWar`:
9896

9997
`ColdWar`
10098

@@ -177,4 +175,27 @@ Combat History
177175

178176
Any sub class of ``API`` of catogery game has methods to check a player's combat history.
179177
Note that before calling any methods of sub classes of ``API`` you must be `logged in`_.
180-
Main methods are ``combatHistory()`` and ``combatHistoryWithDate()`` which is available for `C`
178+
Main methods are ``combatHistory()`` and ``combatHistoryWithDate()`` which are available for all ``ColdWar``,
179+
``ModernWarfare``, ``Vanguard`` and ``Warzone`` classes
180+
181+
The ``combatHistory()`` takes 2 input parameteres which are platform and gamertag of type `cod_api.platforms`_ and
182+
string respectively
183+
184+
Here's an example for retrieving **Warzone** combat history of a player whose gamer tag is **Username#1234** on platform
185+
**Battlenet**
186+
187+
.. code-block:: python
188+
189+
from cod_api import API, platforms
190+
191+
# initiating the API class
192+
api = API()
193+
194+
# loggin in with sso token
195+
api.login('your_sso_token')
196+
197+
# retrieving combat history
198+
hist = api.Warzone.combatHistory(platforms.Battlenet, "Username#1234") # returns data of type dict
199+
200+
# printing results to console
201+
print(hist)

cod_api/cod_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ async def fullData(self, platform:platforms, gamertag: str):
179179
data = await self.fullDataReq("mw", platform, gamertag, "wz")
180180
return data
181181

182-
async def combatHistory(self, platform: platforms, gamertag: str, verbose:bool=False, mapping:bool=False):
182+
async def combatHistory(self, platform: platforms, gamertag: str):
183183
data = await self.combatHistoryReq("mw", platform, gamertag, "wz", 0, 0)
184184
return data
185185

0 commit comments

Comments
 (0)