Skip to content

Commit f860467

Browse files
committed
fix(clients): consistent naming in transformation region helper
1 parent 63b7dad commit f860467

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

templates/go/configuration.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ type TransformationConfiguration struct {
3333
Region ingestion.Region
3434
}
3535

36-
// 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).
37-
func (s *SearchConfiguration) WithTransformation(region ingestion.Region) {
36+
// 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).
37+
func (s *SearchConfiguration) SetTransformationRegion(region ingestion.Region) {
3838
s.Transformation = &TransformationConfiguration{
3939
Region: region,
4040
}

templates/python/config.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class {{#lambda.pascalcase}}{{client}}{{/lambda.pascalcase}}Config(BaseConfig):
8181
{{#isSearchClient}}
8282
self.region = None
8383

84-
def with_transformation(self, region: str = ""):
84+
def set_transformation_region(self, region: str = ""):
8585
"This method is required to be called with the appropriate region of your Algolia application if you wish to leverage the *_with_transformation methods."
8686
self.region = region
8787
{{/isSearchClient}}

templates/python/tests/client/createClient.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ _config = {{#lambda.pascalcase}}{{clientPrefix}}Config{{/lambda.pascalcase}}("{{
33
{{#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}}])
44
{{/hasCustomHosts}}
55
{{#hasTransformationRegion}}
6-
{{#isError}} {{/isError}}_config.with_transformation("{{{transformationRegion}}}")
6+
{{#isError}} {{/isError}}_config.set_transformation_region("{{{transformationRegion}}}")
77
{{/hasTransformationRegion}}
88
{{#isError}} {{/isError}}_client = {{#lambda.pascalcase}}{{{client}}}{{/lambda.pascalcase}}{{#isSyncClient}}Sync{{/isSyncClient}}.create_with_config(config=_config{{#useEchoRequester}}, transporter=EchoTransporter{{#isSyncClient}}Sync{{/isSyncClient}}(_config){{/useEchoRequester}})

0 commit comments

Comments
 (0)