Skip to content

elasthicc/pterodactyl-go

Repository files navigation

Logo Image

Discord

pterogo: A Go library for the Pterodactyl API

Test and coverage Go Reference Go Report Card codecov

pterogo-maskot

Note: This library is under active development as we expand it to cover the Pterodactyl API. Consider the public API of this package a little unstable as we work towards a v1.0.

Package pterogo is a library for the Pterodactyl API.

Example

func main() {
	pteroApp := pteroapp.NewApplication(pteroapp.WithEndpoint(url), pteroapp.WithToken(token))

	user, _, err := pteroApp.Users.GetByID(context.Background(), 1)
	if err != nil {
		log.Fatalf("error retrieving user: %s\n", err)
	}

	fmt.Printf("user email is: %s\n", user.Attributes.Email)
}

Pterodactyl API Version Support

The library supports the Pterodactyl v1 API.

Go Version Support

The library supports the latest two Go minor versions, e.g. at the time Go 1.21 is released, it supports Go 1.20 and 1.21.

This matches the official Go Release Policy.

When the minimum required Go version is changed, it is announced in the release notes for that version.

Contributing

Pterogo is the work of hundreds of contributors. We appreciate your help!

Please see CONTRIBUTING for details on submitting patches and the contribution workflow.

License

MIT License