Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/fnplus/news-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/fnplus/news-api

  • v0.0.0-20191226174517-301f0f8d5796
  • Source
  • Go
  • Socket score

Version published
Created
Source

news-api

FOSSA Status

A bot/worker/cron/process to fetch & curate all the relevant news content from the web based on the user's subscription.

How it works

This service is responsible for fetching the news related to the keywords that the users have subscribed to. The list of all keywords that users have subscribed to are present in the database.

  • The keywords are first fetched
  • Multiple workers are created to to fetch news concurrently
  • The keyqords are queued for the workers to pickup
  • Once a worker picks up a keyword, it will fetch the news from newsapi.org's REST api
  • Once the news is fetched, they are pushed to the database and the titles are cached locally. Because, the next time when the news is fetched, the same news should not be pushed to the dB again and again

This procedure is run multiple times in a day. Keep in mind, only the "new" news is sent to the database.

Installation

  1. First, fork and clone the repo. This will create a new folder named news-api.
  2. Navigate to /news-api and run:
go get -d
go build
./news-api

How to contribute

Read this

License

FOSSA Status

FAQs

Package last updated on 26 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc