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

Commit b9ca22c

Browse files
committed
re
1 parent 84b369a commit b9ca22c

File tree

2 files changed

+97
-84
lines changed

2 files changed

+97
-84
lines changed

README.rst

Lines changed: 52 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,24 @@ Import module with its classes:
5757
5858
.. _`logged in`:
5959

60-
Login with your sso token
60+
Login with your sso token:
6161

6262
.. code-block:: python
6363
6464
api.login('Your sso token')
6565
66-
You sso token can be found by longing in at `callofduty`_, opening dev tools (ctr+shift+I),
67-
going to Applications > Storage > Cookies > https://callofduty.com, filter to search 'ACT_SSO_COOKIE' and
68-
copy the value
66+
Your sso token can be found by longing in at `callofduty`_, opening dev tools (ctr+shift+I), going to Applications >
67+
Storage > Cookies > https://callofduty.com, filter to search 'ACT_SSO_COOKIE' and copy the value.
6968

7069
.. _callofduty: https://my.callofduty.com/
7170

7271
Game/Other sub classes
7372
----------------------
74-
Following importation and initiation of the class ``API`` its associated subclasses can be called by ``API.subClassName``
75-
and following are available sub classes
73+
74+
Following importation and initiation of the class ``API``, its associated subclasses can be called by
75+
``API.subClassName``.
76+
77+
Below are the available sub classes:
7678

7779
+-----------------+----------+
7880
| sub class | catogery |
@@ -92,11 +94,11 @@ and following are available sub classes
9294

9395

9496

95-
For a detailed description of each subclass, `__doc__` (docstring) of each sub class can be called as shown below:
97+
For a detailed description, ``__doc__`` (docstring) of each sub class can be called as shown below:
9698

9799
.. _`ColdWar`:
98100

99-
`ColdWar`
101+
``ColdWar``
100102

101103
.. code-block:: python
102104
@@ -109,7 +111,7 @@ For a detailed description of each subclass, `__doc__` (docstring) of each sub c
109111
110112
.. _`ModernWarfe`:
111113

112-
`ModernWarfe`
114+
``ModernWarfe``
113115

114116
.. code-block:: python
115117
@@ -122,7 +124,7 @@ For a detailed description of each subclass, `__doc__` (docstring) of each sub c
122124
123125
.. _`Vanguard`:
124126

125-
`Vanguard`
127+
``Vanguard``
126128

127129
.. code-block:: python
128130
@@ -135,7 +137,7 @@ For a detailed description of each subclass, `__doc__` (docstring) of each sub c
135137
136138
.. _`Warzone`:
137139

138-
`Warzone`
140+
``Warzone``
139141

140142
.. code-block:: python
141143
@@ -148,7 +150,7 @@ For a detailed description of each subclass, `__doc__` (docstring) of each sub c
148150
149151
.. _`Me`:
150152

151-
`Me`
153+
``Me``
152154

153155
.. code-block:: python
154156
@@ -161,7 +163,7 @@ For a detailed description of each subclass, `__doc__` (docstring) of each sub c
161163
162164
.. _`Misc`:
163165

164-
`Misc`
166+
``Misc``:
165167

166168
.. code-block:: python
167169
@@ -175,16 +177,16 @@ For a detailed description of each subclass, `__doc__` (docstring) of each sub c
175177
Combat History
176178
--------------
177179

178-
Any sub class of ``API`` of catogery game has methods to check a player's combat history.
179-
Note that before calling any methods of sub classes of ``API`` you must be `logged in`_.
180+
Any sub class of ``API`` that is of game catogery, has methods to check a player's combat history.
181+
Note that before calling any sub class methods of ``API`` you must be `logged in`_.
180182
Main methods are ``combatHistory()`` and ``combatHistoryWithDate()`` which are available for all ``ColdWar``,
181183
``ModernWarfare``, ``Vanguard`` and ``Warzone`` classes.
182184

183-
The ``combatHistory()`` takes 2 input parameteres which are platform and gamertag of type `cod_api.platforms`_ and
184-
string respectively
185+
The ``combatHistory()`` takes 2 input parameteres which are ``platform`` and ``gamertag`` of type `cod_api.platforms`_
186+
and string respectively.
185187

186188
Here's an example for retrieving **Warzone** combat history of a player whose gamer tag is **Username#1234** on platform
187-
**Battlenet**
189+
**Battlenet**:
188190

189191
.. code-block:: python
190192
@@ -202,12 +204,14 @@ Here's an example for retrieving **Warzone** combat history of a player whose ga
202204
# printing results to console
203205
print(hist)
204206
205-
The ``combatHistoryWithDate()`` takes 4 input parameteres which are platform, gamertag, start and end of type start and
206-
end parameters are utc timestamps in microseconds
207+
The ``combatHistoryWithDate()`` takes 4 input parameteres which are ``platform``, ``gamertag``, ``start`` and ``end`` of
208+
type `cod_api.platforms`_, string, int and int respectively.
209+
210+
``start`` and ``end`` parameters are utc timestamps in microseconds.
207211

208212
Here's an example for retrieving **ModernWarfare** combat history of a player whose gamer tag is **Username#1234567** on
209213
platform **Activision** with in the timestamps **1657919309** (Friday, 15 July 2022 21:08:29) and **1657949309**
210-
(Saturday, 16 July 2022 05:28:29)
214+
(Saturday, 16 July 2022 05:28:29):
211215

212216
.. code-block:: python
213217
@@ -230,11 +234,11 @@ details, where only the platform played on, game title, UTC timestamp, type ID,
230234
every match. And just like ``combatHistory()`` and ``combatHistoryWithDate()`` these methods are available for all
231235
``ColdWar``, ``ModernWarfare``, ``Vanguard`` and ``Warzone`` classes.
232236

233-
The ``breakdown()`` takes 2 input parameteres which are platform and gamertag of type `cod_api.platforms`_ and
234-
string respectively
237+
The ``breakdown()`` takes 2 input parameteres which are ``platform`` and ``gamertag`` of type `cod_api.platforms`_ and
238+
string respectively.
235239

236240
Here's an example for retrieving **Warzone** combat history breakdown of a player whose gamer tag is **Username#1234**
237-
on platform **Battlenet**
241+
on platform **Battlenet**:
238242

239243
.. code-block:: python
240244
@@ -252,14 +256,14 @@ on platform **Battlenet**
252256
# printing results to console
253257
print(hist_b)
254258
255-
The ``breakdownWithDate()`` takes 4 input parameteres which are platform, gamertag, start and end of type
256-
`cod_api.platforms`_, string, int and int respectively
259+
The ``breakdownWithDate()`` takes 4 input parameteres which are ``platform``, ``gamertag``, ``start`` and ``end`` of
260+
type `cod_api.platforms`_, string, int and int respectively.
257261

258-
start and end parameters are utc timestamps in microseconds
262+
``start`` and ``end`` parameters are utc timestamps in microseconds.
259263

260264
Here's an example for retrieving **ModernWarfare** combat history breakdown of a player whose gamer tag is
261265
**Username#1234567** on platform **Activision** with in the timestamps **1657919309** (Friday, 15 July 2022 21:08:29)
262-
and **1657949309** (Saturday, 16 July 2022 05:28:29)
266+
and **1657949309** (Saturday, 16 July 2022 05:28:29):
263267

264268
.. code-block:: python
265269
@@ -280,17 +284,18 @@ and **1657949309** (Saturday, 16 July 2022 05:28:29)
280284
Match Details
281285
-------------
282286

