Skip to content

codeforamerica/CutePetsDenver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CutePetsDenver

Post a random adoptable pet from Denver's shelter to a twitter feed.

Originated as a project of Team Denver during the 2014 fellowship at Code for America.

About

A twitter bot that pulls data from Adopt-A-Pet-Denver an API created by David Viramontes and Drew to serve data for animals currently in Denver animal shelters ready for adoption.

Originally specific to Denver, it's been redeployed by a few cities. Check out this twitter list to see where.

Links to API and Bot

Setup

Twitter

  1. Create a new twitter app.
  2. On the API key tab for the Twitter app, modify permissions so the app can Read and Write.
  3. Create an access token. On the API Key tab in Twitter for the app, click Create my access token
  4. Take note of the values for environment set up below. Note: It's important to change permissions to Read/Write before generating the access token. The access token is keyed for the specific access level and will not be updated when changing permissions.

Environmental variables

  1. Create a local .env file: cp template.env .env
  2. Fill in the twitter keys created above.

Run

rake

Deployment

Heroku

  1. Download and install the [Heroku Toolbelt](from: https://toolbelt.heroku.com).
  2. Create heroku project: heroku create [app name]
  3. Push code: heroku push heroku master
  4. Add environment variables
    1. heroku config:set consumer_key="your_consumer_key_goes_here"
    2. heroku config:set consumer_secret="your_consumer_secret_key_goes_here"
    3. heroku config:set access_token="your_access_token_goes_here"
    4. heroku config:set access_token_secret="your_access_token_secret_goes_here"
  5. Schedule Tweets
    1. Add the Heroku Scheduler add on: heroku addons:add scheduler
    2. Schedule tweets: heroku addons:open scheduler
    3. In the task field: rake.

Hat tips

About

This is a twitter bot that posts a random adoptable pet from Denver's shelter.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages