Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

feat: add LBDailyQuestion command used to fetch daily question today #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MSDimos
Copy link

@MSDimos MSDimos commented Jul 30, 2023

Hello Dhanus,

this plugin is very useful, I use it a lot to solve leetcode problems.
If I want to solve daily problem, I need to open leetcode.com on my browser and click the button to open daily problem. And then copy the title and then use this plugin to search it. it's not "ergonomic" enough.

So I modify some codes and support the command 'LBDailyQuestion' which used to open daily problem directly.

Thanks for your CR.

@withOutUndo
Copy link

withOutUndo commented Aug 3, 2023

Hello @MSDimos, your only query leetcode.cn, but the query in leetcode.com is different, so you may need to add it. and change the README.

The graphQL of the leetcom.com is as follows:

query questionOfToday {
      activeDailyCodingChallengeQuestion {
        question {
          frontendQuestionId: questionFrontendId
          titleSlug
        }
      }
    }

And the "activeDailyCodingChallengeQuestion" field in response is not an array , and other fields can be left unqueried.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants