Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion playground/python/app/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions templates/go/configuration.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
2 changes: 1 addition & 1 deletion templates/python/config.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
2 changes: 1 addition & 1 deletion templates/python/tests/client/createClient.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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}})