ballerinax/whohoststhis Ballerina library

1.5.1

Overview

This is a generated connector for Who Hosts This API v0.0.1 OpenAPI specification. The Who Hosts This API provides services to get discover the hosting provider for any web site.

Prerequisites

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

  1. Create an Who Hosts This Account.
  2. Obtain tokens - Follow this link.

Quickstart

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

Step 1: Import connector

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

Copy
import ballerinax/whohoststhis;

Step 2: Create a new connector instance

Copy
whohoststhis:ApiKeysConfig apiKeyConfig = {
    key: "<API_KEY>"
};
whohoststhis:Client baseClient = check new Client(apiKeyConfig, serviceUrl = "https://www.who-hosts-this.com/APIEndpoint");

Step 3: Invoke connector operation

  1. Now you can use the operations available within the connector. Note that they are in the form of remote operations.

    Following is an example to discover the hosting provider for a web site.

    Copy
    public function main() returns error? {
        json listHostingProvider = check baseClient->discoverHostingProvider("www.wso2.com");
        log:printInfo(listHostingProvider.toString());
    }
  2. Use bal run command to compile and run the Ballerina program.

Import

import ballerinax/whohoststhis;Copy

Metadata

Released date: 12 months ago

Version: 1.5.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1

GraalVM compatible: Yes


Pull count

Total: 0

Current verison: 0


Weekly downloads


Source repository


Keywords

IT Operations/Cloud Services

Cost/Freemium


Contributors

Other versions