()
| 107 | questions.filter(({ status }) => status === 'ac') |
| 108 | |
| 109 | const 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. |
| 128 | const getQuestionData = async (titleSlug) => { |
no test coverage detected