diff --git a/playground/python/app/search.py b/playground/python/app/search.py index 324333ddeef..e708f0e1b4e 100644 --- a/playground/python/app/search.py +++ b/playground/python/app/search.py @@ -35,7 +35,7 @@ def main(): environ.get("ALGOLIA_APPLICATION_ID"), environ.get("ALGOLIA_ADMIN_KEY") ) - config.with_transformation("eu") + config.set_transformation_region("eu") print("region in playground") print(config.region) diff --git a/templates/go/configuration.mustache b/templates/go/configuration.mustache index 448e0a3d32b..76cfaf08838 100644 --- a/templates/go/configuration.mustache +++ b/templates/go/configuration.mustache @@ -33,8 +33,8 @@ type TransformationConfiguration struct { Region ingestion.Region } -// WithTransformation sets the region of the current algolia application to the configuration, this is required to be called if you wish to leverage the transformation pipeline (via the *WithTransformation methods). -func (s *SearchConfiguration) WithTransformation(region ingestion.Region) { +// SetTransformationRegion sets the region of the current algolia application to the configuration, this is required to be called if you wish to leverage the transformation pipeline (via the *WithTransformation methods). +func (s *SearchConfiguration) SetTransformationRegion(region ingestion.Region) { s.Transformation = &TransformationConfiguration{ Region: region, } diff --git a/templates/python/config.mustache b/templates/python/config.mustache index a97d13c1126..d6fc19b8c9e 100644 --- a/templates/python/config.mustache +++ b/templates/python/config.mustache @@ -81,7 +81,7 @@ class {{#lambda.pascalcase}}{{client}}{{/lambda.pascalcase}}Config(BaseConfig): {{#isSearchClient}} self.region = None - def with_transformation(self, region: str = ""): + def set_transformation_region(self, region: str = ""): "This method is required to be called with the appropriate region of your Algolia application if you wish to leverage the *_with_transformation methods." self.region = region {{/isSearchClient}} \ No newline at end of file diff --git a/templates/python/tests/client/createClient.mustache b/templates/python/tests/client/createClient.mustache index 15c6606719a..b6f08df43e4 100644 --- a/templates/python/tests/client/createClient.mustache +++ b/templates/python/tests/client/createClient.mustache @@ -3,6 +3,6 @@ _config = {{#lambda.pascalcase}}{{clientPrefix}}Config{{/lambda.pascalcase}}("{{ {{#isError}} {{/isError}}_config.hosts = HostsCollection([{{#customHosts}}Host(url='localhost' if environ.get('CI') == 'true' else 'host.docker.internal', scheme='http', port={{port}}){{^-last}},{{/-last}}{{/customHosts}}]) {{/hasCustomHosts}} {{#hasTransformationRegion}} - {{#isError}} {{/isError}}_config.with_transformation("{{{transformationRegion}}}") + {{#isError}} {{/isError}}_config.set_transformation_region("{{{transformationRegion}}}") {{/hasTransformationRegion}} {{#isError}} {{/isError}}_client = {{#lambda.pascalcase}}{{{client}}}{{/lambda.pascalcase}}{{#isSyncClient}}Sync{{/isSyncClient}}.create_with_config(config=_config{{#useEchoRequester}}, transporter=EchoTransporter{{#isSyncClient}}Sync{{/isSyncClient}}(_config){{/useEchoRequester}}) \ No newline at end of file