Module namsor

ballerinax/namsor Ballerina library

1.5.2

Overview

The NamSor API v2 connector(https://v2.namsor.com/NamSorAPIv2/index.html) OpenAPI specification.

The NamSor API provides the capability to process personal names (gender, cultural origin or ethnicity) in all alphabets or languages.

Key Features

  • Programmatic access to create and manage resources via REST API
  • Manage user accounts and profiles
  • Secure authentication with API key or OAuth support

Prerequisites

Before using this connector in your Ballerina application, complete the following:

Quickstart

To use the NamSor connector in your Ballerina application, update the .bal file as follows:

Step 1: Import connector

First, import the ballerinax/namsor module into the Ballerina project.

Copy
import ballerinax/namsor;

Step 2: Create a new connector instance

Add the project configuration file by creating a Config.toml file. Config file should have following configurations. Add the tokens obtained in the previous step to the Config.toml file.

Copy
namsor:ApiKeysConfig apiKeyConfig = {
    xApiKey: "<API_KEY>"
}

namsor:Client baseClient = check new Client(apiKeyConfig, serviceUrl = "https://v2.namsor.com/NamSorAPIv2");

Step 3: Invoke connector operation

  1. You can get origin of the name by providing first name and last name as parameters.
    Copy
    namsor:FirstLastNameOriginedOut nameOrigin = check baseClient->origin("Jones", "Joe");
  2. Use bal run command to compile and run the Ballerina program.

Import

import ballerinax/namsor;Copy

Other versions

See more...

Metadata

Released date: 3 days ago

Version: 1.5.2

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.8.0

GraalVM compatible: Yes


Pull count

Total: 26

Current verison: 0


Weekly downloads


Source repository


Keywords

Type/Connector

Vendor/NamSor

Area/Productivity & Collaboration

Lifestyle & Entertainment/News & Lifestyle

Cost/Freemium


Contributors