fme-news-api
v1.2.2
Published
newsApi interface for the FME/Xronos project
Downloads
92
Readme
Synopsis
Used by FortunesRocks.me LLC for news monitoring
Code Example
mongo.MongoClient.connect(mongoURL, async (err, db) => {
if (err) {
L.error("MongoDB not running? This package requires it");
throw err;
}
L.info("===> Mongo connected");
L.info("====> Have a new FmeNewsApi object");
var nApi = new FmeNewsApi(db,gsheetConfig,newsApiKey);
L.info("Setup Stream interface");
nApi.stream = myStream;
nApi.init();
L.info("=====> Inited the newsApi");
})
Format of gsheetConfig for the FeedsDb to read and find the feeds;
if you don't know how to get this, read the google-edit-sheets NPM
{ "oauthEmail" : "BIG LONG [email protected]", "oauthKeyFile" : "Path to GDOCS Pem file", "sheetId" : "unique key if for page", "debugLevel" : "info" }
Motivation
DrudgeReport is one of the most infulential news based websites in the world. Monirtoring the feed is crtical to news senstive markets.
Installation
npm install --save drudgereport
API Reference
Key:string = "Newsapi key"
gSheetConfg = "google-sheet-object" configuration file
export class FmeNewsArticle {
created_at : Date;
full_link : string;
guid : string;
image_url : string;
orig: any;
source: string;
source_type: string;
excerpt: string;
full_text: string;
full_html: string;
title: string;
author: any;
score: number;
}
Tests
There is a test-fme-news-api which is an implementation of the code above.
Contributors
FortunesRocks.me LLC contact me there if you have questions; npms + "than that litte a wrapped in a blanket"+fortunesrocks.me
License
ISC