Skip to content

hrybun/advancedhosting-api-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%