mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
feat(route): Unusual Whales (#10917)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
'/news': ['TonyRL'],
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
const got = require('@/utils/got');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
|
||||
const apiBase = 'https://phx.unusualwhales.com';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { data } = await got(`${apiBase}/api/fj_articles`);
|
||||
|
||||
const items = data.map((item) => ({
|
||||
title: item.title,
|
||||
description: item.description,
|
||||
link: item.url,
|
||||
pubDate: parseDate(item.publish_date),
|
||||
}));
|
||||
|
||||
ctx.state.data = {
|
||||
title: 'Flow - News',
|
||||
description: 'Explore unusual options, options flow, dark pools, short activity, and stock activity on unusualwhales.com. Unusual whales has a full news service available!',
|
||||
link: 'https://unusualwhales.com/news-feed',
|
||||
image: 'https://unusualwhales.com/android-icon-192x192.png',
|
||||
language: 'en-US',
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
module.exports = {
|
||||
'unusualwhales.com': {
|
||||
_name: 'Unusual Whales',
|
||||
'.': [
|
||||
{
|
||||
title: 'News Flow',
|
||||
docs: 'https://docs.rsshub.app/en/finance.html#unusual-whales',
|
||||
source: ['/news', '/'],
|
||||
target: '/unusualwhales/news',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = (router) => {
|
||||
router.get('/news', require('./news'));
|
||||
};
|
||||
Reference in New Issue
Block a user