Skip to content

Commit

Permalink
fix(docs): machines.Get example in README (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnuoy authored Jul 9, 2024
1 parent d1c165b commit 26cddf4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ This repository contains the following packages:
```Go
import (
gomaasclient "github.com/canonical/gomaasclient/client"
"github.com/canonical/gomaasclient/entity"
)

c, _ := gomaasclient.GetClient("<MAAS_URL>", "<API_KEY>", "2.0")

// List MAAS machines
machines, _ := c.Machines.Get()
machines, _ := c.Machines.Get(&entity.MachinesParams{})

// Get MAAS machine details
machine, _ := c.Machine.Get(machines[0].SystemID)
Expand Down

0 comments on commit 26cddf4

Please sign in to comment.