From 7ac2a905e9901aa6f3a9673dacd10640b63c5249 Mon Sep 17 00:00:00 2001 From: NamSor Date: Sun, 7 Jun 2020 21:42:31 +0200 Subject: [PATCH] update defautl example update defautl example --- README.md | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 11e0705..0fe610e 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ This Python package is automatically generated by the [OpenAPI Generator](https: - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [http://www.namsor.com/](http://www.namsor.com/) +Refer to the [NamSor API Doc](https://v2.namsor.com/NamSorAPIv2/apidoc.html) for detailed API documentation. + +Also, have a look at the Wiki [NamSor Wiki Doc](https://github.com/namsor/namsor-tools-v2/wiki/NamSor-Tools-V2) for release notes and taxonomies. + ## Requirements. Python 2.7 and 3.4+ @@ -54,23 +58,28 @@ from pprint import pprint # Configure API key authorization: api_key configuration = openapi_client.Configuration() -configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY' +configuration.api_key['X-API-KEY'] = '' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['X-API-KEY'] = 'Bearer' # create an instance of the API class -api_instance = openapi_client.AdminApi(openapi_client.ApiClient(configuration)) -api_key = 'api_key_example' # str | -usage_credits = 56 # int | -user_message = 'user_message_example' # str | - +api_instance = openapi_client.PersonalApi(openapi_client.ApiClient(configuration)) +batch_first_last_name_in = openapi_client.BatchFirstLastNameIn() # BatchFirstLastNameIn | A list of personal names (optional) +name1 = openapi_client.FirstLastNameIn(); +name1.id='1' +name1.first_name='John' +name1.last_name='Smith' +name2 = openapi_client.FirstLastNameIn(); +name2.id='2' +name2.first_name='Elena' +name2.last_name='Rossini' +batch_first_last_name_in.personal_names = [name1, name2] try: - # Add usage credits to an API Key. - api_response = api_instance.add_credits(api_key, usage_credits, user_message) + # Infer the likely origin of up to 1000 names, detecting automatically the cultural context. + api_response = api_instance.gender_batch(batch_first_last_name_in=batch_first_last_name_in) pprint(api_response) except ApiException as e: - print("Exception when calling AdminApi->add_credits: %s\n" % e) - + print("Exception when calling PersonalApi->gender_batch: %s\n" % e) ``` ## Documentation for API Endpoints