codeforamerica/cfapi — pull request #97 by chrisrodz (2014-07-01 23:17:49+00:00)
Title: Add Conditional Requests to Github API Requests for Projects and Issues. Closes #84

### Summary

I modified the heavy Github API requests to use conditional headers. This closes #84 (and probably #91 as we shouldn't hit the maximum requests limit as often). Detailed additions below:

#### app.py
- Add `last_updated` field to Project model
- Add `last_updated_issues` field to Project model

#### run_update.py
- Modify `get_github_api` function to accept a headers dictionary
- Modify `update_project_info` to send `If-Modified-Since` header on requests to Github and save `last_updated` field when updating
- Modify `get_issues` to send `ETag` header on requests to Github and save `last_updated_issues` field to projects when updating

#### run_update_test.py
- Modify HTTMock responses to also send headers `Last-Modified` (for projects) and `ETag` (for issues)