ip2k / google-api-ruby-client

Automatically exported from code.google.com/p/google-api-ruby-client
Apache License 2.0
0 stars 0 forks source link

https://www.googleapis.com/discovery/v1/apis/analytics/v1/rest not found #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ruby console, require 'google/api_client'
2. client = Google::APIClient.new
3. client.discovered_api('analytics')

What is the expected output? What do you see instead?
dunno.  error: Google::APIClient::ClientError: Could not retrieve discovery 
document at: https://www.googleapis.com/discovery/v1/apis/analytics/v1/rest

What version of the product are you using? On what operating system?
mac OSX, rails 2.3.5, rvm.
I go here, https://www.googleapis.com/discovery/v1/apis and it shows up in the 
list but no actual web page

Please provide any additional information below.

Original issue reported on code.google.com by chabg...@gmail.com on 18 Jan 2012 at 10:42

GoogleCodeExporter commented 9 years ago
You need to specify an API version. The API you're looking for only publishes a 
discovery document for v3 and you're trying to retrieve v1. Just pass in 'v3' 
as a second parameter (it defaults to 'v1').

Original comment by bobaman@google.com on 19 Jan 2012 at 12:08

GoogleCodeExporter commented 9 years ago
Actually, I guess they also publish v2.4. Either way though, there's no 
discovery document for v1, so what you're trying won't work.

Original comment by bobaman@google.com on 19 Jan 2012 at 12:10

GoogleCodeExporter commented 9 years ago
That example comes from the google api doc:

http://code.google.com/p/google-api-ruby-client/

Also that url lists V1.

Original comment by chabg...@gmail.com on 19 Jan 2012 at 3:33

GoogleCodeExporter commented 9 years ago
The example you're referring to is for a different API. The analytics team 
hasn't committed a Ruby sample for that API to the repo yet. Trust me, you want 
to pass 'v3' as a second parameter if you're trying to access the analytics 
API. :-)

Original comment by bobaman@google.com on 19 Jan 2012 at 3:43

GoogleCodeExporter commented 9 years ago
client.discovered_api('analytics','v3') worked for me

Original comment by hectorga...@gmail.com on 6 Jun 2013 at 8:01