Commit Graph

269 Commits

Author SHA1 Message Date
Volker Zöpfel 7de9612071 adds old FileStorage again to be backward compatible 2013-11-14 18:09:48 +01:00
Volker Zöpfel 9ddc8b85dc make methods private 2013-11-14 17:40:54 +01:00
Volker Zöpfel c2135d9dcf split storages in own adapter classes, added redis adapter 2013-11-14 15:50:06 +01:00
Volker Zöpfel bd7cf179f3 adds Constants for Authorization_uri, Token_credentials_uri
extracts authorize
extracts credentials_hash
2013-11-14 14:45:36 +01:00
Volker Zöpfel bbb24a5d2e using the path= method on initialize 2013-11-14 08:32:47 +01:00
Volker Zöpfel 10a337b807 adds method path= to proof if file can be accessed 2013-11-14 08:31:21 +01:00
Volker Zöpfel 146ccad83a using symbols as hash keys 2013-11-14 08:19:21 +01:00
Volker Zöpfel 5538bded1f refactoring load_credentials
adding refresh_authorization

write_credentials now using the authorizations methods not the instance variables, Using the instance variables can cause problems.
2013-11-14 08:17:08 +01:00
Sergio Gomes f06f1e33fa Minor documentation fix 2013-10-29 13:25:55 +00:00
Sergio Gomes ef4541b6eb Removing service logger. Incorrect implementation; loggers are global instead, and set in a Google::APIClient class method 2013-10-29 13:17:39 +00:00
Sergio Gomes 0fd0dca2f4 Adding discovery document caching to Service interface 2013-10-29 12:59:52 +00:00
Sergio Gomes 876dddad36 Minor doc fix 2013-10-07 18:11:45 +01:00
Sergio Gomes 83d411990c Adding batch support to new service interface 2013-10-04 15:56:06 +01:00
Sergio Gomes 1e2405093b - Improving the Service interface with access to more properties
- Adding end-to-end spec
- Fixing bugs
2013-09-11 16:51:10 +01:00
Sergio Gomes e73ce124fa Initial version of new programming interface 2013-09-10 15:29:36 +01:00
Steven Bazyl 2a3965d976 Redo 0.7.0... 2013-09-09 13:58:13 -07:00
Steven Bazyl 855a7fc823 0.7.0.rc1 release 2013-09-09 13:23:09 -07:00
Steve Bazyl 8b128286c5 Merge pull request #71 from twelvelabs/master
fix "already initialized constant" warnings
2013-09-06 11:37:45 -07:00
Sergio Gomes 5249137d4c Removing empty file 2013-09-05 12:32:36 +01:00
Sergio Gomes c766975587 Ensuring that multivalued requests in the AdSense Management API actually work 2013-09-05 12:30:30 +01:00
Johan Euphrosine f5238bbf12 auth: perserve original option param 2013-08-15 14:19:37 -07:00
Johan Euphrosine 9d7735f031 auth: add compute service account 2013-08-14 16:29:16 -07:00
Sergio Gomes d1fe3c2277 Small fixes to client secrets:
- Load automatically with a "require 'google/api_client'"
- Allow for signet >= 0.4.0
2013-08-06 18:46:11 +01:00
Skip Baney 4143d900e0 don't require faraday/utils; faraday already includes it 2013-08-02 17:13:15 -05:00
Steven Bazyl 189473cc9e Remove example of deprecated use 2013-06-20 10:34:16 -07:00
Steven Bazyl 8aa50442ab Enable gzip compression 2013-06-19 17:37:38 -07:00
Steven Bazyl e8e2350612 Issue #57 - rewind body if possible when retrying 2013-06-18 16:35:38 -07:00
Steven Bazyl c45740b81c Fix normalization of parmeters keys 2013-06-18 15:51:46 -07:00
Steven Bazyl 903e568a65 No longer buffer chunks/files when using resumable upload 2013-06-18 12:15:02 -07:00
Steven Bazyl e27109078a Allow apps to override ca_file 2013-06-17 17:16:53 -07:00
Steven Bazyl f7307ec35d Remove unnecessary require 2013-05-31 17:22:18 -07:00
Steve Bazyl ef4e924a5c Merge pull request #52 from jeffposnick/master
Added support for caching OAuth 2 credentials to disk
2013-05-31 15:43:03 -07:00
Steven Bazyl d68dc4d27e Don't attempt resumable upload if initial response failed (Issue #32) 2013-05-31 15:41:00 -07:00
Steven Bazyl 664e21290a Bundle root certs 2013-05-31 15:38:00 -07:00
Jeff Posnick fb67a021e7 Added Google::APIClient::FileStorage, to save OAuth 2 credentials to disk
This is a (potentially rough) bit of code to persist OAuth 2
credentials to disk, similar to
http://google-api-python-client.googlecode.com/hg/docs/epy/oauth2client.
file.Storage-class.html

