Skip to content

Commit

Permalink
Libs(Go): expose tag for several MessageAttempt list endpoints
Browse files Browse the repository at this point in the history
Another case of a query param we have in the private API, not exposed in
the public API.
  • Loading branch information
svix-onelson committed Aug 5, 2024
1 parent 3aac5e1 commit 02b376f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions go/messageattempt.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type MessageAttemptListOptions struct {
Channel *string
EndpointId *string
WithContent *bool
Tag *string
}

// Deprecated: use `ListByMsg` or `ListByEndpoint` instead
Expand Down Expand Up @@ -75,6 +76,9 @@ func (m *MessageAttempt) ListByMsg(ctx context.Context, appId string, msgId stri
if options.WithContent != nil {
req = req.WithContent(*options.WithContent)
}
if options.Tag != nil {
req = req.Tag(*options.Tag)
}
}
out, res, err := req.Execute()
if err != nil {
Expand Down Expand Up @@ -114,6 +118,9 @@ func (m *MessageAttempt) ListByEndpoint(ctx context.Context, appId string, endpo
if options.WithContent != nil {
req = req.WithContent(*options.WithContent)
}
if options.Tag != nil {
req = req.Tag(*options.Tag)
}
}
out, res, err := req.Execute()
if err != nil {
Expand Down Expand Up @@ -175,6 +182,9 @@ func (m *MessageAttempt) ListAttemptedMessages(ctx context.Context, appId string
if options.EventTypes != nil {
req = req.EventTypes(*options.EventTypes)
}
if options.Tag != nil {
req = req.Tag(*options.Tag)
}
}
out, res, err := req.Execute()
if err != nil {
Expand Down Expand Up @@ -226,6 +236,9 @@ func (m *MessageAttempt) ListAttemptsForEndpoint(ctx context.Context, appId stri
if options.Channel != nil {
req = req.Channel(*options.Channel)
}
if options.Tag != nil {
req = req.Tag(*options.Tag)
}
}
out, res, err := req.Execute()
if err != nil {
Expand Down

0 comments on commit 02b376f

Please sign in to comment.