lib/tumblr/request.rb in tumblr_client-0.7.3 vs lib/tumblr/request.rb in tumblr_client-0.7.4
- old
+ new
@@ -41,10 +41,13 @@
def respond(response)
if [201, 200].include?(response.status)
response.body['response']
else
- response.body['meta']
+ # surface the meta alongside response
+ res = response.body['meta'] || {}
+ res.merge! response.body['response'] if response.body['response'].is_a?(Hash)
+ res
end
end
end
end