Add utility method for grabbing entire raw response #66

merged 1 commit into from Mar 24, 2014


None yet
2 participants

I needed to access the values for 'X-Ratelimit-Limit' and 'X-Ratelimit-Remaining' Instagram provides in its headers (See Issue #63), so I created a very simple utility method that grabs the entire API response (including headers) instead of just the body.

Now I can get the values I need like this:

client = Instagram.client(:access_token => session[:access_token])
response = client.utils_raw_response
remaining = response.headers[:x_ratelimit_remaining]
limit = response.headers[:x_ratelimit_limit]

@heatonjb heatonjb merged commit f1da7d3 into facebookarchive:master Mar 24, 2014

erinnorr pushed a commit to erinnorr/instagram-ruby-gem that referenced this pull request Feb 1, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment