3

I have a problem with the google-api-ruby-client as I can't find the proper way to discover the Directions API.

Here is the client:

@client = ::Google::APIClient.new :application_name => Rails.application.secrets.app_name
@client.key = Rails.application.secrets.google_public_api_key

and then

@client.discovered_api 'directions'     
@client.discovered_api 'directions', 'v1'
@client.discovered_api 'directions', 'v2'
@client.discovered_api 'directions', 'v3'

all fail with the same error:

Google::APIClient::ClientError: Not Found

I thought that the directions api could be within the maps API, so I tried with 'maps' instead of 'directions' and got the same errors.

I checked that my client works with

@client.discovered_api 'translate', 'v2'

which works properly.

muichkine
  • 2,890
  • 2
  • 26
  • 36

0 Answers0