Skip to content

Official CSharp SDK for interacting with LinksGPT URL Shortener APIs.

License

Notifications You must be signed in to change notification settings

LinksGPT/url-shortener-sdk-csharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinksGPT URL Shortener C# SDK

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

This C# SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • SDK version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.dotnet.CSharpClientCodegen

Frameworks supported

  • .NET 4.7.1 or later

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742

Installation

Run the following commands to generate the DLL

cd src/IO.Swagger
dotnet restore
dotnet build

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

Packaging

A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

nuget pack -Build -OutputDirectory out IO.Swagger.csproj

Then, publish to a local feed or other host and consume the new package via Nuget as usual.

Getting Started

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class Example
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("apiKey", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apiKey", "Bearer");

            var apiInstance = new V1DomainsApi();
            var 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. (optional) 

            try
            {
                // List your domains
                InlineResponse200 result = apiInstance.ListDomains(workspace);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1DomainsApi.ListDomains: " + e.Message );
            }
        }
    }
}

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

ApiKeyAuth

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

About

Official CSharp SDK for interacting with LinksGPT URL Shortener APIs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published