Skip to content

Commit

Permalink
docs: Add SDK page (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
konradasb authored Sep 13, 2024
1 parent cc1651f commit ec74c3c
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/sdk/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
# Interacting with Fireactions via SDK

Fireactions provides a simple SDK for interacting with the Fireactions API. You can use the SDK to get, list, pause and resume pools.

Example usage:

```golang
package main

import (
"fmt"
"log"
"os"

"github.com/hostinger/fireactions"
)

func main() {
client = fireactions.NewClient(fireactions.WithEndpoint(os.Getenv("FIREACTIONS_ENDPOINT")), fireactions.WithUsername(os.Getenv("FIREACTIONS_USERNAME")), fireactions.WithPassword(os.Getenv("FIREACTIONS_PASSWORD")))

pool, err := client.GetPool("pool-id")
if err != nil {
log.Fatalf("Failed to get pool: %v", err)
}

fmt.Printf("Pool: %+v\n", pool)
}
```

For more up-to-date information, see the [GoDoc documentation](https://pkg.go.dev/github.com/hostinger/fireactions).

0 comments on commit ec74c3c

Please sign in to comment.