Posted on Fri 19 July 2013

Making Conditional Requests with Peter Murach's gem

GitHub imposes a rate limit on API requests, and encourages developers to use conditional requests. Here is how to do that using Peter's popular github api gem.

Method A - Faraday HTTP Cache w. ActiveSupport::Cache

This uses the faraday-http-cache gem, which takes care of expiration, etags, and response statuses.

Method B - Faraday HTTP Cache w. Moneta

More details are available in this issue.

Category: Software

Tags: ruby, github api

Jim LimGitHubLinkedInStackOverflowontoplist ⋅ Theme by Giulio Fidente.