(MailingLists)
View mailing lists
- GetLists - Get a list of mailing lists
Retrieve a list of your account's mailing lists.
package main
import(
loopsgo "github.com/speakeasy-sdks/loops-go"
"context"
"log"
)
func main() {
s := loopsgo.New(
loopsgo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
ctx := context.Background()
res, err := s.MailingLists.GetLists(ctx)
if err != nil {
log.Fatal(err)
}
if res.MailingLists != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetListsResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |