/happy-news-retrieval

Retrieve happy news from online sources to promote positivity across the web

Primary LanguageJupyter NotebookMIT LicenseMIT

happy-news-retrieval [Illustrative Description]

Retrieve happy news from online sources to promote positivity across the web

Setup

  1. create a database in postgres cli
psql postgres
CREATE DATABASE happy_news_retrieval_db;
CREATE USER admin WITH PASSWORD 'admin';
GRANT ALL PRIVILEGES ON DATABASE happy_news_retrieval_db TO admin;
  1. run init_db.py
python init_db.py

twitter api documentation

flask apis

  •  GET /tweets 

    body : json example:

  	{
  		'query'    : "football",
  		'user_id'  : "12345678"

  	}
  •  POST /click

body : json example:

  	{
  		'query'    : "football",
  		'tweet_id' : "12A12344",
  		'user_id'  : "12345678"

  	}