@@ -57,22 +57,24 @@ Import module with its classes:
57
57
58
58
.. _`logged in` :
59
59
60
- Login with your sso token
60
+ Login with your sso token:
61
61
62
62
.. code-block :: python
63
63
64
64
api.login(' Your sso token' )
65
65
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.
69
68
70
69
.. _callofduty : https://my.callofduty.com/
71
70
72
71
Game/Other sub classes
73
72
----------------------
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:
76
78
77
79
+-----------------+----------+
78
80
| sub class | catogery |
@@ -92,11 +94,11 @@ and following are available sub classes
92
94
93
95
94
96
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:
96
98
97
99
.. _`ColdWar` :
98
100
99
- `ColdWar `
101
+ `` ColdWar ` `
100
102
101
103
.. code-block :: python
102
104
@@ -109,7 +111,7 @@ For a detailed description of each subclass, `__doc__` (docstring) of each sub c
109
111
110
112
.. _`ModernWarfe` :
111
113
112
- `ModernWarfe `
114
+ `` ModernWarfe ` `
113
115
114
116
.. code-block :: python
115
117
@@ -122,7 +124,7 @@ For a detailed description of each subclass, `__doc__` (docstring) of each sub c
122
124
123
125
.. _`Vanguard` :
124
126
125
- `Vanguard `
127
+ `` Vanguard ` `
126
128
127
129
.. code-block :: python
128
130
@@ -135,7 +137,7 @@ For a detailed description of each subclass, `__doc__` (docstring) of each sub c
135
137
136
138
.. _`Warzone` :
137
139
138
- `Warzone `
140
+ `` Warzone ` `
139
141
140
142
.. code-block :: python
141
143
@@ -148,7 +150,7 @@ For a detailed description of each subclass, `__doc__` (docstring) of each sub c
148
150
149
151
.. _`Me` :
150
152
151
- `Me `
153
+ `` Me ` `
152
154
153
155
.. code-block :: python
154
156
@@ -161,7 +163,7 @@ For a detailed description of each subclass, `__doc__` (docstring) of each sub c
161
163
162
164
.. _`Misc` :
163
165
164
- `Misc `
166
+ `` Misc ``:
165
167
166
168
.. code-block :: python
167
169
@@ -175,16 +177,16 @@ For a detailed description of each subclass, `__doc__` (docstring) of each sub c
175
177
Combat History
176
178
--------------
177
179
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 `_.
180
182
Main methods are ``combatHistory() `` and ``combatHistoryWithDate() `` which are available for all ``ColdWar ``,
181
183
``ModernWarfare ``, ``Vanguard `` and ``Warzone `` classes.
182
184
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.
185
187
186
188
Here's an example for retrieving **Warzone ** combat history of a player whose gamer tag is **Username#1234 ** on platform
187
- **Battlenet **
189
+ **Battlenet **:
188
190
189
191
.. code-block :: python
190
192
@@ -202,12 +204,14 @@ Here's an example for retrieving **Warzone** combat history of a player whose ga
202
204
# printing results to console
203
205
print (hist)
204
206
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.
207
211
208
212
Here's an example for retrieving **ModernWarfare ** combat history of a player whose gamer tag is **Username#1234567 ** on
209
213
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):
211
215
212
216
.. code-block :: python
213
217
@@ -230,11 +234,11 @@ details, where only the platform played on, game title, UTC timestamp, type ID,
230
234
every match. And just like ``combatHistory() `` and ``combatHistoryWithDate() `` these methods are available for all
231
235
``ColdWar ``, ``ModernWarfare ``, ``Vanguard `` and ``Warzone `` classes.
232
236
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.
235
239
236
240
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 **:
238
242
239
243
.. code-block :: python
240
244
@@ -252,14 +256,14 @@ on platform **Battlenet**
252
256
# printing results to console
253
257
print (hist_b)
254
258
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.
257
261
258
- start and end parameters are utc timestamps in microseconds
262
+ `` start `` and `` end `` parameters are utc timestamps in microseconds.
259
263
260
264
Here's an example for retrieving **ModernWarfare ** combat history breakdown of a player whose gamer tag is
261
265
**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):
263
267
264
268
.. code-block :: python
265
269
@@ -280,17 +284,18 @@ and **1657949309** (Saturday, 16 July 2022 05:28:29)
280
284
Match Details
281
285
-------------
282
286
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.
286
291
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.
289
294
290
295
*Optionally the match ID can be retrieved during your gameplay where it will be visible on bottom left corner *
291
296
292
297
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 **:
294
299
295
300
.. code-block :: python
296
301
@@ -302,7 +307,7 @@ on platform **Battlenet**
302
307
# loggin in with sso token
303
308
api.login(' your_sso_token' )
304
309
305
- # retrieving combat history
310
+ # retrieving match details
306
311
details = api.Warzone.matchInfo(platforms.Battlenet, 9484583876389482453 ) # returns data of type dict
307
312
308
313
# printing results to console
@@ -312,13 +317,13 @@ Season Loot
312
317
-----------
313
318
314
319
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.
316
321
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.
319
324
320
325
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 **:
322
327
323
328
.. code-block :: python
324
329
@@ -339,10 +344,12 @@ Map List
339
344
--------
340
345
341
346
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 `_.
343
350
344
351
Here's an example for retrieving **Vanguard ** map list and available modes respectively on platform PlayStation
345
- (**PSN **)
352
+ (**PSN **):
346
353
347
354
.. code-block :: python
348
355
@@ -364,8 +371,9 @@ Here's an example for retrieving **Vanguard** map list and available modes respe
364
371
platforms
365
372
---------
366
373
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:
369
377
370
378
+----------------------+----------------------------------------+
371
379
| Platform | Remarks |
@@ -385,7 +393,7 @@ Available platforms are as follows
385
393
| platforms.XBOX | Xbox |
386
394
+----------------------+----------------------------------------+
387
395
388
- platforms can be imported and use as follows:
396
+ `` platforms `` can be imported and used as follows:
389
397
390
398
.. code-block :: python
391
399
0 commit comments