Commit Graph

59 Commits

Author SHA1 Message Date
Bob Aman 15a372cedb Added code to include userIp and key parameters. 2011-09-22 13:49:58 +03:00
Bob Aman b869319d1d Added better handling for errors. 2011-09-22 12:21:22 +03:00
Bob Aman 7724b20e9a Changed discovery and directory methods to use the main code-path for generating requests. 2011-09-22 10:41:13 +03:00
Bob Aman d2907c9d79 Added better support for user IP and developer key across all APIs. 2011-09-21 10:52:15 +03:00
Bob Aman 5c4323b11c Introduced the ability to pass in an API object instead of a raw body when making requests. 2011-08-17 21:42:24 -04:00
Bob Aman 9a2217a6bb Added support for API feature lists. 2011-08-08 17:28:21 -04:00
Bob Aman b4745890f5 Separated out the discovery classes into individual files. 2011-08-04 18:32:00 -04:00
Bob Aman 0d2cbe26df Fixed issue with header/options ambiguity. 2011-08-02 16:20:54 -04:00
Bob Aman f336ab34a7 Major update, primarily to add pagination support.
* Added Reference objects to encapsulate API calls.
* Added Result objects to encapsulate API responses.
* Changed the return value of APIClient#execute to Result.
* Changed the method signature of APIClient#execute to support named params.
* Added APIClient#execute! which throws exceptions on error.
* Added automatic parsing code to better allow for complex nested structures.
* Added error parser.
* Added module for pagination in parsers.
2011-07-29 18:07:04 -04:00
Bob Aman ef2abc0493 Updated to use v1 of the discovery API.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@155 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2011-05-12 20:14:15 +00:00
Bob Aman 7d370c6d10 Updated documentation on User-Agent.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@154 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2011-05-12 17:12:15 +00:00
Bob Aman 4d56bb8b1b Added User-Agent improvements.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@133 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2011-05-04 22:43:33 +00:00
Bob Aman 286a7152f2 A significant update of the client functionality.
* updated to use v0.3 of the discovery API
* updated to use httpadapter 1.0.0
* added OAuth 2 support to the command line tool
* renamed some switches in the command line tool
* added additional configuration capabilities

git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@128 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2011-05-04 11:44:35 +00:00
Bob Aman 1dee705828 Fixed extlib/activesupport conflict. Seriously people, thou shalt not monkey-patch!
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@127 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2011-01-19 23:41:37 +00:00
Bob Aman 0b49c3fd2e Added User-Agent header.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@107 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2011-01-05 01:09:52 +00:00
Bob Aman 76fe65a650 Incrementing the version.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@104 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-11-04 20:00:03 +00:00
Bob Aman 38f5bc5baf Added ability to update the base URI in services, resources, and methods.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@102 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-22 22:56:01 +00:00
Bob Aman f63bf8199f Added option to support manually specified discovery URI.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@101 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-22 22:21:26 +00:00
Bob Aman 316f1c6bd4 Updated dependencies.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@93 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-22 17:14:02 +00:00
Bob Aman 20eff1df7d Added support for two-legged OAuth.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@92 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-22 00:36:23 +00:00
Bob Aman 00eb093580 Significant improvements to the CLI.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@90 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-22 00:36:15 +00:00
Bob Aman 0986b4e64f Refactored CLI tool to be more maintainable.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@89 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-20 23:49:15 +00:00
Bob Aman 5572a73fdf Fixed incompatibilities with Ruby 1.8.6
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@71 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-13 21:16:07 +00:00
Bob Aman 3bd7056e86 Updated version sorting code and added authorization shortcuts.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@60 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-12 20:39:09 +00:00
Bob Aman e50442091c Fixed issue with invalid type checking.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@51 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-09 02:41:38 +00:00
Bob Aman 35d35f49ed Whoops, example was on the wrong method.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@49 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-07 22:38:51 +00:00
Bob Aman 3fe9fec711 Added example to Service#to_h method.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@48 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-07 22:37:57 +00:00
Bob Aman c67444734d Added example for generating request.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@45 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-07 22:12:34 +00:00
Bob Aman de394a55c6 Updated example.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@44 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-07 22:12:27 +00:00
Bob Aman e26ebaf981 Finished documentation.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@43 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-07 00:02:22 +00:00
Bob Aman 82d480e924 Fixed minor error in YARD documentation format.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@42 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-05 23:50:27 +00:00
Bob Aman 61c4c034b4 Removed :nodoc: directives, as they are not understood by YARD.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@41 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-05 23:49:00 +00:00
Bob Aman a6e80cbb88 Added documentation to the remainder of the API client methods.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@40 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-10-05 23:46:43 +00:00
Bob Aman 7e48c8913c Improving testing and coverage.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@37 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-09-30 21:33:23 +00:00
Bob Aman bbcc946f33 Improved coverage in tests and fixed a URI join bug.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@36 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-09-28 23:09:07 +00:00
Bob Aman f96412cf23 Reorganized some of the code and removed unnecessary stuff.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@35 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-09-18 00:30:02 +00:00
Bob Aman 3a9d58108a Signed requests can now be generated and transmitted by the client.
Example code:
    require 'google/api_client'
    client = Google::APIClient.new(:service => 'buzz')
    client.authorization.fetch_temporary_credential!(
      :additional_parameters => {
        'scope' => 'https://www.googleapis.com/auth/buzz'
      }
    )
    client.authorization.authorization_uri
    # Redirect user here
    client.authorization.fetch_token_credential!(:verifier => '12345')
    response = client.execute(
      'buzz.activities.list',
      'scope' => '@self', 'userId' => '@me', 'alt' => 'json'
    )
    status, headers, body = response

git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@34 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-09-16 23:40:08 +00:00
Bob Aman f462322be5 URI template expansion works.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@33 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-09-16 19:12:52 +00:00
Matt Pokrzywa bbe6cec303 skeleton for api request/respone abstraction
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@32 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-09-14 03:39:23 +00:00
bobaman@google.com 719e576051 Updated to use Signet.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@31 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-09-13 21:54:43 +00:00
bobaman@google.com 9d68bf115c Removing transport and OAuth code that is no longer needed.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@28 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-09-13 21:54:18 +00:00
bobaman@google.com 541054e88d Made the builder more flexible by adding a callback parameter.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@27 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-08-24 21:59:53 +00:00
bobaman@google.com d61916b110 Added a rudimentary implementation of a MethodBuilder.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@25 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-08-24 21:26:12 +00:00
mattpok@google.com 1b232831c4 added basic json parser support and tests
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@23 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-08-23 22:07:50 +00:00
bobaman@google.com bc844db311 Initial implementation of HTTP.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@22 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-08-19 23:21:45 +00:00
mattpok@google.com 139302fd5e added basic rspec for transport and fix imports in transport class
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@19 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-08-18 22:18:21 +00:00
mattpok@google.com e88fdbfef6 add parser configuration to http transport, will add tests next commit
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@18 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-08-18 21:39:44 +00:00
mattpok@google.com 89b0e1c31a added json parsing skeleton
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@17 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-08-18 20:29:18 +00:00
bobaman@google.com e6ba0f6860 Updating code to consistent coding style.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@15 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-08-17 01:21:17 +00:00
bobaman@google.com 31132ffbb9 Added some tests for determining the discovery document URI.
git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@13 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
2010-08-14 01:35:06 +00:00