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

Function getQuestionData

packages/leetcode-cli/src/leetcode.js:128–141  ·  view source on GitHub ↗
(titleSlug)

Source from the content-addressed store, hash-verified

126
127// get details of ac code.
128const getQuestionData = async (titleSlug) => {
129 const qglRequest = await createGqlRequest()
130 // interface from 'https://leetcode-cn.com/problems/add-two-numbers/'
131 const json = await qglRequest(`{
132 question(titleSlug: "${titleSlug}") {
133 topicTags {
134 name
135 slug
136 }
137 }
138 }`)
139 const question = json.question || {}
140 return question
141}
142
143module.exports = {
144 login,

Callers 1

auxFunction · 0.85

Calls 1

createGqlRequestFunction · 0.85

Tested by

no test coverage detected