fme-news-api
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i fme-news-api

Weekly Downloads

0

Version

1.2.2

License

ISC

Unpacked Size

45 kB

Total Files

29

Last publish

Collaborators

  • marlincobb