File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ var Plugin = require ( '../plugin' ) ;
2+
3+ //
4+ // [Usage]
5+ //
6+ // https://github.com/skygragon/leetcode-cli-plugins/blob/master/docs/leetcode.cn.md
7+ //
8+ var plugin = new Plugin ( 15 , 'leetcode.cn' , '2018.05.29' ,
9+ 'Plugin to talk with leetcode-cn APIs.' ) ;
10+
11+ plugin . init = function ( ) {
12+ const config = require ( '../config' ) ;
13+ config . sys . urls . base = 'https://leetcode-cn.com' ;
14+ config . sys . urls . login = 'https://leetcode-cn.com/accounts/login/' ;
15+ config . sys . urls . problems = 'https://leetcode-cn.com/api/problems/$category/' ;
16+ config . sys . urls . problem = 'https://leetcode-cn.com/problems/$slug/description/' ;
17+ config . sys . urls . problem_detail = 'https://leetcode-cn.com/graphql' ;
18+ config . sys . urls . test = 'https://leetcode-cn.com/problems/$slug/interpret_solution/' ;
19+ config . sys . urls . session = 'https://leetcode-cn.com/session/' ;
20+ config . sys . urls . submit = 'https://leetcode-cn.com/problems/$slug/submit/' ;
21+ config . sys . urls . submissions = 'https://leetcode-cn.com/api/submissions/$slug' ;
22+ config . sys . urls . submission = 'https://leetcode-cn.com/submissions/detail/$id/' ;
23+ config . sys . urls . verify = 'https://leetcode-cn.com/submissions/detail/$id/check/' ;
24+ config . sys . urls . favorites = 'https://leetcode-cn.com/list/api/questions' ;
25+ config . sys . urls . favorite_delete = 'https://leetcode-cn.com/list/api/questions/$hash/$id' ;
26+ } ;
27+
28+ module . exports = plugin ;
You can’t perform that action at this time.
0 commit comments