mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-06 05:03:44 +08:00
feat(radar): leetcode radar
This commit is contained in:
50
lib/v2/leetcode/radar.js
Normal file
50
lib/v2/leetcode/radar.js
Normal file
@@ -0,0 +1,50 @@
|
||||
module.exports = {
|
||||
'leetcode.com': {
|
||||
_name: 'LeetCode',
|
||||
'.': [
|
||||
{
|
||||
title: '文章',
|
||||
docs: 'https://docs.rsshub.app/programming.html#leetcode',
|
||||
source: ['/articles'],
|
||||
target: '/leetcode/articles',
|
||||
},
|
||||
{
|
||||
title: '打卡',
|
||||
docs: 'https://docs.rsshub.app/programming.html#leetcode',
|
||||
source: ['/:user'],
|
||||
target: (params) => {
|
||||
if (params.user !== 'articles') {
|
||||
return `/leetcode/submission/us/:user`;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '每日一题',
|
||||
docs: 'https://docs.rsshub.app/programming.html#leetcode',
|
||||
source: ['/'],
|
||||
target: '/leetcode/dailyquestion/en',
|
||||
},
|
||||
],
|
||||
},
|
||||
'leetcode.cn': {
|
||||
_name: 'LeetCode',
|
||||
'.': [
|
||||
{
|
||||
title: '打卡',
|
||||
docs: 'https://docs.rsshub.app/programming.html#leetcode',
|
||||
source: ['/:user'],
|
||||
target: (params) => {
|
||||
if (params.user !== 'articles') {
|
||||
return `/leetcode/submission/cn/:user`;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '每日一题',
|
||||
docs: 'https://docs.rsshub.app/programming.html#leetcode',
|
||||
source: ['/'],
|
||||
target: '/leetcode/dailyquestion/cn',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user