Skip to content

Official Java SDK for interacting with LinksGPT URL Shortener APIs.

License

Notifications You must be signed in to change notification settings

LinksGPT/url-shortener-sdk-java

Repository files navigation

LinksGPT URL Shortener Java SDK

LinksGPT URL Shortener Java SDK, provides an easy way to interact with the LinksGPT API, enabling developers to build applications that leverage the power of LinksGPT's features.

LinksGPT is a professional link management platform for custom short urls, brand building and conversion optimization. It offers intelligent URL shortening and expansion, custom domains, team roles, customizable QR codes, tracking and AI-based in-depth analytics, deep linking, openAPI and enhanced link security. Powered by AI, it provides intelligent insights and recommendations based on user behavior and click patterns, support data-driven brand strategies and marketing decisions.

  • API version: 1.0.0

Automatically generated by the Swagger Codegen

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>io.swagger</groupId>
  <artifactId>swagger-java-client</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "io.swagger:swagger-java-client:1.0.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/swagger-java-client-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1DomainsApi;

import java.io.File;
import java.util.*;

public class V1DomainsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        V1DomainsApi apiInstance = new V1DomainsApi();
        String workspace = "workspace_example"; // String | Your workspace id, if you do not specify the workspace context,  the default workspace (your main workspace) will be used.  If apikey is used as the authentication mode, you do not need to set this parameter.
        try {
            InlineResponse200 result = apiInstance.listDomains(workspace);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1DomainsApi#listDomains");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://app.linksgpt.com

Class Method HTTP request Description
V1DomainsApi listDomains GET /api/v1/domains List your domains
V1LinksApi createLink POST /api/v1/links Create a new link
V1LinksApi deleteLink DELETE /api/v1/links/{id} Delete a link
V1LinksApi getLinkById GET /api/v1/links/{id} Get a link
V1LinksApi listLinks GET /api/v1/links List links
V1LinksApi listTags GET /api/v1/links/tags List tags
V1LinksApi updateLink PUT /api/v1/links/{id} Update a link
V1LinksApi updateLinkTags PUT /api/v1/links/{id}/tags Update the tags
V1UsersApi getAccountDetails GET /api/v1/users/me Get account details

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

ApiKeyAuth

  • Type: API key
  • API key parameter name: apiKey
  • Location: HTTP header

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

[email protected]

About

Official Java SDK for interacting with LinksGPT URL Shortener APIs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published