Skip to content

Commit c6d6cce

Browse files
authored
Merge pull request #13 from prius/dev-problemset-query
Added new graphql request (no backwards compatibility from here)
2 parents cac8c11 + fd72c1d commit c6d6cce

38 files changed

+1327
-53
lines changed

README.generated.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,16 @@ Class | Method | HTTP request | Description
223223

224224
## Documentation For Models
225225

226+
- [AnyOfGraphqlQueryVariables](docs/AnyOfGraphqlQueryVariables.md)
226227
- [AnyOfGraphqlQuestionDetailSolution](docs/AnyOfGraphqlQuestionDetailSolution.md)
227228
- [BaseSubmissionResult](docs/BaseSubmissionResult.md)
228229
- [Difficulty](docs/Difficulty.md)
229230
- [GraphqlData](docs/GraphqlData.md)
231+
- [GraphqlProblemsetQuestionList](docs/GraphqlProblemsetQuestionList.md)
230232
- [GraphqlQuery](docs/GraphqlQuery.md)
233+
- [GraphqlQueryGetQuestionDetailVariables](docs/GraphqlQueryGetQuestionDetailVariables.md)
234+
- [GraphqlQueryProblemsetQuestionListVariables](docs/GraphqlQueryProblemsetQuestionListVariables.md)
235+
- [GraphqlQueryProblemsetQuestionListVariablesFilterInput](docs/GraphqlQueryProblemsetQuestionListVariablesFilterInput.md)
231236
- [GraphqlQueryVariables](docs/GraphqlQueryVariables.md)
232237
- [GraphqlQuestionCodeSnippet](docs/GraphqlQuestionCodeSnippet.md)
233238
- [GraphqlQuestionContributor](docs/GraphqlQuestionContributor.md)

docs/AnyOfGraphqlQueryVariables.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# AnyOfGraphqlQueryVariables
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
7+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
8+

docs/GraphqlData.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**question** | [**GraphqlQuestionDetail**](GraphqlQuestionDetail.md) | | [optional]
77
**user** | [**GraphqlUser**](GraphqlUser.md) | | [optional]
8+
**problemset_question_list** | [**GraphqlProblemsetQuestionList**](GraphqlProblemsetQuestionList.md) | | [optional]
89

910
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1011

docs/GraphqlProblemsetQuestionList.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# GraphqlProblemsetQuestionList
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**total** | **int** | | [optional]
7+
**questions** | [**list[GraphqlQuestionDetail]**](GraphqlQuestionDetail.md) | | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+

docs/GraphqlQuery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**query** | **str** | |
7-
**variables** | [**GraphqlQueryVariables**](GraphqlQueryVariables.md) | |
7+
**variables** | [**AnyOfGraphqlQueryVariables**](AnyOfGraphqlQueryVariables.md) | |
88
**operation_name** | **str** | | [optional]
99

1010
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# GraphqlQueryGetQuestionDetailVariables
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**title_slug** | **str** | | [optional]
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# GraphqlQueryProblemsetQuestionListVariables
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**category_slug** | **str** | | [optional]
7+
**limit** | **int** | | [optional]
8+
**skip** | **int** | | [optional]
9+
**filters** | [**GraphqlQueryProblemsetQuestionListVariablesFilterInput**](GraphqlQueryProblemsetQuestionListVariablesFilterInput.md) | | [optional]
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# GraphqlQueryProblemsetQuestionListVariablesFilterInput
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**tags** | **list[str]** | | [optional]
7+
**difficulty** | **str** | | [optional]
8+
**status** | **str** | | [optional]
9+
**list_id** | **str** | | [optional]
10+
**premium_only** | **bool** | | [optional]
11+
12+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13+

docs/GraphqlQueryVariables.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**title_slug** | **str** | | [optional]
76

87
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
98

example.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import os
24
import sys
35
from time import sleep
@@ -10,9 +12,9 @@
1012

1113
# NOTE: cookies var is just a dict with `csrftoken` and `LEETCODE_SESSION`
1214
# fields which contain corresponding cookies from web browser
13-
leetcode_session = os.environ["LEETCODE_SESSION_ID"]
15+
leetcode_session: str = os.environ["LEETCODE_SESSION_ID"]
1416

15-
csrf_token = leetcode.auth.get_csrf_cookie(leetcode_session)
17+
csrf_token: str = leetcode.auth.get_csrf_cookie(leetcode_session)
1618

1719
configuration.api_key["x-csrftoken"] = csrf_token
1820
configuration.api_key["csrftoken"] = csrf_token

0 commit comments

Comments
 (0)