MCPcopy Index your code
hub / github.com/coder/coder / ListInboxNotificationsRequestToQueryParams

Function ListInboxNotificationsRequestToQueryParams

codersdk/inboxnotification.go:55–71  ·  view source on GitHub ↗
(req ListInboxNotificationsRequest)

Source from the content-addressed store, hash-verified

53}
54
55func ListInboxNotificationsRequestToQueryParams(req ListInboxNotificationsRequest) []RequestOption {
56 var opts []RequestOption
57 if req.Targets != "" {
58 opts = append(opts, WithQueryParam("targets", req.Targets))
59 }
60 if req.Templates != "" {
61 opts = append(opts, WithQueryParam("templates", req.Templates))
62 }
63 if req.ReadStatus != "" {
64 opts = append(opts, WithQueryParam("read_status", req.ReadStatus))
65 }
66 if req.StartingBefore != "" {
67 opts = append(opts, WithQueryParam("starting_before", req.StartingBefore))
68 }
69
70 return opts
71}
72
73func (c *Client) ListInboxNotifications(ctx context.Context, req ListInboxNotificationsRequest) (ListInboxNotificationsResponse, error) {
74 res, err := c.Request(

Callers 2

Calls 1

WithQueryParamFunction · 0.85

Tested by 1