You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Question Status <sup>with-Cookie</sup>](#Question-Status-<sup>with-Cookie</sup>)
109
-
-[Submission ID <sup>with-Cookie-and-fake-referer</sup>](#Submission-ID-<sup>with-Cookie-and-fake-referer</sup>)
105
+
-[User Status](#User-Status)
106
+
-[Question Set](#Question-Set)
107
+
-[Question Detail](#Question-Detail)
108
+
-[Question Status](#Question-Status)
109
+
-[Submission ID](#Submission-ID)
110
110
-[Submission Detail](#Submission-Detail)
111
111
112
112
Cookie items mentioned in the table below refer to **LEETCODE_SESSION** and **x-csrftoken** items generated when users log in to the official website of Licou. The method of obtaining them is as follows: After logging in successfully using the browser, open the network item in the developer tool and look for the graphQL request in the successful state. The values of the two items can be found in the request information.
113
113
114
-
> If **with-Cookie** is marked on the interface, the data can be obtained only when the above two cookies are carried for network request. If **can-without-Cookie** is marked on the interface, complete data can be obtained only by carrying the above two cookies for network request (cookies with * in entries can be normally obtained only by carrying cookies). No annotation is an ordinary network request, and complete data can be normally obtained without carrying cookies.
114
+
> If **With-Cookie** is marked on the interface, the data can be obtained only when the above two cookies are carried for network request. If **Can-Without-Cookie** is marked on the interface, complete data can be obtained only by carrying the above two cookies for network request (cookies with * in entries can be normally obtained only by carrying cookies). No annotation is an ordinary network request, and complete data can be normally obtained without carrying cookies.
| allQuestionsBeta.questionId | String | Question ID |
327
335
| allQuestionsBeta.status | String | Question Status |
328
336
329
-
### Submission ID <sup>with-Cookie-and-fake-referer</sup>
337
+
### Submission ID
338
+
339
+
Type[**With-Cookie-and-Fake-Referer**]
330
340
331
341
```javascript
332
342
const$leetcode=new$Leetcode()
@@ -345,7 +355,7 @@ const $leetcode = new $Leetcode()
345
355
}) // must with cookie [LEETCODE_SESSION,x-csrftoken] and referer [https://leetcode-cn.com/problems/${questionSlug}/submissions/]
346
356
```
347
357
348
-
> Note that in this Api, Cookies must be carried at `https://leetcode-cn.com/problems/${questionSlug}/submit`, i.e. the URL visited, otherwise the **CSRF** validation of Leetcode will fail. At the same time, the Api also needs to forge the Referer as `https://leetcode-cn.com/problems/${questionSlug}/submissions/`, where the variable questionSlug in the string template is the title, It must be an optional value of `question.TitleSlug` in [Question Details API](#Question-Detail-<sup>can-without-Cookie</sup>)
358
+
> Note that in this Api, Cookies must be carried at `https://leetcode-cn.com/problems/${questionSlug}/submit`, i.e. the URL visited, otherwise the **CSRF** validation of Leetcode will fail. At the same time, the Api also needs to forge the Referer as `https://leetcode-cn.com/problems/${questionSlug}/submissions/`, where the variable questionSlug in the string template is the title, It must be an optional value of `question.TitleSlug` in [Question Details API](#Question-Detail)
349
359
350
360
Request data:
351
361
@@ -358,10 +368,10 @@ Request data:
358
368
359
369
Parameters:
360
370
361
-
-`question_id`,Question ID, which must be an optional value of `question.QuestionId` in [Question Details API](#Question Detail <sup>can-without-Cookie</sup>).
362
-
-`lang`, Question language, which must be an optional value of `question.codeSnippets.langSlug`in [Question Details API](#Question Detail <sup>can-without-Cookie</sup>)
371
+
-`question_id`,Question ID, which must be an optional value of `question.QuestionId` in [Question Details API](#Question Detail).
372
+
-`lang`, Question language, which must be an optional value of `question.codeSnippets.langSlug`in [Question Details API](#Question Detail)
363
373
-`typed_code`, Running code, test the problem solving code that runs.
364
-
-`questionSlug`, Question slug, which must be an optional value of `question.titleSlug` in [Question Details API](#Question Detail <sup>can-without-Cookie</sup>)
374
+
-`questionSlug`, Question slug, which must be an optional value of `question.titleSlug` in [Question Details API](#Question Detail)
365
375
- <s>`test_mode`</s>, test mode.
366
376
- <s>`test_judger`</s>, test judger.
367
377
@@ -394,7 +404,7 @@ Request data:
394
404
395
405
Parameters:
396
406
397
-
-`submission_id`,Submission ID, which must be an optional value of `submission_id` in [Submission ID API](#Submission-ID-<sup>with-Cookie-and-fake-referer</sup>).
407
+
-`submission_id`,Submission ID, which must be an optional value of `submission_id` in [Submission ID API](#Submission-ID).
0 commit comments