@@ -6,7 +6,10 @@ callofduty.com
6
6
7
7
Devs
8
8
====
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
10
13
11
14
Documentation
12
15
=============
@@ -30,10 +33,10 @@ As a python library using `pip`_:
30
33
.. _pip : https://pip.pypa.io/en/stable/getting-started/
31
34
32
35
Usage
33
- =====
36
+ -----
34
37
35
38
Initiation
36
- ----------
39
+ ~~~~~~~~~~
37
40
38
41
Import module with its classes:
39
42
@@ -51,34 +54,89 @@ Login with your sso token
51
54
api.login(' Your sso token' )
52
55
53
56
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
55
58
copy the value
56
59
57
60
.. _callofduty : https://my.callofduty.com/
58
61
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
62
66
63
- *Example *:
67
+ * `ColdWar ` - game
68
+ * `ModernWarfe ` - game
69
+ * `Vanguard ` - game
70
+ * `Warzone ` - game
71
+ * `Me ` - other
72
+ * `Misc ` - other
64
73
65
- .. code-block :: python
74
+ To retrieve detailed description of each subclass `__doc__`(docstring) of each sub class can be called as shown below
66
75
67
- from API import platforms
76
+ .. tabs ::
68
77
69
- profileData = api.ModernWarfare.fullData(platforms.Battlenet, " Username#1234 " )
78
+ .. group-tab :: ColdWar
70
79
71
- * Output * > json
80
+ .. code-block :: python
72
81
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
77
83
78
- * Example *:
84
+ api = API()
79
85
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
81
138
82
- matchHistory = api.Warzone.combatHistory(platforms.Activision, " Username#123456 " )
139
+ api = API( )
83
140
84
- *Output * > json
141
+ # print out the docstring
142
+ print (api.Misc)
0 commit comments