ballerinax/iptwist Ballerina library

1.5.1

Overview

This is a generated connector from ipTwist API v1 OpenAPI Specification.

ipTwist is a reliable, secure, and simple IP geolocation API. More about the ipTwist API can be find at https://iptwist.com/documentation

This module supports ipTwist API version v1.

Prerequisites

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

Quickstart

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

Step 1: Import connector

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

Copy
import ballerinax/iptwist;

Step 2: Create a new connector instance

You can now intantiate the client.

Copy
iptwist:ApiKeysConfig apiKeyConfig = {
    xIptwistToken: "<API Token>"  
};

iptwist:Client iptwistClient = check new(apiKeyConfig);

Step 3: Invoke an operation

  1. Now you can use the operations available within the connector. Following code demonstrate how to check for ip geolocation info.
Copy
Request req = {
    ip: "112.134.242.92"
};
bintable:Response geoLocationInfo = check baseClient->getGeoLocationInfo(req);
  1. Use bal run command to compile and run the Ballerina program.

Import

import ballerinax/iptwist;Copy

Metadata

Released date: 10 months ago

Version: 1.5.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1

GraalVM compatible: Yes


Pull count

Total: 

Current verison: 0


Weekly downloads


Source repository


Keywords

IT Operations/Geographic Information Systems
Cost/Freemium

Contributors

Other versions

See more...