feat: add Go SDK support and examples to documentation

This commit is contained in:
Stevan Freeborn
2026-03-26 22:09:26 -05:00
parent fb0e177d91
commit 3c569db660
24 changed files with 457 additions and 0 deletions
@@ -73,6 +73,21 @@ println!(
);
```
```go
import onspring "github.com/StevanFreeborn/onspring-api-sdk-go"
client := onspring.NewClient(
"000000ffffff000000ffffff/00000000-ffff-0000-ffff-000000000000",
)
app, _ := client.Apps.Get(
context.Background(),
195,
)
fmt.Printf("%d, %s\n", app.Id, app.Name)
```
{% /code %}
{% code heading="RESPONSE" defaultLanguage="json" %}
@@ -90,6 +90,22 @@ for app in response.items.unwrap_or_default() {
}
```
```go
import onspring "github.com/StevanFreeborn/onspring-api-sdk-go"
client := onspring.NewClient(
"000000ffffff000000ffffff/00000000-ffff-0000-ffff-000000000000",
)
page, _ := client.Apps.List(
context.Background(),
)
for _, app := range page.Items {
fmt.Printf("%d, %s\n", app.Id, app.Name)
}
```
{% /code %}
{% code heading="RESPONSE" defaultLanguage="json" %}
@@ -87,6 +87,23 @@ for app in response.items.unwrap_or_default() {
}
```
```go
import onspring "github.com/StevanFreeborn/onspring-api-sdk-go"
client := onspring.NewClient(
"000000ffffff000000ffffff/00000000-ffff-0000-ffff-000000000000",
)
batch, _ := client.Apps.GetMany(
context.Background(),
[]int{8, 79, 137, 193, 183},
)
for _, app := range batch.Items {
fmt.Printf("%d, %s\n", app.Id, app.Name)
}
```
{% /code %}
{% code heading="RESPONSE" defaultLanguage="json" %}