eric6/Documentation/Source/eric6.WebBrowser.SafeBrowsing.SafeBrowsingAPIClient.html

changeset 7273
391d6b7b1eff
parent 6942
2602857055c5
child 7641
21ea4fd50b0a
equal deleted inserted replaced
7272:1779dc278077 7273:391d6b7b1eff
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>eric6.WebBrowser.SafeBrowsing.SafeBrowsingAPIClient</h1> 23 <h1>eric6.WebBrowser.SafeBrowsing.SafeBrowsingAPIClient</h1>
24
23 <p> 25 <p>
24 Module implementing the low level interface for Google Safe Browsing. 26 Module implementing the low level interface for Google Safe Browsing.
25 </p> 27 </p>
26 <h3>Global Attributes</h3> 28 <h3>Global Attributes</h3>
29
27 <table> 30 <table>
28 <tr><td>None</td></tr> 31 <tr><td>None</td></tr>
29 </table> 32 </table>
30 <h3>Classes</h3> 33 <h3>Classes</h3>
31 <table> 34
35 <table>
36
32 <tr> 37 <tr>
33 <td><a href="#SafeBrowsingAPIClient">SafeBrowsingAPIClient</a></td> 38 <td><a href="#SafeBrowsingAPIClient">SafeBrowsingAPIClient</a></td>
34 <td>Class implementing the low level interface for Google Safe Browsing.</td> 39 <td>Class implementing the low level interface for Google Safe Browsing.</td>
35 </tr> 40 </tr>
36 </table> 41 </table>
37 <h3>Functions</h3> 42 <h3>Functions</h3>
43
38 <table> 44 <table>
39 <tr><td>None</td></tr> 45 <tr><td>None</td></tr>
40 </table> 46 </table>
41 <hr /><hr /> 47 <hr />
48 <hr />
42 <a NAME="SafeBrowsingAPIClient" ID="SafeBrowsingAPIClient"></a> 49 <a NAME="SafeBrowsingAPIClient" ID="SafeBrowsingAPIClient"></a>
43 <h2>SafeBrowsingAPIClient</h2> 50 <h2>SafeBrowsingAPIClient</h2>
51
44 <p> 52 <p>
45 Class implementing the low level interface for Google Safe Browsing. 53 Class implementing the low level interface for Google Safe Browsing.
46 </p><h3>Signals</h3> 54 </p>
47 <dl> 55 <h3>Signals</h3>
56 <dl>
57
48 <dt>networkError(str)</dt> 58 <dt>networkError(str)</dt>
49 <dd> 59 <dd>
50 emitted to indicate a network error 60 emitted to indicate a network error
51 </dd> 61 </dd>
52 </dl> 62 </dl>
53 <h3>Derived from</h3> 63 <h3>Derived from</h3>
54 QObject 64 QObject
55 <h3>Class Attributes</h3> 65 <h3>Class Attributes</h3>
66
56 <table> 67 <table>
57 <tr><td>ClientId</td></tr><tr><td>ClientVersion</td></tr><tr><td>GsbUrlTemplate</td></tr> 68 <tr><td>ClientId</td></tr><tr><td>ClientVersion</td></tr><tr><td>GsbUrlTemplate</td></tr>
58 </table> 69 </table>
59 <h3>Class Methods</h3> 70 <h3>Class Methods</h3>
60 <table> 71
72 <table>
73
61 <tr> 74 <tr>
62 <td><a href="#SafeBrowsingAPIClient.definedPlatformTypes">definedPlatformTypes</a></td> 75 <td><a href="#SafeBrowsingAPIClient.definedPlatformTypes">definedPlatformTypes</a></td>
63 <td>Class method to get all platform types defined in API v4.</td> 76 <td>Class method to get all platform types defined in API v4.</td>
64 </tr><tr> 77 </tr>
78 <tr>
65 <td><a href="#SafeBrowsingAPIClient.definedThreatEntryTypes">definedThreatEntryTypes</a></td> 79 <td><a href="#SafeBrowsingAPIClient.definedThreatEntryTypes">definedThreatEntryTypes</a></td>
66 <td>Class method to get all threat entry types defined in API v4.</td> 80 <td>Class method to get all threat entry types defined in API v4.</td>
67 </tr><tr> 81 </tr>
82 <tr>
68 <td><a href="#SafeBrowsingAPIClient.definedThreatTypes">definedThreatTypes</a></td> 83 <td><a href="#SafeBrowsingAPIClient.definedThreatTypes">definedThreatTypes</a></td>
69 <td>Class method to get all threat types defined in API v4.</td> 84 <td>Class method to get all threat types defined in API v4.</td>
70 </tr><tr> 85 </tr>
86 <tr>
71 <td><a href="#SafeBrowsingAPIClient.getPlatformString">getPlatformString</a></td> 87 <td><a href="#SafeBrowsingAPIClient.getPlatformString">getPlatformString</a></td>
72 <td>Class method to get the platform string for a given platform type.</td> 88 <td>Class method to get the platform string for a given platform type.</td>
73 </tr><tr> 89 </tr>
90 <tr>
74 <td><a href="#SafeBrowsingAPIClient.getPlatformTypes">getPlatformTypes</a></td> 91 <td><a href="#SafeBrowsingAPIClient.getPlatformTypes">getPlatformTypes</a></td>
75 <td>Class method to get the platform types for a given platform.</td> 92 <td>Class method to get the platform types for a given platform.</td>
76 </tr><tr> 93 </tr>
94 <tr>
77 <td><a href="#SafeBrowsingAPIClient.getThreatEntryString">getThreatEntryString</a></td> 95 <td><a href="#SafeBrowsingAPIClient.getThreatEntryString">getThreatEntryString</a></td>
78 <td>Class method to get the threat entry string.</td> 96 <td>Class method to get the threat entry string.</td>
79 </tr><tr> 97 </tr>
98 <tr>
80 <td><a href="#SafeBrowsingAPIClient.getThreatMessage">getThreatMessage</a></td> 99 <td><a href="#SafeBrowsingAPIClient.getThreatMessage">getThreatMessage</a></td>
81 <td>Class method to get a warning message for the given threat type.</td> 100 <td>Class method to get a warning message for the given threat type.</td>
82 </tr><tr> 101 </tr>
102 <tr>
83 <td><a href="#SafeBrowsingAPIClient.getThreatType">getThreatType</a></td> 103 <td><a href="#SafeBrowsingAPIClient.getThreatType">getThreatType</a></td>
84 <td>Class method to get a display string for a given threat type.</td> 104 <td>Class method to get a display string for a given threat type.</td>
85 </tr> 105 </tr>
86 </table> 106 </table>
87 <h3>Methods</h3> 107 <h3>Methods</h3>
88 <table> 108
109 <table>
110
89 <tr> 111 <tr>
90 <td><a href="#SafeBrowsingAPIClient.__init__">SafeBrowsingAPIClient</a></td> 112 <td><a href="#SafeBrowsingAPIClient.__init__">SafeBrowsingAPIClient</a></td>
91 <td>Constructor</td> 113 <td>Constructor</td>
92 </tr><tr> 114 </tr>
115 <tr>
93 <td><a href="#SafeBrowsingAPIClient.__extractData">__extractData</a></td> 116 <td><a href="#SafeBrowsingAPIClient.__extractData">__extractData</a></td>
94 <td>Private method to extract the data of a network reply.</td> 117 <td>Private method to extract the data of a network reply.</td>
95 </tr><tr> 118 </tr>
119 <tr>
96 <td><a href="#SafeBrowsingAPIClient.__setWaitDuration">__setWaitDuration</a></td> 120 <td><a href="#SafeBrowsingAPIClient.__setWaitDuration">__setWaitDuration</a></td>
97 <td>Private method to set the minimum wait duration.</td> 121 <td>Private method to set the minimum wait duration.</td>
98 </tr><tr> 122 </tr>
123 <tr>
99 <td><a href="#SafeBrowsingAPIClient.fairUseDelayExpired">fairUseDelayExpired</a></td> 124 <td><a href="#SafeBrowsingAPIClient.fairUseDelayExpired">fairUseDelayExpired</a></td>
100 <td>Public method to check, if the fair use wait period has expired.</td> 125 <td>Public method to check, if the fair use wait period has expired.</td>
101 </tr><tr> 126 </tr>
127 <tr>
102 <td><a href="#SafeBrowsingAPIClient.getFairUseDelayExpirationDateTime">getFairUseDelayExpirationDateTime</a></td> 128 <td><a href="#SafeBrowsingAPIClient.getFairUseDelayExpirationDateTime">getFairUseDelayExpirationDateTime</a></td>
103 <td>Public method to get the date and time the fair use delay will expire.</td> 129 <td>Public method to get the date and time the fair use delay will expire.</td>
104 </tr><tr> 130 </tr>
131 <tr>
105 <td><a href="#SafeBrowsingAPIClient.getFullHashes">getFullHashes</a></td> 132 <td><a href="#SafeBrowsingAPIClient.getFullHashes">getFullHashes</a></td>
106 <td>Public method to find full hashes matching hash prefixes.</td> 133 <td>Public method to find full hashes matching hash prefixes.</td>
107 </tr><tr> 134 </tr>
135 <tr>
108 <td><a href="#SafeBrowsingAPIClient.getThreatLists">getThreatLists</a></td> 136 <td><a href="#SafeBrowsingAPIClient.getThreatLists">getThreatLists</a></td>
109 <td>Public method to retrieve all available threat lists.</td> 137 <td>Public method to retrieve all available threat lists.</td>
110 </tr><tr> 138 </tr>
139 <tr>
111 <td><a href="#SafeBrowsingAPIClient.getThreatsUpdate">getThreatsUpdate</a></td> 140 <td><a href="#SafeBrowsingAPIClient.getThreatsUpdate">getThreatsUpdate</a></td>
112 <td>Public method to fetch hash prefix updates for the given threat list.</td> 141 <td>Public method to fetch hash prefix updates for the given threat list.</td>
113 </tr><tr> 142 </tr>
143 <tr>
114 <td><a href="#SafeBrowsingAPIClient.lookupUrl">lookupUrl</a></td> 144 <td><a href="#SafeBrowsingAPIClient.lookupUrl">lookupUrl</a></td>
115 <td>Public method to send an URL to Google for checking.</td> 145 <td>Public method to send an URL to Google for checking.</td>
116 </tr><tr> 146 </tr>
147 <tr>
117 <td><a href="#SafeBrowsingAPIClient.setApiKey">setApiKey</a></td> 148 <td><a href="#SafeBrowsingAPIClient.setApiKey">setApiKey</a></td>
118 <td>Public method to set the API key.</td> 149 <td>Public method to set the API key.</td>
119 </tr> 150 </tr>
120 </table> 151 </table>
121 <h3>Static Methods</h3> 152 <h3>Static Methods</h3>
153
122 <table> 154 <table>
123 <tr><td>None</td></tr> 155 <tr><td>None</td></tr>
124 </table> 156 </table>
157
125 <a NAME="SafeBrowsingAPIClient.definedPlatformTypes" ID="SafeBrowsingAPIClient.definedPlatformTypes"></a> 158 <a NAME="SafeBrowsingAPIClient.definedPlatformTypes" ID="SafeBrowsingAPIClient.definedPlatformTypes"></a>
126 <h4>SafeBrowsingAPIClient.definedPlatformTypes (class method)</h4> 159 <h4>SafeBrowsingAPIClient.definedPlatformTypes (class method)</h4>
127 <b>definedPlatformTypes</b>(<i></i>) 160 <b>definedPlatformTypes</b>(<i></i>)
161
128 <p> 162 <p>
129 Class method to get all platform types defined in API v4. 163 Class method to get all platform types defined in API v4.
130 </p><dl> 164 </p>
165 <dl>
131 <dt>Returns:</dt> 166 <dt>Returns:</dt>
132 <dd> 167 <dd>
133 list of all defined platform types 168 list of all defined platform types
134 </dd> 169 </dd>
135 </dl><dl> 170 </dl>
171 <dl>
136 <dt>Return Type:</dt> 172 <dt>Return Type:</dt>
137 <dd> 173 <dd>
138 list of str 174 list of str
139 </dd> 175 </dd>
140 </dl><a NAME="SafeBrowsingAPIClient.definedThreatEntryTypes" ID="SafeBrowsingAPIClient.definedThreatEntryTypes"></a> 176 </dl>
177 <a NAME="SafeBrowsingAPIClient.definedThreatEntryTypes" ID="SafeBrowsingAPIClient.definedThreatEntryTypes"></a>
141 <h4>SafeBrowsingAPIClient.definedThreatEntryTypes (class method)</h4> 178 <h4>SafeBrowsingAPIClient.definedThreatEntryTypes (class method)</h4>
142 <b>definedThreatEntryTypes</b>(<i></i>) 179 <b>definedThreatEntryTypes</b>(<i></i>)
180
143 <p> 181 <p>
144 Class method to get all threat entry types defined in API v4. 182 Class method to get all threat entry types defined in API v4.
145 </p><dl> 183 </p>
184 <dl>
146 <dt>Returns:</dt> 185 <dt>Returns:</dt>
147 <dd> 186 <dd>
148 list of all defined threat entry types 187 list of all defined threat entry types
149 </dd> 188 </dd>
150 </dl><dl> 189 </dl>
190 <dl>
151 <dt>Return Type:</dt> 191 <dt>Return Type:</dt>
152 <dd> 192 <dd>
153 list of str 193 list of str
154 </dd> 194 </dd>
155 </dl><a NAME="SafeBrowsingAPIClient.definedThreatTypes" ID="SafeBrowsingAPIClient.definedThreatTypes"></a> 195 </dl>
196 <a NAME="SafeBrowsingAPIClient.definedThreatTypes" ID="SafeBrowsingAPIClient.definedThreatTypes"></a>
156 <h4>SafeBrowsingAPIClient.definedThreatTypes (class method)</h4> 197 <h4>SafeBrowsingAPIClient.definedThreatTypes (class method)</h4>
157 <b>definedThreatTypes</b>(<i></i>) 198 <b>definedThreatTypes</b>(<i></i>)
199
158 <p> 200 <p>
159 Class method to get all threat types defined in API v4. 201 Class method to get all threat types defined in API v4.
160 </p><dl> 202 </p>
203 <dl>
161 <dt>Returns:</dt> 204 <dt>Returns:</dt>
162 <dd> 205 <dd>
163 list of defined threat types 206 list of defined threat types
164 </dd> 207 </dd>
165 </dl><dl> 208 </dl>
209 <dl>
166 <dt>Return Type:</dt> 210 <dt>Return Type:</dt>
167 <dd> 211 <dd>
168 list of str 212 list of str
169 </dd> 213 </dd>
170 </dl><a NAME="SafeBrowsingAPIClient.getPlatformString" ID="SafeBrowsingAPIClient.getPlatformString"></a> 214 </dl>
215 <a NAME="SafeBrowsingAPIClient.getPlatformString" ID="SafeBrowsingAPIClient.getPlatformString"></a>
171 <h4>SafeBrowsingAPIClient.getPlatformString (class method)</h4> 216 <h4>SafeBrowsingAPIClient.getPlatformString (class method)</h4>
172 <b>getPlatformString</b>(<i>platformType</i>) 217 <b>getPlatformString</b>(<i>platformType</i>)
218
173 <p> 219 <p>
174 Class method to get the platform string for a given platform type. 220 Class method to get the platform string for a given platform type.
175 </p><dl> 221 </p>
222 <dl>
223
176 <dt><i>platformType</i> (str)</dt> 224 <dt><i>platformType</i> (str)</dt>
177 <dd> 225 <dd>
178 platform type as defined in the v4 API 226 platform type as defined in the v4 API
179 </dd> 227 </dd>
180 </dl><dl> 228 </dl>
229 <dl>
181 <dt>Returns:</dt> 230 <dt>Returns:</dt>
182 <dd> 231 <dd>
183 platform string 232 platform string
184 </dd> 233 </dd>
185 </dl><dl> 234 </dl>
235 <dl>
186 <dt>Return Type:</dt> 236 <dt>Return Type:</dt>
187 <dd> 237 <dd>
188 str 238 str
189 </dd> 239 </dd>
190 </dl><a NAME="SafeBrowsingAPIClient.getPlatformTypes" ID="SafeBrowsingAPIClient.getPlatformTypes"></a> 240 </dl>
241 <a NAME="SafeBrowsingAPIClient.getPlatformTypes" ID="SafeBrowsingAPIClient.getPlatformTypes"></a>
191 <h4>SafeBrowsingAPIClient.getPlatformTypes (class method)</h4> 242 <h4>SafeBrowsingAPIClient.getPlatformTypes (class method)</h4>
192 <b>getPlatformTypes</b>(<i>platform</i>) 243 <b>getPlatformTypes</b>(<i>platform</i>)
244
193 <p> 245 <p>
194 Class method to get the platform types for a given platform. 246 Class method to get the platform types for a given platform.
195 </p><dl> 247 </p>
248 <dl>
249
196 <dt><i>platform</i> (str (one of 'linux', 'windows', 'macos'))</dt> 250 <dt><i>platform</i> (str (one of 'linux', 'windows', 'macos'))</dt>
197 <dd> 251 <dd>
198 platform string 252 platform string
199 </dd> 253 </dd>
200 </dl><dl> 254 </dl>
255 <dl>
201 <dt>Returns:</dt> 256 <dt>Returns:</dt>
202 <dd> 257 <dd>
203 list of platform types as defined in the v4 API for the 258 list of platform types as defined in the v4 API for the
204 given platform 259 given platform
205 </dd> 260 </dd>
206 </dl><dl> 261 </dl>
262 <dl>
207 <dt>Return Type:</dt> 263 <dt>Return Type:</dt>
208 <dd> 264 <dd>
209 list of str 265 list of str
210 </dd> 266 </dd>
211 </dl><dl> 267 </dl>
268 <dl>
269
212 <dt>Raises <b>ValueError</b>:</dt> 270 <dt>Raises <b>ValueError</b>:</dt>
213 <dd> 271 <dd>
214 raised to indicate an invalid platform string 272 raised to indicate an invalid platform string
215 </dd> 273 </dd>
216 </dl><a NAME="SafeBrowsingAPIClient.getThreatEntryString" ID="SafeBrowsingAPIClient.getThreatEntryString"></a> 274 </dl>
275 <a NAME="SafeBrowsingAPIClient.getThreatEntryString" ID="SafeBrowsingAPIClient.getThreatEntryString"></a>
217 <h4>SafeBrowsingAPIClient.getThreatEntryString (class method)</h4> 276 <h4>SafeBrowsingAPIClient.getThreatEntryString (class method)</h4>
218 <b>getThreatEntryString</b>(<i>threatEntry</i>) 277 <b>getThreatEntryString</b>(<i>threatEntry</i>)
278
219 <p> 279 <p>
220 Class method to get the threat entry string. 280 Class method to get the threat entry string.
221 </p><dl> 281 </p>
282 <dl>
283
222 <dt><i>threatEntry</i> (str)</dt> 284 <dt><i>threatEntry</i> (str)</dt>
223 <dd> 285 <dd>
224 threat entry type as defined in the v4 API 286 threat entry type as defined in the v4 API
225 </dd> 287 </dd>
226 </dl><dl> 288 </dl>
289 <dl>
227 <dt>Returns:</dt> 290 <dt>Returns:</dt>
228 <dd> 291 <dd>
229 threat entry string 292 threat entry string
230 </dd> 293 </dd>
231 </dl><dl> 294 </dl>
295 <dl>
232 <dt>Return Type:</dt> 296 <dt>Return Type:</dt>
233 <dd> 297 <dd>
234 str 298 str
235 </dd> 299 </dd>
236 </dl><a NAME="SafeBrowsingAPIClient.getThreatMessage" ID="SafeBrowsingAPIClient.getThreatMessage"></a> 300 </dl>
301 <a NAME="SafeBrowsingAPIClient.getThreatMessage" ID="SafeBrowsingAPIClient.getThreatMessage"></a>
237 <h4>SafeBrowsingAPIClient.getThreatMessage (class method)</h4> 302 <h4>SafeBrowsingAPIClient.getThreatMessage (class method)</h4>
238 <b>getThreatMessage</b>(<i>threatType</i>) 303 <b>getThreatMessage</b>(<i>threatType</i>)
304
239 <p> 305 <p>
240 Class method to get a warning message for the given threat type. 306 Class method to get a warning message for the given threat type.
241 </p><dl> 307 </p>
308 <dl>
309
242 <dt><i>threatType</i> (str)</dt> 310 <dt><i>threatType</i> (str)</dt>
243 <dd> 311 <dd>
244 threat type to get the message for 312 threat type to get the message for
245 </dd> 313 </dd>
246 </dl><dl> 314 </dl>
315 <dl>
247 <dt>Returns:</dt> 316 <dt>Returns:</dt>
248 <dd> 317 <dd>
249 threat message 318 threat message
250 </dd> 319 </dd>
251 </dl><dl> 320 </dl>
321 <dl>
252 <dt>Return Type:</dt> 322 <dt>Return Type:</dt>
253 <dd> 323 <dd>
254 str 324 str
255 </dd> 325 </dd>
256 </dl><a NAME="SafeBrowsingAPIClient.getThreatType" ID="SafeBrowsingAPIClient.getThreatType"></a> 326 </dl>
327 <a NAME="SafeBrowsingAPIClient.getThreatType" ID="SafeBrowsingAPIClient.getThreatType"></a>
257 <h4>SafeBrowsingAPIClient.getThreatType (class method)</h4> 328 <h4>SafeBrowsingAPIClient.getThreatType (class method)</h4>
258 <b>getThreatType</b>(<i>threatType</i>) 329 <b>getThreatType</b>(<i>threatType</i>)
330
259 <p> 331 <p>
260 Class method to get a display string for a given threat type. 332 Class method to get a display string for a given threat type.
261 </p><dl> 333 </p>
334 <dl>
335
262 <dt><i>threatType</i> (str)</dt> 336 <dt><i>threatType</i> (str)</dt>
263 <dd> 337 <dd>
264 threat type to get display string for 338 threat type to get display string for
265 </dd> 339 </dd>
266 </dl><dl> 340 </dl>
341 <dl>
267 <dt>Returns:</dt> 342 <dt>Returns:</dt>
268 <dd> 343 <dd>
269 display string 344 display string
270 </dd> 345 </dd>
271 </dl><dl> 346 </dl>
347 <dl>
272 <dt>Return Type:</dt> 348 <dt>Return Type:</dt>
273 <dd> 349 <dd>
274 str 350 str
275 </dd> 351 </dd>
276 </dl><a NAME="SafeBrowsingAPIClient.__init__" ID="SafeBrowsingAPIClient.__init__"></a> 352 </dl>
353 <a NAME="SafeBrowsingAPIClient.__init__" ID="SafeBrowsingAPIClient.__init__"></a>
277 <h4>SafeBrowsingAPIClient (Constructor)</h4> 354 <h4>SafeBrowsingAPIClient (Constructor)</h4>
278 <b>SafeBrowsingAPIClient</b>(<i>apiKey, fairUse=True, parent=None</i>) 355 <b>SafeBrowsingAPIClient</b>(<i>apiKey, fairUse=True, parent=None</i>)
356
279 <p> 357 <p>
280 Constructor 358 Constructor
281 </p><dl> 359 </p>
360 <dl>
361
282 <dt><i>apiKey</i> (str)</dt> 362 <dt><i>apiKey</i> (str)</dt>
283 <dd> 363 <dd>
284 API key to be used 364 API key to be used
285 </dd><dt><i>fairUse</i> (bool)</dt> 365 </dd>
366 <dt><i>fairUse</i> (bool)</dt>
286 <dd> 367 <dd>
287 flag indicating to follow the fair use policy 368 flag indicating to follow the fair use policy
288 </dd><dt><i>parent</i> (QObject)</dt> 369 </dd>
370 <dt><i>parent</i> (QObject)</dt>
289 <dd> 371 <dd>
290 reference to the parent object 372 reference to the parent object
291 </dd> 373 </dd>
292 </dl><a NAME="SafeBrowsingAPIClient.__extractData" ID="SafeBrowsingAPIClient.__extractData"></a> 374 </dl>
375 <a NAME="SafeBrowsingAPIClient.__extractData" ID="SafeBrowsingAPIClient.__extractData"></a>
293 <h4>SafeBrowsingAPIClient.__extractData</h4> 376 <h4>SafeBrowsingAPIClient.__extractData</h4>
294 <b>__extractData</b>(<i>reply</i>) 377 <b>__extractData</b>(<i>reply</i>)
378
295 <p> 379 <p>
296 Private method to extract the data of a network reply. 380 Private method to extract the data of a network reply.
297 </p><dl> 381 </p>
382 <dl>
383
298 <dt><i>reply</i> (QNetworkReply)</dt> 384 <dt><i>reply</i> (QNetworkReply)</dt>
299 <dd> 385 <dd>
300 reference to the network reply object 386 reference to the network reply object
301 </dd> 387 </dd>
302 </dl><dl> 388 </dl>
389 <dl>
303 <dt>Returns:</dt> 390 <dt>Returns:</dt>
304 <dd> 391 <dd>
305 extracted data 392 extracted data
306 </dd> 393 </dd>
307 </dl><dl> 394 </dl>
395 <dl>
308 <dt>Return Type:</dt> 396 <dt>Return Type:</dt>
309 <dd> 397 <dd>
310 list or dict 398 list or dict
311 </dd> 399 </dd>
312 </dl><a NAME="SafeBrowsingAPIClient.__setWaitDuration" ID="SafeBrowsingAPIClient.__setWaitDuration"></a> 400 </dl>
401 <a NAME="SafeBrowsingAPIClient.__setWaitDuration" ID="SafeBrowsingAPIClient.__setWaitDuration"></a>
313 <h4>SafeBrowsingAPIClient.__setWaitDuration</h4> 402 <h4>SafeBrowsingAPIClient.__setWaitDuration</h4>
314 <b>__setWaitDuration</b>(<i>minimumWaitDuration</i>) 403 <b>__setWaitDuration</b>(<i>minimumWaitDuration</i>)
404
315 <p> 405 <p>
316 Private method to set the minimum wait duration. 406 Private method to set the minimum wait duration.
317 </p><dl> 407 </p>
408 <dl>
409
318 <dt><i>minimumWaitDuration</i> (str)</dt> 410 <dt><i>minimumWaitDuration</i> (str)</dt>
319 <dd> 411 <dd>
320 duration to be set 412 duration to be set
321 </dd> 413 </dd>
322 </dl><a NAME="SafeBrowsingAPIClient.fairUseDelayExpired" ID="SafeBrowsingAPIClient.fairUseDelayExpired"></a> 414 </dl>
415 <a NAME="SafeBrowsingAPIClient.fairUseDelayExpired" ID="SafeBrowsingAPIClient.fairUseDelayExpired"></a>
323 <h4>SafeBrowsingAPIClient.fairUseDelayExpired</h4> 416 <h4>SafeBrowsingAPIClient.fairUseDelayExpired</h4>
324 <b>fairUseDelayExpired</b>(<i></i>) 417 <b>fairUseDelayExpired</b>(<i></i>)
418
325 <p> 419 <p>
326 Public method to check, if the fair use wait period has expired. 420 Public method to check, if the fair use wait period has expired.
327 </p><dl> 421 </p>
422 <dl>
328 <dt>Returns:</dt> 423 <dt>Returns:</dt>
329 <dd> 424 <dd>
330 flag indicating expiration 425 flag indicating expiration
331 </dd> 426 </dd>
332 </dl><dl> 427 </dl>
428 <dl>
333 <dt>Return Type:</dt> 429 <dt>Return Type:</dt>
334 <dd> 430 <dd>
335 bool 431 bool
336 </dd> 432 </dd>
337 </dl><a NAME="SafeBrowsingAPIClient.getFairUseDelayExpirationDateTime" ID="SafeBrowsingAPIClient.getFairUseDelayExpirationDateTime"></a> 433 </dl>
434 <a NAME="SafeBrowsingAPIClient.getFairUseDelayExpirationDateTime" ID="SafeBrowsingAPIClient.getFairUseDelayExpirationDateTime"></a>
338 <h4>SafeBrowsingAPIClient.getFairUseDelayExpirationDateTime</h4> 435 <h4>SafeBrowsingAPIClient.getFairUseDelayExpirationDateTime</h4>
339 <b>getFairUseDelayExpirationDateTime</b>(<i></i>) 436 <b>getFairUseDelayExpirationDateTime</b>(<i></i>)
437
340 <p> 438 <p>
341 Public method to get the date and time the fair use delay will expire. 439 Public method to get the date and time the fair use delay will expire.
342 </p><dl> 440 </p>
441 <dl>
343 <dt>Returns:</dt> 442 <dt>Returns:</dt>
344 <dd> 443 <dd>
345 fair use delay expiration date and time 444 fair use delay expiration date and time
346 </dd> 445 </dd>
347 </dl><dl> 446 </dl>
447 <dl>
348 <dt>Return Type:</dt> 448 <dt>Return Type:</dt>
349 <dd> 449 <dd>
350 QDateTime 450 QDateTime
351 </dd> 451 </dd>
352 </dl><a NAME="SafeBrowsingAPIClient.getFullHashes" ID="SafeBrowsingAPIClient.getFullHashes"></a> 452 </dl>
453 <a NAME="SafeBrowsingAPIClient.getFullHashes" ID="SafeBrowsingAPIClient.getFullHashes"></a>
353 <h4>SafeBrowsingAPIClient.getFullHashes</h4> 454 <h4>SafeBrowsingAPIClient.getFullHashes</h4>
354 <b>getFullHashes</b>(<i>prefixes, clientState</i>) 455 <b>getFullHashes</b>(<i>prefixes, clientState</i>)
456
355 <p> 457 <p>
356 Public method to find full hashes matching hash prefixes. 458 Public method to find full hashes matching hash prefixes.
357 </p><dl> 459 </p>
460 <dl>
461
358 <dt><i>prefixes</i> (list of str (Python 2) or list of bytes (Python 3))</dt> 462 <dt><i>prefixes</i> (list of str (Python 2) or list of bytes (Python 3))</dt>
359 <dd> 463 <dd>
360 list of hash prefixes to find 464 list of hash prefixes to find
361 </dd><dt><i>clientState</i> (dict)</dt> 465 </dd>
466 <dt><i>clientState</i> (dict)</dt>
362 <dd> 467 <dd>
363 dictionary of client states with keys like 468 dictionary of client states with keys like
364 (threatType, platformType, threatEntryType) 469 (threatType, platformType, threatEntryType)
365 </dd> 470 </dd>
366 </dl><dl> 471 </dl>
472 <dl>
367 <dt>Returns:</dt> 473 <dt>Returns:</dt>
368 <dd> 474 <dd>
369 dictionary containing the list of found hashes and the 475 dictionary containing the list of found hashes and the
370 negative cache duration 476 negative cache duration
371 </dd> 477 </dd>
372 </dl><dl> 478 </dl>
479 <dl>
373 <dt>Return Type:</dt> 480 <dt>Return Type:</dt>
374 <dd> 481 <dd>
375 dict 482 dict
376 </dd> 483 </dd>
377 </dl><a NAME="SafeBrowsingAPIClient.getThreatLists" ID="SafeBrowsingAPIClient.getThreatLists"></a> 484 </dl>
485 <a NAME="SafeBrowsingAPIClient.getThreatLists" ID="SafeBrowsingAPIClient.getThreatLists"></a>
378 <h4>SafeBrowsingAPIClient.getThreatLists</h4> 486 <h4>SafeBrowsingAPIClient.getThreatLists</h4>
379 <b>getThreatLists</b>(<i></i>) 487 <b>getThreatLists</b>(<i></i>)
488
380 <p> 489 <p>
381 Public method to retrieve all available threat lists. 490 Public method to retrieve all available threat lists.
382 </p><dl> 491 </p>
492 <dl>
383 <dt>Returns:</dt> 493 <dt>Returns:</dt>
384 <dd> 494 <dd>
385 tuple containing list of threat lists and an error message 495 tuple containing list of threat lists and an error message
386 </dd> 496 </dd>
387 </dl><dl> 497 </dl>
498 <dl>
388 <dt>Return Type:</dt> 499 <dt>Return Type:</dt>
389 <dd> 500 <dd>
390 tuple of (list of dict containing 'threatType', 'platformType' 501 tuple of (list of dict containing 'threatType', 'platformType'
391 and 'threatEntryType', bool) 502 and 'threatEntryType', bool)
392 </dd> 503 </dd>
393 </dl><a NAME="SafeBrowsingAPIClient.getThreatsUpdate" ID="SafeBrowsingAPIClient.getThreatsUpdate"></a> 504 </dl>
505 <a NAME="SafeBrowsingAPIClient.getThreatsUpdate" ID="SafeBrowsingAPIClient.getThreatsUpdate"></a>
394 <h4>SafeBrowsingAPIClient.getThreatsUpdate</h4> 506 <h4>SafeBrowsingAPIClient.getThreatsUpdate</h4>
395 <b>getThreatsUpdate</b>(<i>clientStates</i>) 507 <b>getThreatsUpdate</b>(<i>clientStates</i>)
508
396 <p> 509 <p>
397 Public method to fetch hash prefix updates for the given threat list. 510 Public method to fetch hash prefix updates for the given threat list.
398 </p><dl> 511 </p>
512 <dl>
513
399 <dt><i>clientStates</i> (dict)</dt> 514 <dt><i>clientStates</i> (dict)</dt>
400 <dd> 515 <dd>
401 dictionary of client states with keys like 516 dictionary of client states with keys like
402 (threatType, platformType, threatEntryType) 517 (threatType, platformType, threatEntryType)
403 </dd> 518 </dd>
404 </dl><dl> 519 </dl>
520 <dl>
405 <dt>Returns:</dt> 521 <dt>Returns:</dt>
406 <dd> 522 <dd>
407 tuple containing the list of threat updates and an error 523 tuple containing the list of threat updates and an error
408 message 524 message
409 </dd> 525 </dd>
410 </dl><dl> 526 </dl>
527 <dl>
411 <dt>Return Type:</dt> 528 <dt>Return Type:</dt>
412 <dd> 529 <dd>
413 tuple of (list of dict, bool) 530 tuple of (list of dict, bool)
414 </dd> 531 </dd>
415 </dl><a NAME="SafeBrowsingAPIClient.lookupUrl" ID="SafeBrowsingAPIClient.lookupUrl"></a> 532 </dl>
533 <a NAME="SafeBrowsingAPIClient.lookupUrl" ID="SafeBrowsingAPIClient.lookupUrl"></a>
416 <h4>SafeBrowsingAPIClient.lookupUrl</h4> 534 <h4>SafeBrowsingAPIClient.lookupUrl</h4>
417 <b>lookupUrl</b>(<i>url, platforms</i>) 535 <b>lookupUrl</b>(<i>url, platforms</i>)
536
418 <p> 537 <p>
419 Public method to send an URL to Google for checking. 538 Public method to send an URL to Google for checking.
420 </p><dl> 539 </p>
540 <dl>
541
421 <dt><i>url</i> (QUrl)</dt> 542 <dt><i>url</i> (QUrl)</dt>
422 <dd> 543 <dd>
423 URL to be checked 544 URL to be checked
424 </dd><dt><i>platforms</i> (list of str)</dt> 545 </dd>
546 <dt><i>platforms</i> (list of str)</dt>
425 <dd> 547 <dd>
426 list of platform types to check against 548 list of platform types to check against
427 </dd> 549 </dd>
428 </dl><dl> 550 </dl>
551 <dl>
429 <dt>Returns:</dt> 552 <dt>Returns:</dt>
430 <dd> 553 <dd>
431 tuple containing the list of threat list info objects and 554 tuple containing the list of threat list info objects and
432 an error message 555 an error message
433 </dd> 556 </dd>
434 </dl><dl> 557 </dl>
558 <dl>
435 <dt>Return Type:</dt> 559 <dt>Return Type:</dt>
436 <dd> 560 <dd>
437 tuple of (list of ThreatList, str) 561 tuple of (list of ThreatList, str)
438 </dd> 562 </dd>
439 </dl><a NAME="SafeBrowsingAPIClient.setApiKey" ID="SafeBrowsingAPIClient.setApiKey"></a> 563 </dl>
564 <a NAME="SafeBrowsingAPIClient.setApiKey" ID="SafeBrowsingAPIClient.setApiKey"></a>
440 <h4>SafeBrowsingAPIClient.setApiKey</h4> 565 <h4>SafeBrowsingAPIClient.setApiKey</h4>
441 <b>setApiKey</b>(<i>apiKey</i>) 566 <b>setApiKey</b>(<i>apiKey</i>)
567
442 <p> 568 <p>
443 Public method to set the API key. 569 Public method to set the API key.
444 </p><dl> 570 </p>
571 <dl>
572
445 <dt><i>apiKey</i> (str)</dt> 573 <dt><i>apiKey</i> (str)</dt>
446 <dd> 574 <dd>
447 API key to be set 575 API key to be set
448 </dd> 576 </dd>
449 </dl> 577 </dl>

eric ide

mercurial