anydesk-api

module
v0.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2020 License: MIT

README

anydesk-api

Unofficial go based API client library

go report card

Usage

package main

import (
	"fmt"
	"github.com/adrianrudnik/anydesk-api/pkg/anydesk"
	"net/http"
	"os"
	"time"
)

func main() {
	api := anydesk.NewApi(os.Getenv("LICENSE_ID"), os.Getenv("API_PASSWORD"))

	// Optional: Decrease timeouts
	api.HttpClient = &http.Client{Timeout: 5 * time.Second}

	// Optional: Switch to Enterprise API
	api.ApiEndpoint = "https://yourinstance:8081"

	request := anydesk.NewAuthenticationRequest()
	response, _ := request.Do(api)

	fmt.Printf("Status: %s, License: %s", response.Result, response.LicenseId)
}

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL