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 6, 2024
1 parent 5ec97a2 commit 75f545f
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 @@ -36,6 +36,7 @@ type MessageAttemptListOptions struct {
EndpointId *string
WithContent *bool
WithMsg *bool
Tag *string
}

// Deprecated: use `ListByMsg` or `ListByEndpoint` instead
Expand Down Expand Up @@ -76,6 +77,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 @@ -118,6 +122,9 @@ func (m *MessageAttempt) ListByEndpoint(ctx context.Context, appId string, endpo
if options.WithMsg != nil {
req = req.WithMsg(*options.WithMsg)
}
if options.Tag != nil {
req = req.Tag(*options.Tag)
}
}
out, res, err := req.Execute()
if err != nil {
Expand Down Expand Up @@ -179,6 +186,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 @@ -230,6 +240,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 75f545f

Please sign in to comment.