forked from LeetCode-OpenSource/vscode-leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add daily challenge problem pick (LeetCode-OpenSource#919)
* feat: add daily chanllenge problem pick, both work on us and cn endpoint
- Loading branch information
1 parent
586b3e4
commit f539057
Showing
5 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { getUrl, getDailyQueryStr, getDailyProblemID } from "../shared"; | ||
import { LcAxios } from "../utils/httpUtils"; | ||
|
||
|
||
export const queryDailyProblem = async (): Promise<string> => { | ||
return LcAxios(getUrl("graphql"), { | ||
method: "POST", | ||
data: { | ||
query: getDailyQueryStr(), | ||
variables: {}, | ||
operationName: "questionOfToday" | ||
}, | ||
}).then((res) => getDailyProblemID(res)); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters