googleapis / elixir-google-api

Elixir client libraries for accessing Google APIs.
https://hex.pm/users/google-cloud
Apache License 2.0
1.02k stars 460 forks source link

Dialogflow: Other availibility zones #6574

Open arjan opened 4 years ago

arjan commented 4 years ago

Dialogflow (ES) supports multiple availability zones now. The current generated client is not capable of handling this, as the base URL is hardcoded in the generated Connection module. What would be a solution for this?

If I would program it manually i would add a zone to the opts passed into each function, and from the zone opt the proper Connection would be selected.

So there would exist several different Connection modules, one for each zone, basically four modules:

image

arjan commented 4 years ago

Current solution is here: https://github.com/botsquad/google_api_dialogflow_fork/commit/1d55a32a15af28864ed74a49faa0c98af49395cb

Created a new/2 function:

conn = Connection.new("token", zone: "europe-west2")

Let me know if I should create a PR for the Elixir generator.