Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

A Twitter bot that'll tell you what government bills are up for debate today at the Canadian parliament.

Notifications You must be signed in to change notification settings

ameyayeg/parliamentarybillbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Description

A Twitter bot that tells you what government bills are up for debate daily.

The project uses the following technologies:

  • Node
  • Twitter API
  • Axios
  • Cron Job

The bot is scheduled to tweet out every morning using the Cron Job package. A new instance of the package then makes an Axios get request to the Canadian House of Commons API endpoint. It will then output the government bills scheduled for debate that day.

How to install

First, you'll need to sign up with Twitter's developer platform to get access to the API. Once you sign up, please note down the following four keys, which you will have to store in an environment file:

  • API key
  • API key secret
  • Access token
  • Access token secret

Then, after cloning the repo, please make sure to use install all the dependiencies using the following:

$ npm install

Store the four aforementioned keys in a .env file as four separate variables, as such:

TWITTER_API_KEY="INSERT VARIABLE HERE"
TWITTER_API_SECRET="INSERT VARIABLE HERE"
TWITTER_ACCESS_TOKEN="INSERT VARIABLE HERE"
TWITTER_ACCESS_TOKEN_SECRET="INSERT VARIABLE HERE"

Then use $ node app.js in your terminal to spin up a local development server and you'll see the day's government bills tweeted out by your bot at 7 a.m. ET.

Screenshot 2022-10-02 at 19 07 11

Tada!

About

A Twitter bot that'll tell you what government bills are up for debate today at the Canadian parliament.

Topics

Resources

Stars

Watchers

Forks