UNPKG

@namsor/nam_sor_api_v2

Version:

NamSor API v2 : enpoints to process personal names (gender, cultural origin or ethnicity) in all alphabets or languages.

107 lines (78 loc) 3.26 kB
# NamSorApiV2.GeneralApi All URIs are relative to *https://v2.namsor.com/NamSorAPIv2* Method | HTTP request | Description ------------- | ------------- | ------------- [**nameType**](GeneralApi.md#nameType) | **GET** /api2/json/nameType/{properNoun} | Infer the likely type of a proper noun (personal name, brand name, place name etc.) [**nameType1**](GeneralApi.md#nameType1) | **GET** /api2/json/nameType/{properNoun}/{countryIso2} | Infer the likely type of a proper noun (personal name, brand name, place name etc.) <a name="nameType"></a> # **nameType** > ProperNounCategorizedOut nameType(properNoun) Infer the likely type of a proper noun (personal name, brand name, place name etc.) ### Example ```javascript var NamSorApiV2 = require('nam_sor_api_v2'); var defaultClient = NamSorApiV2.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new NamSorApiV2.GeneralApi(); var properNoun = "properNoun_example"; // String | var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.nameType(properNoun, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **properNoun** | **String**| | ### Return type [**ProperNounCategorizedOut**](ProperNounCategorizedOut.md) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json <a name="nameType1"></a> # **nameType1** > ProperNounCategorizedOut nameType1(properNoun, countryIso2) Infer the likely type of a proper noun (personal name, brand name, place name etc.) ### Example ```javascript var NamSorApiV2 = require('nam_sor_api_v2'); var defaultClient = NamSorApiV2.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new NamSorApiV2.GeneralApi(); var properNoun = "properNoun_example"; // String | var countryIso2 = "countryIso2_example"; // String | var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.nameType1(properNoun, countryIso2, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **properNoun** | **String**| | **countryIso2** | **String**| | ### Return type [**ProperNounCategorizedOut**](ProperNounCategorizedOut.md) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json