283-
To retrieve details of a specific match the method ``matchInfo()`` can be used and this is available for all``ColdWar``,
284-
``ModernWarfare``, ``Vanguard`` and ``Warzone`` classes. Specific match details are verbose than that of details by
285-
methods ``combatHistory()`` and ``combatHistoryWithDate()`` for a single match.
287+
To retrieve details of a specific match, the method ``matchInfo()`` can be used and this is available for all
288+
``ColdWar``, ``ModernWarfare``, ``Vanguard`` and ``Warzone`` classes. Details returned by this method contains
289+
additional data than that of details returned by the methods ``combatHistory()`` and ``combatHistoryWithDate()`` for a
290+
single match.
286291

287-
The ``matchInfo()`` takes 2 input parameteres which are platform and matchId of type `cod_api.platforms`_ and integer
288-
respectively.
292+
The ``matchInfo()`` takes 2 input parameteres which are ``platform`` and ``matchId`` of type `cod_api.platforms`_ and
293+
integer respectively.
289294

290295
*Optionally the match ID can be retrieved during your gameplay where it will be visible on bottom left corner*
291296

292297
Here's an example for retrieving **Warzone** match details of a match where its id is **9484583876389482453**
293-
on platform **Battlenet**
298+
on platform **Battlenet**:
294299

295300
.. code-block:: python
296301
@@ -302,7 +307,7 @@ on platform **Battlenet**
302307
# loggin in with sso token
303308
api.login('your_sso_token')
304309
305-
# retrieving combat history
310+
# retrieving match details
306311
details = api.Warzone.matchInfo(platforms.Battlenet, 9484583876389482453) # returns data of type dict
307312
308313
# printing results to console
@@ -312,13 +317,13 @@ Season Loot
312317
-----------
313318

314319
Using the ``seasonLoot()`` method a player's obtained season loot can be retrieved for a specific game and this method
315-
is available for ``ColdWar``, ``ModernWarfare`` and ``Vanguard`` classes
320+
is available for ``ColdWar``, ``ModernWarfare`` and ``Vanguard`` classes.
316321

317-
The ``seasonLoot()`` takes 2 input parameteres which are platform and matchId of type `cod_api.platforms`_ and integer
318-
respectively.
322+
The ``seasonLoot()`` takes 2 input parameteres which are ``platform`` and ``matchId`` of type `cod_api.platforms`_ and
323+
integer respectively.
319324

320325
Here's an example for retrieving **ColdWar** season loot obtained by a player whose gamer tag is **Username#1234** on
321-
platform **Battlenet**
326+
platform **Battlenet**:
322327

323328
.. code-block:: python
324329
@@ -339,10 +344,12 @@ Map List
339344
--------
340345

341346
Using the ``mapList()`` method all the maps and its available modes can be retrieved for a specific game. This method is
342-
available for ``ColdWar``, ``ModernWarfare`` and ``Vanguard`` classes
347+
available for ``ColdWar``, ``ModernWarfare`` and ``Vanguard`` classes.
348+
349+
The ``mapList()`` takes 1 input parameteres which is ``platform`` of type `cod_api.platforms`_.
343350

344351
Here's an example for retrieving **Vanguard** map list and available modes respectively on platform PlayStation
345-
(**PSN**)
352+
(**PSN**):
346353

347354
.. code-block:: python
348355
@@ -364,8 +371,9 @@ Here's an example for retrieving **Vanguard** map list and available modes respe
364371
platforms
365372
---------
366373

367-
platforms is an enum class available in cod_api which is used to specify the platform in certain method calls.
368-
Available platforms are as follows
374+
``platforms`` is an enum class available in ``cod_api`` which is used to specify the platform in certain method calls.
375+
376+
Available ``platforms`` are as follows:
369377

370378
+----------------------+----------------------------------------+
371379
|Platform | Remarks |
@@ -385,7 +393,7 @@ Available platforms are as follows
385393
|platforms.XBOX | Xbox |
386394
+----------------------+----------------------------------------+
387395

388-
platforms can be imported and use as follows:
396+
``platforms`` can be imported and used as follows:
389397

390398
.. code-block:: python
391399

0 commit comments

Comments
 (0)