Ruby SDK - Configuring base_path between Edit and Serve APIs?

I noticed in the Ruby Demos, depending on whether you call the Edit API or the Serve API, you need to manually configure base_path to a different value (/stage or /serve/stage for staging, for example). Is there any way I can avoid having to repeatedly configure base_path before I call the corresponding API if I have code that calls both Edit and Serve? Ideally I would like to configure the SDK once at the beginning of my application.

Hi,
I’m not that familiar with Ruby but you should consider the Serve API and Edit API as two separate API’s. Is there a a way to instantiate two separate API clients using Ruby?

I worked around this by explicitly passing in a new configuration when instantiating each API client instead of relying on the global configuration.

1 Like