Skip to content

Official Javascript SDK for interacting with LinksGPT URL Shortener APIs.

License

Notifications You must be signed in to change notification settings

LinksGPT/url-shortener-sdk-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinksGPT URL Shortener Javascript SDK

LinksGPT URL Shortener 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.

LinksGptUrlShortenerSdk - JavaScript client for links_gpt_url_shortener_sdk.

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen

Installation

npm

Install it via:

npm install links_gpt_url_shortener_sdk --save

git

If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

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

var LinksGptUrlShortenerSdk = require('links_gpt_url_shortener_sdk');
var defaultClient = LinksGptUrlShortenerSdk.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['apiKey'] = "Token"

var api = new LinksGptUrlShortenerSdk.V1DomainsApi()
var opts = { 
  '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.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listDomains(opts, callback);

Documentation for API Endpoints

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

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

Documentation for Models

Documentation for Authorization

ApiKeyAuth

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

About

Official Javascript SDK for interacting with LinksGPT URL Shortener APIs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published