-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |