List Users
package main
import(
"context"
"os"
sdkgo "github.com/apideck-libraries/sdk-go"
"github.com/apideck-libraries/sdk-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithConsumerID("test-consumer"),
sdkgo.WithAppID("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"),
sdkgo.WithSecurity(os.Getenv("APIDECK_API_KEY")),
)
res, err := s.IssueTracking.CollectionUsers.List(ctx, operations.IssueTrackingCollectionUsersAllRequest{
CollectionID: "apideck-io",
ServiceID: sdkgo.Pointer("salesforce"),
PassThrough: map[string]any{
"search": "San Francisco",
},
Fields: sdkgo.Pointer("id,updated_at"),
})
if err != nil {
log.Fatal(err)
}
if res.GetCollectionUsersResponse != nil {
for {
// handle items
res, err = res.Next()
if err != nil {
// handle error
}
if res == nil {
break
}
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.IssueTrackingCollectionUsersAllRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.IssueTrackingCollectionUsersAllResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.BadRequestResponse | 400 | application/json |
| apierrors.UnauthorizedResponse | 401 | application/json |
| apierrors.PaymentRequiredResponse | 402 | application/json |
| apierrors.NotFoundResponse | 404 | application/json |
| apierrors.UnprocessableResponse | 422 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |
Get user
package main
import(
"context"
"os"
sdkgo "github.com/apideck-libraries/sdk-go"
"github.com/apideck-libraries/sdk-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithConsumerID("test-consumer"),
sdkgo.WithAppID("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"),
sdkgo.WithSecurity(os.Getenv("APIDECK_API_KEY")),
)
res, err := s.IssueTracking.CollectionUsers.Get(ctx, operations.IssueTrackingCollectionUsersOneRequest{
CollectionID: "apideck-io",
ID: "<id>",
ServiceID: sdkgo.Pointer("salesforce"),
Fields: sdkgo.Pointer("id,updated_at"),
})
if err != nil {
log.Fatal(err)
}
if res.GetCollectionUserResponse != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.IssueTrackingCollectionUsersOneRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.IssueTrackingCollectionUsersOneResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.BadRequestResponse | 400 | application/json |
| apierrors.UnauthorizedResponse | 401 | application/json |
| apierrors.PaymentRequiredResponse | 402 | application/json |
| apierrors.NotFoundResponse | 404 | application/json |
| apierrors.UnprocessableResponse | 422 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |