Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/speakeasy-sdks/mergent-go
A go SDK for accessing the Mergent API.
https://github.com/speakeasy-sdks/mergent-go
api go golang sdk serverless
Last synced: 2 days ago
JSON representation
A go SDK for accessing the Mergent API.
- Host: GitHub
- URL: https://github.com/speakeasy-sdks/mergent-go
- Owner: speakeasy-sdks
- License: mit
- Created: 2023-03-30T08:20:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-02T21:19:38.000Z (7 months ago)
- Last Synced: 2024-04-28T05:14:46.628Z (6 months ago)
- Topics: api, go, golang, sdk, serverless
- Homepage: https://mergent.co/
- Size: 60.5 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## SDK Installation
```bash
go get github.com/speakeasy-sdks/mergent-go
```## SDK Example Usage
```go
package mainimport (
"context"
"log"
"github.com/speakeasy-sdks/mergent-go"
"github.com/speakeasy-sdks/mergent-go/pkg/models/shared"
"github.com/speakeasy-sdks/mergent-go/pkg/models/operations"
)func main() {
s := mergent.New(
mergent.WithSecurity(shared.Security{
APIKey: "Bearer YOUR_BEARER_TOKEN_HERE",
}),
)req := shared.TaskNewInput{
Delay: "60s",
Name: "mytask",
Queue: "process1",
Request: shared.Request{
Body: "Body String",
Headers: map[string]interface{}{
"provident": "distinctio",
"quibusdam": "unde",
"nulla": "corrupti",
},
URL: "http://example.com",
},
ScheduledFor: "2021-10-01T15:53:05Z",
}ctx := context.Background()
res, err := s.Tasks.Create(ctx, req)
if err != nil {
log.Fatal(err)
}if res.Task != nil {
// handle response
}
}
```## Available Resources and Operations
### Schedules
* `Create` - Create Schedule
* `Delete` - Delete Schedule
* `Get` - Get Schedule
* `GetTasks` - Get Schedule Tasks
* `List` - Get Schedules
* `Update` - Update Schedule### Tasks
* `BatchCreate` - Batch Create Tasks (Beta)
* `BatchDelete` - Batch Delete Tasks (Beta)
* `Create` - Create Task
* `Delete` - Delete Task
* `Get` - Get Task
* `List` - Get Tasks
* `Run` - Run Task
* `Update` - Update Task### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)