Skip to content

Latest commit

 

History

History
270 lines (206 loc) · 9.73 KB

SocialApi.md

File metadata and controls

270 lines (206 loc) · 9.73 KB

NamSorApiV2.SocialApi

All URIs are relative to https://v2.namsor.com/NamSorAPIv2

Method HTTP request Description
phoneCode GET /api2/json/phoneCode/{firstName}/{lastName}/{phoneNumber} [USES 11 UNITS PER NAME] Infer the likely country and phone prefix, given a personal name and formatted / unformatted phone number.
phoneCodeBatch POST /api2/json/phoneCodeBatch [USES 11 UNITS PER NAME] Infer the likely country and phone prefix, of up to 100 personal names, detecting automatically the local context given a name and formatted / unformatted phone number.
phoneCodeGeo GET /api2/json/phoneCodeGeo/{firstName}/{lastName}/{phoneNumber}/{countryIso2} [USES 11 UNITS PER NAME] Infer the likely phone prefix, given a personal name and formatted / unformatted phone number, with a local context (ISO2 country of residence).
phoneCodeGeoBatch POST /api2/json/phoneCodeGeoBatch [USES 11 UNITS PER NAME] Infer the likely country and phone prefix, of up to 100 personal names, with a local context (ISO2 country of residence).
phoneCodeGeoFeedbackLoop GET /api2/json/phoneCodeGeoFeedbackLoop/{firstName}/{lastName}/{phoneNumber}/{phoneNumberE164}/{countryIso2} [CREDITS 1 UNIT] Feedback loop to better infer the likely phone prefix, given a personal name and formatted / unformatted phone number, with a local context (ISO2 country of residence).

phoneCode

FirstLastNamePhoneCodedOut phoneCode(firstName, lastName, phoneNumber)

[USES 11 UNITS PER NAME] Infer the likely country and phone prefix, given a personal name and formatted / unformatted phone number.

Example

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.SocialApi();
var firstName = "firstName_example"; // String | 
var lastName = "lastName_example"; // String | 
var phoneNumber = "phoneNumber_example"; // String | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.phoneCode(firstName, lastName, phoneNumber, callback);

Parameters

Name Type Description Notes
firstName String
lastName String
phoneNumber String

Return type

FirstLastNamePhoneCodedOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

phoneCodeBatch

BatchFirstLastNamePhoneCodedOut phoneCodeBatch(opts)

[USES 11 UNITS PER NAME] Infer the likely country and phone prefix, of up to 100 personal names, detecting automatically the local context given a name and formatted / unformatted phone number.

Example

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.SocialApi();
var opts = {
  'batchFirstLastNamePhoneNumberIn': new NamSorApiV2.BatchFirstLastNamePhoneNumberIn() // BatchFirstLastNamePhoneNumberIn | A list of personal names
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.phoneCodeBatch(opts, callback);

Parameters

Name Type Description Notes
batchFirstLastNamePhoneNumberIn BatchFirstLastNamePhoneNumberIn A list of personal names [optional]

Return type

BatchFirstLastNamePhoneCodedOut

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

phoneCodeGeo

FirstLastNamePhoneCodedOut phoneCodeGeo(firstName, lastName, phoneNumber, countryIso2)

[USES 11 UNITS PER NAME] Infer the likely phone prefix, given a personal name and formatted / unformatted phone number, with a local context (ISO2 country of residence).

Example

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.SocialApi();
var firstName = "firstName_example"; // String | 
var lastName = "lastName_example"; // String | 
var phoneNumber = "phoneNumber_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.phoneCodeGeo(firstName, lastName, phoneNumber, countryIso2, callback);

Parameters

Name Type Description Notes
firstName String
lastName String
phoneNumber String
countryIso2 String

Return type

FirstLastNamePhoneCodedOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

phoneCodeGeoBatch

BatchFirstLastNamePhoneCodedOut phoneCodeGeoBatch(opts)

[USES 11 UNITS PER NAME] Infer the likely country and phone prefix, of up to 100 personal names, with a local context (ISO2 country of residence).

Example

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.SocialApi();
var opts = {
  'batchFirstLastNamePhoneNumberGeoIn': new NamSorApiV2.BatchFirstLastNamePhoneNumberGeoIn() // BatchFirstLastNamePhoneNumberGeoIn | A list of personal names
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.phoneCodeGeoBatch(opts, callback);

Parameters

Name Type Description Notes
batchFirstLastNamePhoneNumberGeoIn BatchFirstLastNamePhoneNumberGeoIn A list of personal names [optional]

Return type

BatchFirstLastNamePhoneCodedOut

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

phoneCodeGeoFeedbackLoop

FirstLastNamePhoneCodedOut phoneCodeGeoFeedbackLoop(firstName, lastName, phoneNumber, phoneNumberE164, countryIso2)

[CREDITS 1 UNIT] Feedback loop to better infer the likely phone prefix, given a personal name and formatted / unformatted phone number, with a local context (ISO2 country of residence).

Example

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.SocialApi();
var firstName = "firstName_example"; // String | 
var lastName = "lastName_example"; // String | 
var phoneNumber = "phoneNumber_example"; // String | 
var phoneNumberE164 = "phoneNumberE164_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.phoneCodeGeoFeedbackLoop(firstName, lastName, phoneNumber, phoneNumberE164, countryIso2, callback);

Parameters

Name Type Description Notes
firstName String
lastName String
phoneNumber String
phoneNumberE164 String
countryIso2 String

Return type

FirstLastNamePhoneCodedOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json