google-api-client 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/README DELETED
@@ -1,68 +0,0 @@
1
- == APIClient
2
-
3
- Homepage:: google-api-ruby-client[http://code.google.com/p/google-api-ruby-client/]
4
- Authors:: Bob Aman (mailto:bobaman@google.com), Matt Pokrzywa (mailto:mattpok@google.com)
5
- Copyright:: Copyright 2010 Google Inc.
6
- License:: Apache 2.0
7
-
8
- == Description
9
-
10
- The Google API Ruby Client makes it trivial to discover and access supported
11
- APIs.
12
-
13
- == Example Usage
14
-
15
- # Initialize the client
16
- require 'google/api_client'
17
- require 'signet/oauth_1/client'
18
- client = Google::APIClient.new(
19
- :service => 'buzz',
20
- # Buzz has API-specific endpoints
21
- :authorization => Signet::OAuth1::Client.new(
22
- :temporary_credential_uri =>
23
- 'https://www.google.com/accounts/OAuthGetRequestToken',
24
- :authorization_uri =>
25
- 'https://www.google.com/buzz/api/auth/OAuthAuthorizeToken',
26
- :token_credential_uri =>
27
- 'https://www.google.com/accounts/OAuthGetAccessToken',
28
- :client_credential_key => 'anonymous',
29
- :client_credential_secret => 'anonymous'
30
- )
31
- )
32
- client.authorization.fetch_temporary_credential!(
33
- :additional_parameters => {
34
- 'scope' => 'https://www.googleapis.com/auth/buzz'
35
- }
36
- )
37
- redirect_uri = client.authorization.authorization_uri(
38
- :additional_parameters => {
39
- 'domain' => client.authorization.client_credential_key,
40
- 'scope' => 'https://www.googleapis.com/auth/buzz'
41
- }
42
- )
43
- # Redirect user here
44
- client.authorization.fetch_token_credential!(:verifier => '12345')
45
-
46
- # Discover available methods
47
- method_names = client.discovered_api('buzz').to_h.keys
48
-
49
- # Make an API call
50
- response = client.execute(
51
- 'chili.activities.list',
52
- {'scope' => '@self', 'userId' => '@me', 'alt' => 'json'}
53
- )
54
- status, headers, body = response
55
-
56
- == Install
57
-
58
- Be sure both http://gems.github.com/ and http://rubygems.org/ are in your gem
59
- sources.
60
-
61
- For normal client usage, this is sufficient:
62
-
63
- sudo gem install google-api-client
64
-
65
- The command line interface, the example applications, and the test suite
66
- require additional dependencies. These may be obtained with:
67
-
68
- sudo gem install google-api-client --development --force --no-rdoc --no-ri