Fosome / garb

A Ruby wrapper for the Google Analytics API
http://www.viget.com/extend/
655 stars 91 forks source link

Support for OAuth2::Response #109

Open KentonWhite opened 12 years ago

KentonWhite commented 12 years ago

Google API now supports OAuth2. The OAuth2 gem uses Faraday wrapped by its own OAuth2::Response class. This class behaves differently than Net::HTTP that the OAuth gem depends on. The key difference is that OAuth2::Response exposes a method OAuth2::Response#status that returns the status code for the request.

Modified Garb::Request::Data##send_request to check for Net::HTTPSuccess or status = 200 on the response. If neither are present, raise ClientError and return the body of the response.

adriandulic commented 12 years ago

Any chance this will be merged soon? Thanks!