It can be used in the following manner, which roughly translates to
what the Python client library code looks like.

  file_storage = Google::APIClient::FileStorage.new("#{$0}-oauth2.json")
  if file_storage.authorization.nil?
    client_secrets = Google::APIClient::ClientSecrets.load
    flow = Google::APIClient::InstalledAppFlow.new(
      :client_id => client_secrets.client_id,
      :client_secret => client_secrets.client_secret,
      :scope => [SCOPE1, SCOPE2]
    )
    client.authorization = flow.authorize(file_storage)
  else
    client.authorization = file_storage.authorization
  end
2013-05-29 15:31:44 -04:00
Steven Bazyl aa7a254d23 Allow options when executing batch requests (#48) 2013-05-13 15:19:25 -07:00
Steven Bazyl 794c6a90f7 Upgrade to Faraday 0.9 (fixes params encoding problems) 2013-05-13 14:03:49 -07:00
Steven Bazyl bfafe1b0c8 Minor release 2013-03-25 21:37:52 -07:00
Steven Bazyl d9033a4f2a Remove broken require 2013-03-18 12:31:59 -07:00
Steven Bazyl 0b45f0d8b6 Check for existance of Railties (instead of Rails) before loading railtie) 2013-03-18 12:22:12 -07:00
Steven Bazyl 2c38f9fd09 Fix referesh of oauth token when passing credentials as param 2013-03-17 16:33:27 -07:00
Steven Bazyl ef4c5c1f2f Fix URI in batched request to allow query parameters 2013-02-15 13:13:58 -08:00
Steven Bazyl f421551018 Fix duplication of parameters in qeuery string 2013-01-22 22:14:50 -08:00
Steven Bazyl 0dafa5e4ee Minor release for updating signet 2013-01-18 09:21:13 -08:00
Steven Bazyl f369139b32 Minor release to fix service account impersonation 2013-01-14 17:00:58 -08:00
Oxana Goutnik 7d204ac507 fix for #22 impersonation 2013-01-12 10:29:47 -05:00
Steve Bazyl ee6f8ae6f9 Merge pull request #20 from simplymeasured/feature/make-autorefresh-of-token-optional
incorporate style feedback from @sporkmonger on #19 ab23fe7539
2013-01-04 16:59:20 -08:00
Steven Bazyl 55b4a94715 Fix odd conflict with VERSION & logger 2013-01-04 16:49:27 -08:00
Steven Bazyl 8ce4d052fe Add oauth helper for installed apps, update CLI 2013-01-04 16:14:59 -08:00
Steven Bazyl 1d7315ee9b Sprinkle of logging 2013-01-04 16:14:14 -08:00
Ryan Biesemeyer 84ddf9ba3c incorporate style feedback from @sporkmonger on ab23fe7539 2013-01-04 21:50:19 +00:00
Steven Bazyl 31a78788bd Add railtie 2013-01-02 20:07:17 -08:00
Steven Bazyl 7e3cacdb0e Define custom load/dump for serializing API instances 2013-01-02 16:13:26 -08:00
Steven Bazyl be3b436f58 Fix JWT example in docs 2013-01-02 16:12:47 -08:00
Steven Bazyl a631c4003a Read keyfile in binary mode 2013-01-02 12:59:43 -08:00
Steven Bazyl 1f0ea6338e Remove stray output to STDOUT 2013-01-02 12:55:52 -08:00
Steven Bazyl 250e9e7b2d Merge branch 'master' of https://github.com/google/google-api-ruby-client 2013-01-02 11:51:15 -08:00
Steven Bazyl 71fbe4a825 Use JWT support in signet, ignore broken PKCS12 tests on jruby 2013-01-02 11:50:45 -08:00
Steven Bazyl 8f453134d7 Initial logging support 2012-12-30 11:26:18 -08:00
Ryan Biesemeyer ab23fe7539 Make the auto-refresh of tokens configurable and optional; in distributed environments, this allows us to handle token refreshes in a way that does not hammer the auth endpoint. 2012-12-29 00:02:02 +00:00
Ranjib Dey bd04489a43 Ranjib| there is n method/instance variable named options inside serialize, to_hash should be invoke on 'body' instead 2012-12-27 13:36:08 -08:00
Steven Bazyl b0b03cc363 Fix stackoverflow tag, minor doc cleanup for batch API 2012-11-05 11:05:48 -08:00
Steven Bazyl 1c849c7e7a Refactor key loading to support PEM + fix issue #62 2012-11-02 13:56:53 -07:00
Steven Bazyl 01fc90b3fc Fix sample for JWTAsserter (missing .new) 2012-11-02 12:50:06 -07:00
Steven Bazyl 3d157007f6 Auto-refresh OAuth 2 tokens & retry request on 401 response 2012-10-30 13:18:12 -07:00
Steven Bazyl 5fea10a1d7 Re-org service account support 2012-10-10 14:28:46 -06:00
Steven Bazyl 8799e3a689 Move request class to its own file 2012-10-10 14:28:46 -06:00
Steven Bazyl 30d0ffc698 Issue 59 - handle 204 responses more gracefully 2012-10-10 14:28:46 -06:00
Steven Bazyl cd37e4bfea Doc improvements 2012-10-10 14:28:46 -06:00
Steven Bazyl 3dcd88a884 Expose discovery doc in prep for future doc changes 2012-10-10 14:28:46 -06:00
Steven Bazyl 000fedfbfb Add method for checking if upload can be resumed 2012-10-10 14:28:46 -06:00
Steven Bazyl e88dabaf4c Update docs re: api_method + allow options in array-style calls 2012-10-10 14:28:46 -06:00
Steven Bazyl 83ab4a681f More documentation cleanup 2012-10-10 14:28:46 -06:00
Steven Bazyl 9bd9ceb75c More documentation cleanup 2012-10-10 14:28:45 -06:00
Steven Bazyl 1fca089d62 Mostly doc updates, +remove support for method as string 2012-10-10 14:28:45 -06:00
Steven Bazyl b425658f2f Allow adjusting issued-at time to minimize clock skew issues 2012-10-10 14:28:45 -06:00
Steven Bazyl fc45135fcd Continue internal shuffling... 2012-10-10 14:28:45 -06:00
Steven Bazyl 2c6bf97b20 Unify processing of api/resumable/batch requests 2012-10-10 14:25:43 -06:00
Steven Bazyl 5d2a6d4842 Begin consolidation of request building in reference. Further changes coming to simplify batch + media handling 2012-10-10 14:24:25 -06:00
Steven Bazyl 9f51031a00 Consolidate request routing through execute methods 2012-10-10 14:24:25 -06:00
Steven Bazyl e421d1734d Remove embedded version #s, use Gemfile 2012-10-10 14:24:25 -06:00
Steven Bazyl 6a37993df7 Remove unnecessary normalization/fix addressable bug 2012-10-10 14:24:25 -06:00
Bob Aman 2c567fd720 Added the ability to create an authorization object from client secrets. 2012-10-05 12:07:42 +03:00
Bob Aman 2f630f6c1d Merge branch 'master' of github.com:google/google-api-ruby-client 2012-08-30 12:16:49 +03:00
Bob Aman 11155d3c39 Backwards compatibility for MultiJson. 2012-08-30 12:15:59 +03:00
Marc Lennox 0e5070c356 Syntax change to satisfy pull request 2012-08-18 21:12:54 -07:00
Marc Lennox 6795eeece9 Fixed an issue where the code was expecting parameters as a hash when in fact they are previously converted to an array 2012-08-18 16:43:57 -07:00
Steven Bazyl 1ff1a8e355 Issue 47 - Improve error handling on result 2012-08-01 00:28:39 +03:00
Bob Aman 9e55284329 Some debug statements snuck into the commit. 2012-08-01 00:20:29 +03:00
Bob Aman 992a698b0a Two failing tests, neither of which I can do much about. 2012-08-01 00:16:26 +03:00
Bob Aman 45bc8f4898 Removed trailing whitespace. 2012-07-31 23:57:45 +03:00
Bob Aman 10856af027 Updating version. 2012-07-31 16:56:54 +03:00
Bob Aman 3bc7d52764 Resolving issues introduced by Faraday dependency upgrade. 2012-07-21 13:51:23 +03:00
Bob Aman 5e751681dd Updating dependencies. 2012-07-21 13:51:23 +03:00
Steven Bazyl 47ed766eea New version of client lib 2012-06-11 15:59:29 -07:00
Steven Bazyl a9d46c0359 Resolve merge conflict 2012-06-06 17:32:29 -07:00
Steven Bazyl a7b40becc6 Allow credentials on per-request basis 2012-06-06 17:27:20 -07:00
Steven Bazyl f7a4db959d Initial support for service accounts 2012-06-06 17:25:44 -07:00
Sergio Gomes 2666acc24a Moving BatchError to errors.rb 2012-05-18 10:45:54 +01:00
Sergio Gomes a666d52770 Adding batch support 2012-05-16 20:05:24 +01:00