23 Nov '13, 5pm

Handling API Rate Limits with Background Jobs

Handling API Rate Limits by Retrying Requests in Background Jobs Greg Lazarev November 23, 2013 ruby Has your app ever encountered a 429 (Too Many Requests) status code when making requests to a third-party API? Getting rate limited can be a nuisance and if not handled properly can result in a negative user experience. While one solution is to catch the exception and ignore it, a better solution is to retry the request. Let's take a look at how we can alleviate rate-limiting woes by utilizing a background job system. In this example we'll use delayed_job , since it provides the ability to retry failed jobs. We are going to assume that we are accessing an API of a Popular Website. First, we'll create a background job that makes a request to that API. class MyCustomJob < Struct.new(:username) def perform PopularSiteApi.get("/feed/#{username}") end end When this job gets exec...

Full article: http://robots.thoughtbot.com/handling-api-rate-limits/

Tweets

@28Bytes Take a gander at this:

name.com 30 Nov '13, 1am

Welcome to the name.com beta API page. Our API (V2) is now available for general use. The API requires programming knowled...

@rhannequin now i'm working on authenticating a...

railscasts.com 27 Nov '13, 2am

, we showed you how to build a versioned API for a store application. We can interact with this application through JSON i...

Caching API Requests

rubyflow.com 30 Nov '13, 1am

Posted by croaky on November 30, 2013 — 0 comments When making requests to an external service's API, some requests will f...

Caching API Requests

robots.thoughtbot.com 30 Nov '13, 1am

Dan Croak November 29, 2013 ruby When making requests to an external service's API, some requests will frequently occur wi...

Caching API Requests

robots.thoughtbot.com 01 Dec '13, 4am

Dan Croak November 29, 2013 ruby When making requests to an external service's API, some requests will frequently occur wi...

Ruby and Python Libraries for Yammer's API

robots.thoughtbot.com 25 Nov '13, 5am

Ruby and Python Libraries for Yammer's API Adarsh Pandit November 24, 2013 ruby python We've worked closely with folks at ...

FTs create good jobs for Sinkies

FTs create good jobs for Sinkies

Action, Action and that is what is needed. Singaporeans must not just complain. They must take action to recover Singapore...