@@ -85,16 +85,16 @@ func (r *ScriptService) Update(ctx context.Context, scriptName string, params Sc
8585}
8686
8787// Fetch a list of uploaded workers.
88- func (r * ScriptService ) List (ctx context.Context , query ScriptListParams , opts ... option.RequestOption ) (res * pagination.SinglePage [Script ], err error ) {
88+ func (r * ScriptService ) List (ctx context.Context , params ScriptListParams , opts ... option.RequestOption ) (res * pagination.SinglePage [Script ], err error ) {
8989 var raw * http.Response
9090 opts = append (r .Options [:], opts ... )
9191 opts = append ([]option.RequestOption {option .WithResponseInto (& raw )}, opts ... )
92- if query .AccountID .Value == "" {
92+ if params .AccountID .Value == "" {
9393 err = errors .New ("missing required account_id parameter" )
9494 return
9595 }
96- path := fmt .Sprintf ("accounts/%s/workers/scripts" , query .AccountID )
97- cfg , err := requestconfig .NewRequestConfig (ctx , http .MethodGet , path , nil , & res , opts ... )
96+ path := fmt .Sprintf ("accounts/%s/workers/scripts" , params .AccountID )
97+ cfg , err := requestconfig .NewRequestConfig (ctx , http .MethodGet , path , params , & res , opts ... )
9898 if err != nil {
9999 return nil , err
100100 }
@@ -107,8 +107,8 @@ func (r *ScriptService) List(ctx context.Context, query ScriptListParams, opts .
107107}
108108
109109// Fetch a list of uploaded workers.
110- func (r * ScriptService ) ListAutoPaging (ctx context.Context , query ScriptListParams , opts ... option.RequestOption ) * pagination.SinglePageAutoPager [Script ] {
111- return pagination .NewSinglePageAutoPager (r .List (ctx , query , opts ... ))
110+ func (r * ScriptService ) ListAutoPaging (ctx context.Context , params ScriptListParams , opts ... option.RequestOption ) * pagination.SinglePageAutoPager [Script ] {
111+ return pagination .NewSinglePageAutoPager (r .List (ctx , params , opts ... ))
112112}
113113
114114// Delete your worker. This call has no response body on a successful delete.
@@ -1968,6 +1968,17 @@ func (r ScriptUpdateResponseEnvelopeSuccess) IsKnown() bool {
19681968type ScriptListParams struct {
19691969 // Identifier.
19701970 AccountID param.Field [string ] `path:"account_id,required"`
1971+ // Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where
1972+ // allowed is 'yes' or 'no'.
1973+ Tags param.Field [string ] `query:"tags"`
1974+ }
1975+
1976+ // URLQuery serializes [ScriptListParams]'s query parameters as `url.Values`.
1977+ func (r ScriptListParams ) URLQuery () (v url.Values ) {
1978+ return apiquery .MarshalWithSettings (r , apiquery.QuerySettings {
1979+ ArrayFormat : apiquery .ArrayQueryFormatRepeat ,
1980+ NestedFormat : apiquery .NestedQueryFormatDots ,
1981+ })
19711982}
19721983
19731984type ScriptDeleteParams struct {
0 commit comments