advancedhosting-api-go

module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0

README

AH: A Go library for the Advanced Hosting API

The AH API documentation is available here.

Install

go get github.com/advancedhosters/advancedhosting-api-go

Usage

package main

import (
	"context"
	"log"

	"github.com/advancedhosting/advancedhosting-api-go/ah"
)

func main() {
	clientOptions := &ah.ClientOptions{
		Token: "ACCESS_TOKEN",
	}

	client, err := ah.NewAPIClient(clientOptions)

	if err != nil {
		panic(err)
	}

	ctx := context.Background()
	instances, _, err := client.Instances.List(ctx, nil)

	if err != nil {
		panic(err)
	}
	log.Printf("%v", instances)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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