ballerinax/shorten.rest Ballerina library

1.5.1

Overview

This is a generated connector for Shorten.REST API v1.0 OpenAPI specification.
The Shorten.REST API provides the capability to programmatically create short URLs for longer URL.

Prerequisites

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

  1. Create a Shorten.REST account.
  2. Obtain tokens - Follow this guide.

Quickstart

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

Step 1: Import connector

First, import the ballerinax/shorten.rest module into the Ballerina project.

Copy
import ballerinax/shorten.rest;

Step 2: Create a new connector instance

You can now make the connection configuration using the Shorten.REST API keys config.

Copy
rest:ApiKeysConfig & readonly apiKeyConfig = ?;
rest:Client baseClient = check new Client(apiKeyConfig);

Step 3: Invoke connector operation

Following is code demonstrates how to get all aliases using ballerinax/shorten.rest connector.

Copy
public function main() returns error? {
    rest:GetAliasesModel entity = check baseClient->getAliases();
}

Import

import ballerinax/shorten.rest;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

Marketing/Url Shortener
Cost/Freemium

Contributors

Other versions

See more...