MCPcopy Create free account
hub / github.com/MuYunyun/create-react-doc / getAllACQuestions

Function getAllACQuestions

packages/leetcode-cli/src/leetcode.js:109–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107 questions.filter(({ status }) => status === 'ac')
108
109const getAllACQuestions = async () => {
110 const gqlRequest = await createGqlRequest()
111 const spinner = ora('Fetching all questions...').start()
112 // interface see https://leetcode-cn.com/problems/add-two-numbers/
113 const json = await gqlRequest(`{
114 allQuestions{
115 title
116 titleSlug
117 status
118 difficulty
119 questionId,
120 }
121 }`)
122 spinner.stop()
123 const questions = json.allQuestions || []
124 return filterAcQuestions(questions)
125}
126
127// get details of ac code.
128const getQuestionData = async (titleSlug) => {

Callers 1

downloadFunction · 0.85

Calls 2

createGqlRequestFunction · 0.85
filterAcQuestionsFunction · 0.85

Tested by

no test coverage detected