1.2.2 • Published 6 years ago

fme-news-api v1.2.2

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

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 KEY@developer.gserviceaccount.com", "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

1.2.2

6 years ago

1.2.1

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago