-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add string constants for data-sources and for requiring them
- Loading branch information
Enrico B
committed
Aug 1, 2017
1 parent
54b060e
commit 7e8e640
Showing
19 changed files
with
63 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,8 @@ | ||
module.exports = { | ||
NewsAPI: require('./sources/news-api'), | ||
CoinMarketCap: require('./sources/coin-market-cap'), | ||
HackerNews: require('./sources/hacker-news'), | ||
Sidebar: require('./sources/sidebar'), | ||
Reddit: require('./sources/reddit'), | ||
ProductHunt: require('./sources/product-hunt'), | ||
IndieHackers: require('./sources/indie-hackers'), | ||
DesignerNews: require('./sources/designer-news'), | ||
BetaList: require('./sources/beta-list'), | ||
TheOutline: require('./sources/the-outline'), | ||
AVClub: require('./sources/av-club'), | ||
MacRumors: require('./sources/mac-rumors'), | ||
FiveThirtyEight: require('./sources/538'), | ||
}; | ||
const types = require('./types'); | ||
|
||
/* | ||
Refactor feeds to use pubsubhhubbub | ||
module.exports = Object.keys(types).reduce((acc, type) => { | ||
let typeString = types[type]; | ||
acc[type] = require(`./sources/${typeString}`); | ||
return acc; | ||
}, {}); | ||
|
||
Things that should be feeds: | ||
hackernews | ||
sidebar | ||
DONE: | ||
producthunt: https://www.producthunt.com/ | ||
SCRAP - indiehackers: https://www.indiehackers.com/ | ||
designernews: https://www.designernews.co/?format=rss | ||
betalist: https://betalist.com/ | ||
theoutline: https://theoutline.com/feeds/recent.rss | ||
avclub: http://www.avclub.com/rss/ | ||
fivethirtyeight: https://fivethirtyeight.com/features/feed/ | ||
TODOS: | ||
macrumors: https://www.macrumors.com/ | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
const FeedParser = require('feedparser-promised'); | ||
|
||
class Feed { | ||
|
||
constructor(uri, type) { | ||
const options = { | ||
uri, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
Constants of our data sources and their string representations. The strings | ||
are tied to file name, since index.js requires each type's class | ||
based on these strings. | ||
*/ | ||
module.exports = { | ||
538: '538', | ||
AVClub: 'av-club', | ||
BetaList: 'beta-list', | ||
CoinMarketCap: 'coin-market-cap', | ||
DesignerNews: 'designer-news', | ||
HackerNews: 'hacker-news', | ||
IndieHackers: 'indie-hackers', | ||
MacRumors: 'mac-rumors', | ||
ProductHunt: 'product-hunt', | ||
Reddit: 'reddit', | ||
Sidebar: 'sidebar', | ||
TheOutline: 'the-outline', | ||
NewsAPI: 'news-api' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters