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

Commit 2dfeb07

Browse files
committed
re
1 parent f890d54 commit 2dfeb07

File tree

4 files changed

+84
-23
lines changed

4 files changed

+84
-23
lines changed

PYPI.rst

Lines changed: 78 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ callofduty.com
66

77
Devs
88
====
9-
[Todo Lodo](https://github.com/TodoLodo2089) and [Engineer15](https://github.com/Engineer152)
9+
`Todo Lodo`_ and `Engineer15`_
10+
11+
.. _Todo Lodo: https://github.com/TodoLodo2089
12+
.. _Engineer15: https://github.com/Engineer152
1013

1114
Documentation
1215
=============
@@ -30,10 +33,10 @@ As a python library using `pip`_:
3033
.. _pip: https://pip.pypa.io/en/stable/getting-started/
3134

3235
Usage
33-
=====
36+
-----
3437

3538
Initiation
36-
----------
39+
~~~~~~~~~~
3740

3841
Import module with its classes:
3942

@@ -51,34 +54,89 @@ Login with your sso token
5154
api.login('Your sso token')
5255
5356
You sso token can be found by longing in at `callofduty`_, opening dev tools (ctr+shift+I),
54-
going to Applications > Storage > Cookies > https://callofduty.com, filter to search 'ACT_SSO_COOKIE' and
57+
going to Applications > Storage > Cookies > :samp:`https://callofduty.com`, filter to search 'ACT_SSO_COOKIE' and
5558
copy the value
5659

5760
.. _callofduty: https://my.callofduty.com/
5861

59-
Retrieving game profile
60-
-----------------------
61-
A player's game profile can be retrieved by using API sub game classes with its function fullData(platform, gamertag)
62+
Game/Other sub classes
63+
~~~~~~~~~~~~~~~~~~~~~~
64+
Following importation and initiation of the class `API` its associated subclasses can be called by `API.subClassName`
65+
and following are available sub classes
6266

63-
*Example*:
67+
* `ColdWar` - game
68+
* `ModernWarfe` - game
69+
* `Vanguard` - game
70+
* `Warzone` - game
71+
* `Me` - other
72+
* `Misc` - other
6473

65-
.. code-block:: python
74+
To retrieve detailed description of each subclass `__doc__`(docstring) of each sub class can be called as shown below
6675

67-
from API import platforms
76+
.. tabs::
6877

69-
profileData = api.ModernWarfare.fullData(platforms.Battlenet, "Username#1234")
78+
.. group-tab:: ColdWar
7079

71-
*Output* > json
80+
.. code-block:: python
7281
73-
Retrieving combat history
74-
-------------------------
75-
A player's game profile can be retrieved by using API sub game classes with its functions combatHistory(platform, gamertag) or
76-
combatHistoryWithDate(platform, gamertag, start, end)
82+
from cod_api import API
7783
78-
*Example*:
84+
api = API()
7985
80-
.. code-block:: python
86+
# print out the docstring
87+
print(api.ColdWar)
88+
89+
.. group-tab:: ModernWarfare
90+
91+
.. code-block:: python
92+
93+
from cod_api import API
94+
95+
api = API()
96+
97+
# print out the docstring
98+
print(api.ModernWarfare)
99+
100+
.. group-tab:: Vanguard
101+
102+
.. code-block:: python
103+
104+
from cod_api import API
105+
106+
api = API()
107+
108+
# print out the docstring
109+
print(api.Vanguard)
110+
111+
.. group-tab:: Warzone
112+
113+
.. code-block:: python
114+
115+
from cod_api import API
116+
117+
api = API()
118+
119+
# print out the docstring
120+
print(api.Warzone)
121+
122+
.. group-tab:: Me
123+
124+
.. code-block:: python
125+
126+
from cod_api import API
127+
128+
api = API()
129+
130+
# print out the docstring
131+
print(api.Me)
132+
133+
.. group-tab:: Misc
134+
135+
.. code-block:: python
136+
137+
from cod_api import API
81138
82-
matchHistory = api.Warzone.combatHistory(platforms.Activision, "Username#123456")
139+
api = API()
83140
84-
*Output* > json
141+
# print out the docstring
142+
print(api.Misc)

README.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ callofduty.com
66

77
Devs
88
====
9-
[Todo Lodo](https://github.com/TodoLodo2089) and [Engineer15](https://github.com/Engineer152)
9+
`Todo Lodo`_ and `Engineer15`_
10+
11+
.. _Todo Lodo: https://github.com/TodoLodo2089
12+
.. _Engineer15: https://github.com/Engineer152
1013

1114
Documentation
1215
=============

cod_api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from cod_api.cod_api import API, platforms, games, friendActions
22

3-
__version__ = "0.0.4dev0"
3+
__version__ = "0.0.5dev0"

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

0 commit comments

Comments
 (0)