chore: add workflows for releasing

This commit is contained in:
Stevan Freeborn
2026-03-26 17:23:17 -05:00
parent 87175e1260
commit dea7424d8d
3 changed files with 180 additions and 37 deletions
+40 -37
View File
@@ -1,18 +1,16 @@
# Onspring API Go SDK
⚠️ Under Construction ⚠️
The Go SDK for the Onspring API is meant to simplify development in Go for Onspring customers who want to build integrations with their Onspring instance.
Note: This is an unofficial SDK for the Onspring API. It was not built in consultation with Onspring Technologies LLC or a member of their development team.
This SDK was developed independently using Onspring's existing C# SDK, the Onspring API's swagger page, and api documentation as the starting point with the intention of making development of integrations done in Javascript with an Onspring instance quicker and more convenient.
This SDK was developed independently using Onspring's existing C# SDK, the Onspring API's swagger page, and api documentation as the starting point with the intention of making development of integrations done in Go with an Onspring instance quicker and more convenient.
## Dependencies
### Go
Requires use of [Go](https://golang.org/dl/) version 1.23 or higher.
Requires use of [Go](https://golang.org/dl/) version 1.25 or higher.
## Installation
@@ -48,25 +46,25 @@ You can think of any API Key as another user in your Onspring instance and there
The most common way to use the SDK is to create a `Client` instance and call its methods to interact with the Onspring API. Here is an example of how to create a `Client` instance. You will need to provide your API key when creating the client. It is best practice to store your API key securely and not hard-code it in your source code.
```go
import "github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
import "github.com/StevanFreeborn/onspring-api-sdk-go"
client := onspring.NewClient("your-api-key")
```
The `Client` instance can be further configured by providing optional configuration settings via the `ClientConfig` struct. For example, you can set a custom base URL for the Onspring API if needed:
The `Client` instance can be further configured by providing optional functional options. For example, you can set a custom base URL for the Onspring API if needed:
```go
import "github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
import "github.com/StevanFreeborn/onspring-api-sdk-go"
client := onspring.NewClient(
"your-api-key",
onspring.WithBaseURL(customURL),
"your-api-key",
onspring.WithBaseURL(customURL),
)
```
### Full API Documentation
You may wish to refer to the full [Onspring API documentation](https://software.onspring.com/hubfs/Training/Admin%20Guide%20-%20v2%20API.pdf) when determining which values to pass as parameters to some of the `OnspringClient` methods. There is also a [swagger page](https://api.onspring.com/swagger/index.html) that you can use for making exploratory requests.
You may wish to refer to the full [Onspring API documentation](https://software.onspring.com/hubfs/Training/Admin%20Guide%20-%20v2%20API.pdf) when determining which values to pass as parameters to some of the `Client` methods. There is also a [swagger page](https://api.onspring.com/swagger/index.html) that you can use for making exploratory requests.
## Examples
@@ -76,8 +74,9 @@ You may wish to refer to the full [Onspring API documentation](https://software.
```go
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -95,8 +94,9 @@ if err == nil {
```go
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -116,8 +116,9 @@ if err != nil {
```go
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -135,8 +136,9 @@ if err != nil {
```go
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -154,8 +156,9 @@ for app, err := range client.Apps.ListAll(context.TODO()) {
```go
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -177,7 +180,7 @@ if err != nil {
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -199,7 +202,7 @@ if err != nil {
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -219,7 +222,7 @@ if err != nil {
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -239,7 +242,7 @@ for field, err := range client.Fields.ListAll(context.TODO(), 1) {
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -263,7 +266,7 @@ Create a new list item or update an existing one. To create a new item, omit the
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -292,7 +295,7 @@ if err != nil {
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -314,7 +317,7 @@ if err != nil {
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -348,7 +351,7 @@ report, err := client.Reports.Get(
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -368,7 +371,7 @@ if err != nil {
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -390,7 +393,7 @@ for report, err := range client.Reports.ListAll(context.TODO(), 1) {
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -412,7 +415,7 @@ import (
"context"
"fmt"
"os"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -434,7 +437,7 @@ if err != nil {
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -455,7 +458,7 @@ import (
"context"
"fmt"
"os"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -489,7 +492,7 @@ if err != nil {
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -521,7 +524,7 @@ record, err := client.Records.Get(
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -552,7 +555,7 @@ page, err := client.Records.List(
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -572,7 +575,7 @@ for record, err := range client.Records.ListAll(context.TODO(), 1) {
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -598,7 +601,7 @@ if err != nil {
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -621,7 +624,7 @@ if err != nil {
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -644,7 +647,7 @@ for record, err := range client.Records.QueryAll(context.TODO(), onspring.QueryR
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -667,7 +670,7 @@ if err != nil {
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")
@@ -687,7 +690,7 @@ if err != nil {
import (
"context"
"fmt"
"github.com/StevanFreeborn/onspring-api-sdk-go/onspring"
"github.com/StevanFreeborn/onspring-api-sdk-go"
)
client := onspring.NewClient("your-api-key")