Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ruleeeer/leetcode-daily-question

获取leetcode每日一题(get the daily question of leetcode)
https://github.com/ruleeeer/leetcode-daily-question

daily-questions leetcode

Last synced: 10 days ago
JSON representation

获取leetcode每日一题(get the daily question of leetcode)

Awesome Lists containing this project

README

        

English | [简体中文](./README_ZH.md)


A simple program to get leetcode daily questions, currently only support to get question under the leetcode.cn
+ simple, easy to use
+ no runtime dependencies
## Use Cases
### install
``` shell
npm install leetcode-daily-question
```
### Get the daily question
```ts
import {getTodayQuestion} from 'leetcode-daily-question';
getTodayQuestion()
.then(response => console.log(response))
.catch(err => console.error(err));
```
### Get the title according to the title
```ts
import {getQuestionByTitleId} from 'leetcode-daily-question';
const titleId = 'two-sum';
getQuestionByTitleId()
.then(response => console.log(response))
.catch(err => console.error(err));
```