Skip to content

Commit f53c2f0

Browse files
stainless-app[bot]Stainless Bot
authored and
Stainless Bot
committedNov 5, 2024
feat(api): api update (#3567)
1 parent 8f581c8 commit f53c2f0

File tree

4 files changed

+100
-100
lines changed

4 files changed

+100
-100
lines changed
 

‎api.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -6994,23 +6994,23 @@ Methods:
69946994

69956995
# Calls
69966996

6997-
## Sfu
6997+
## SFU
69986998

69996999
Response Types:
70007000

7001-
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuNewResponse">SfuNewResponse</a>
7002-
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuUpdateResponse">SfuUpdateResponse</a>
7003-
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuListResponse">SfuListResponse</a>
7004-
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuDeleteResponse">SfuDeleteResponse</a>
7005-
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuGetResponse">SfuGetResponse</a>
7001+
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUNewResponse">SFUNewResponse</a>
7002+
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUUpdateResponse">SFUUpdateResponse</a>
7003+
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUListResponse">SFUListResponse</a>
7004+
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUDeleteResponse">SFUDeleteResponse</a>
7005+
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUGetResponse">SFUGetResponse</a>
70067006

70077007
Methods:
70087008

7009-
- <code title="post /accounts/{account_id}/calls/apps">client.Calls.Sfu.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuNewParams">SfuNewParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuNewResponse">SfuNewResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
7010-
- <code title="put /accounts/{account_id}/calls/apps/{app_id}">client.Calls.Sfu.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, appID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuUpdateParams">SfuUpdateParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuUpdateResponse">SfuUpdateResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
7011-
- <code title="get /accounts/{account_id}/calls/apps">client.Calls.Sfu.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuListParams">SfuListParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/packages/pagination#SinglePage">SinglePage</a>[<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuListResponse">SfuListResponse</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
7012-
- <code title="delete /accounts/{account_id}/calls/apps/{app_id}">client.Calls.Sfu.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, appID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuDeleteParams">SfuDeleteParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuDeleteResponse">SfuDeleteResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
7013-
- <code title="get /accounts/{account_id}/calls/apps/{app_id}">client.Calls.Sfu.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, appID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuGetParams">SfuGetParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SfuGetResponse">SfuGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
7009+
- <code title="post /accounts/{account_id}/calls/apps">client.Calls.SFU.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUNewParams">SFUNewParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUNewResponse">SFUNewResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
7010+
- <code title="put /accounts/{account_id}/calls/apps/{app_id}">client.Calls.SFU.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, appID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUUpdateParams">SFUUpdateParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUUpdateResponse">SFUUpdateResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
7011+
- <code title="get /accounts/{account_id}/calls/apps">client.Calls.SFU.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUListParams">SFUListParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/packages/pagination#SinglePage">SinglePage</a>[<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUListResponse">SFUListResponse</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
7012+
- <code title="delete /accounts/{account_id}/calls/apps/{app_id}">client.Calls.SFU.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, appID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUDeleteParams">SFUDeleteParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUDeleteResponse">SFUDeleteResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
7013+
- <code title="get /accounts/{account_id}/calls/apps/{app_id}">client.Calls.SFU.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, appID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUGetParams">SFUGetParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls">calls</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/calls#SFUGetResponse">SFUGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
70147014

70157015
## TURN
70167016

‎calls/call.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
// the [NewCallService] method instead.
1515
type CallService struct {
1616
Options []option.RequestOption
17-
Sfu *SfuService
17+
SFU *SFUService
1818
TURN *TURNService
1919
}
2020

@@ -24,7 +24,7 @@ type CallService struct {
2424
func NewCallService(opts ...option.RequestOption) (r *CallService) {
2525
r = &CallService{}
2626
r.Options = opts
27-
r.Sfu = NewSfuService(opts...)
27+
r.SFU = NewSFUService(opts...)
2828
r.TURN = NewTURNService(opts...)
2929
return
3030
}

‎calls/sfu.go

+74-74
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,29 @@ import (
1717
"github.com/cloudflare/cloudflare-go/v3/shared"
1818
)
1919

20-
// SfuService contains methods and other services that help with interacting with
20+
// SFUService contains methods and other services that help with interacting with
2121
// the cloudflare API.
2222
//
2323
// Note, unlike clients, this service does not read variables from the environment
2424
// automatically. You should not instantiate this service directly, and instead use
25-
// the [NewSfuService] method instead.
26-
type SfuService struct {
25+
// the [NewSFUService] method instead.
26+
type SFUService struct {
2727
Options []option.RequestOption
2828
}
2929

30-
// NewSfuService generates a new service that applies the given options to each
30+
// NewSFUService generates a new service that applies the given options to each
3131
// request. These options are applied after the parent client's options (if there
3232
// is one), and before any request-specific options.
33-
func NewSfuService(opts ...option.RequestOption) (r *SfuService) {
34-
r = &SfuService{}
33+
func NewSFUService(opts ...option.RequestOption) (r *SFUService) {
34+
r = &SFUService{}
3535
r.Options = opts
3636
return
3737
}
3838

3939
// Creates a new Cloudflare calls app. An app is an unique enviroment where each
4040
// Session can access all Tracks within the app.
41-
func (r *SfuService) New(ctx context.Context, params SfuNewParams, opts ...option.RequestOption) (res *SfuNewResponse, err error) {
42-
var env SfuNewResponseEnvelope
41+
func (r *SFUService) New(ctx context.Context, params SFUNewParams, opts ...option.RequestOption) (res *SFUNewResponse, err error) {
42+
var env SFUNewResponseEnvelope
4343
opts = append(r.Options[:], opts...)
4444
if params.AccountID.Value == "" {
4545
err = errors.New("missing required account_id parameter")
@@ -55,8 +55,8 @@ func (r *SfuService) New(ctx context.Context, params SfuNewParams, opts ...optio
5555
}
5656

5757
// Edit details for a single app.
58-
func (r *SfuService) Update(ctx context.Context, appID string, params SfuUpdateParams, opts ...option.RequestOption) (res *SfuUpdateResponse, err error) {
59-
var env SfuUpdateResponseEnvelope
58+
func (r *SFUService) Update(ctx context.Context, appID string, params SFUUpdateParams, opts ...option.RequestOption) (res *SFUUpdateResponse, err error) {
59+
var env SFUUpdateResponseEnvelope
6060
opts = append(r.Options[:], opts...)
6161
if params.AccountID.Value == "" {
6262
err = errors.New("missing required account_id parameter")
@@ -76,7 +76,7 @@ func (r *SfuService) Update(ctx context.Context, appID string, params SfuUpdateP
7676
}
7777

7878
// Lists all apps in the Cloudflare account
79-
func (r *SfuService) List(ctx context.Context, query SfuListParams, opts ...option.RequestOption) (res *pagination.SinglePage[SfuListResponse], err error) {
79+
func (r *SFUService) List(ctx context.Context, query SFUListParams, opts ...option.RequestOption) (res *pagination.SinglePage[SFUListResponse], err error) {
8080
var raw *http.Response
8181
opts = append(r.Options[:], opts...)
8282
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
@@ -98,13 +98,13 @@ func (r *SfuService) List(ctx context.Context, query SfuListParams, opts ...opti
9898
}
9999

100100
// Lists all apps in the Cloudflare account
101-
func (r *SfuService) ListAutoPaging(ctx context.Context, query SfuListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[SfuListResponse] {
101+
func (r *SFUService) ListAutoPaging(ctx context.Context, query SFUListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[SFUListResponse] {
102102
return pagination.NewSinglePageAutoPager(r.List(ctx, query, opts...))
103103
}
104104

105105
// Deletes an app from Cloudflare Calls
106-
func (r *SfuService) Delete(ctx context.Context, appID string, body SfuDeleteParams, opts ...option.RequestOption) (res *SfuDeleteResponse, err error) {
107-
var env SfuDeleteResponseEnvelope
106+
func (r *SFUService) Delete(ctx context.Context, appID string, body SFUDeleteParams, opts ...option.RequestOption) (res *SFUDeleteResponse, err error) {
107+
var env SFUDeleteResponseEnvelope
108108
opts = append(r.Options[:], opts...)
109109
if body.AccountID.Value == "" {
110110
err = errors.New("missing required account_id parameter")
@@ -124,8 +124,8 @@ func (r *SfuService) Delete(ctx context.Context, appID string, body SfuDeletePar
124124
}
125125

126126
// Fetches details for a single Calls app.
127-
func (r *SfuService) Get(ctx context.Context, appID string, query SfuGetParams, opts ...option.RequestOption) (res *SfuGetResponse, err error) {
128-
var env SfuGetResponseEnvelope
127+
func (r *SFUService) Get(ctx context.Context, appID string, query SFUGetParams, opts ...option.RequestOption) (res *SFUGetResponse, err error) {
128+
var env SFUGetResponseEnvelope
129129
opts = append(r.Options[:], opts...)
130130
if query.AccountID.Value == "" {
131131
err = errors.New("missing required account_id parameter")
@@ -144,7 +144,7 @@ func (r *SfuService) Get(ctx context.Context, appID string, query SfuGetParams,
144144
return
145145
}
146146

147-
type SfuNewResponse struct {
147+
type SFUNewResponse struct {
148148
// The date and time the item was created.
149149
Created time.Time `json:"created" format:"date-time"`
150150
// The date and time the item was last modified.
@@ -158,7 +158,7 @@ type SfuNewResponse struct {
158158
JSON sfuNewResponseJSON `json:"-"`
159159
}
160160

161-
// sfuNewResponseJSON contains the JSON metadata for the struct [SfuNewResponse]
161+
// sfuNewResponseJSON contains the JSON metadata for the struct [SFUNewResponse]
162162
type sfuNewResponseJSON struct {
163163
Created apijson.Field
164164
Modified apijson.Field
@@ -169,15 +169,15 @@ type sfuNewResponseJSON struct {
169169
ExtraFields map[string]apijson.Field
170170
}
171171

172-
func (r *SfuNewResponse) UnmarshalJSON(data []byte) (err error) {
172+
func (r *SFUNewResponse) UnmarshalJSON(data []byte) (err error) {
173173
return apijson.UnmarshalRoot(data, r)
174174
}
175175

176176
func (r sfuNewResponseJSON) RawJSON() string {
177177
return r.raw
178178
}
179179

180-
type SfuUpdateResponse struct {
180+
type SFUUpdateResponse struct {
181181
// The date and time the item was created.
182182
Created time.Time `json:"created" format:"date-time"`
183183
// The date and time the item was last modified.
@@ -190,7 +190,7 @@ type SfuUpdateResponse struct {
190190
}
191191

192192
// sfuUpdateResponseJSON contains the JSON metadata for the struct
193-
// [SfuUpdateResponse]
193+
// [SFUUpdateResponse]
194194
type sfuUpdateResponseJSON struct {
195195
Created apijson.Field
196196
Modified apijson.Field
@@ -200,15 +200,15 @@ type sfuUpdateResponseJSON struct {
200200
ExtraFields map[string]apijson.Field
201201
}
202202

203-
func (r *SfuUpdateResponse) UnmarshalJSON(data []byte) (err error) {
203+
func (r *SFUUpdateResponse) UnmarshalJSON(data []byte) (err error) {
204204
return apijson.UnmarshalRoot(data, r)
205205
}
206206

207207
func (r sfuUpdateResponseJSON) RawJSON() string {
208208
return r.raw
209209
}
210210

211-
type SfuListResponse struct {
211+
type SFUListResponse struct {
212212
// The date and time the item was created.
213213
Created time.Time `json:"created" format:"date-time"`
214214
// The date and time the item was last modified.
@@ -220,7 +220,7 @@ type SfuListResponse struct {
220220
JSON sfuListResponseJSON `json:"-"`
221221
}
222222

223-
// sfuListResponseJSON contains the JSON metadata for the struct [SfuListResponse]
223+
// sfuListResponseJSON contains the JSON metadata for the struct [SFUListResponse]
224224
type sfuListResponseJSON struct {
225225
Created apijson.Field
226226
Modified apijson.Field
@@ -230,15 +230,15 @@ type sfuListResponseJSON struct {
230230
ExtraFields map[string]apijson.Field
231231
}
232232

233-
func (r *SfuListResponse) UnmarshalJSON(data []byte) (err error) {
233+
func (r *SFUListResponse) UnmarshalJSON(data []byte) (err error) {
234234
return apijson.UnmarshalRoot(data, r)
235235
}
236236

237237
func (r sfuListResponseJSON) RawJSON() string {
238238
return r.raw
239239
}
240240

241-
type SfuDeleteResponse struct {
241+
type SFUDeleteResponse struct {
242242
// The date and time the item was created.
243243
Created time.Time `json:"created" format:"date-time"`
244244
// The date and time the item was last modified.
@@ -251,7 +251,7 @@ type SfuDeleteResponse struct {
251251
}
252252

253253
// sfuDeleteResponseJSON contains the JSON metadata for the struct
254-
// [SfuDeleteResponse]
254+
// [SFUDeleteResponse]
255255
type sfuDeleteResponseJSON struct {
256256
Created apijson.Field
257257
Modified apijson.Field
@@ -261,15 +261,15 @@ type sfuDeleteResponseJSON struct {
261261
ExtraFields map[string]apijson.Field
262262
}
263263

264-
func (r *SfuDeleteResponse) UnmarshalJSON(data []byte) (err error) {
264+
func (r *SFUDeleteResponse) UnmarshalJSON(data []byte) (err error) {
265265
return apijson.UnmarshalRoot(data, r)
266266
}
267267

268268
func (r sfuDeleteResponseJSON) RawJSON() string {
269269
return r.raw
270270
}
271271

272-
type SfuGetResponse struct {
272+
type SFUGetResponse struct {
273273
// The date and time the item was created.
274274
Created time.Time `json:"created" format:"date-time"`
275275
// The date and time the item was last modified.
@@ -281,7 +281,7 @@ type SfuGetResponse struct {
281281
JSON sfuGetResponseJSON `json:"-"`
282282
}
283283

284-
// sfuGetResponseJSON contains the JSON metadata for the struct [SfuGetResponse]
284+
// sfuGetResponseJSON contains the JSON metadata for the struct [SFUGetResponse]
285285
type sfuGetResponseJSON struct {
286286
Created apijson.Field
287287
Modified apijson.Field
@@ -291,36 +291,36 @@ type sfuGetResponseJSON struct {
291291
ExtraFields map[string]apijson.Field
292292
}
293293

294-
func (r *SfuGetResponse) UnmarshalJSON(data []byte) (err error) {
294+
func (r *SFUGetResponse) UnmarshalJSON(data []byte) (err error) {
295295
return apijson.UnmarshalRoot(data, r)
296296
}
297297

298298
func (r sfuGetResponseJSON) RawJSON() string {
299299
return r.raw
300300
}
301301

302-
type SfuNewParams struct {
302+
type SFUNewParams struct {
303303
// The account identifier tag.
304304
AccountID param.Field[string] `path:"account_id,required"`
305305
// A short description of Calls app, not shown to end users.
306306
Name param.Field[string] `json:"name"`
307307
}
308308

309-
func (r SfuNewParams) MarshalJSON() (data []byte, err error) {
309+
func (r SFUNewParams) MarshalJSON() (data []byte, err error) {
310310
return apijson.MarshalRoot(r)
311311
}
312312

313-
type SfuNewResponseEnvelope struct {
313+
type SFUNewResponseEnvelope struct {
314314
Errors []shared.ResponseInfo `json:"errors,required"`
315315
Messages []shared.ResponseInfo `json:"messages,required"`
316316
// Whether the API call was successful
317-
Success SfuNewResponseEnvelopeSuccess `json:"success,required"`
318-
Result SfuNewResponse `json:"result"`
317+
Success SFUNewResponseEnvelopeSuccess `json:"success,required"`
318+
Result SFUNewResponse `json:"result"`
319319
JSON sfuNewResponseEnvelopeJSON `json:"-"`
320320
}
321321

322322
// sfuNewResponseEnvelopeJSON contains the JSON metadata for the struct
323-
// [SfuNewResponseEnvelope]
323+
// [SFUNewResponseEnvelope]
324324
type sfuNewResponseEnvelopeJSON struct {
325325
Errors apijson.Field
326326
Messages apijson.Field
@@ -330,7 +330,7 @@ type sfuNewResponseEnvelopeJSON struct {
330330
ExtraFields map[string]apijson.Field
331331
}
332332

333-
func (r *SfuNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
333+
func (r *SFUNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
334334
return apijson.UnmarshalRoot(data, r)
335335
}
336336

@@ -339,42 +339,42 @@ func (r sfuNewResponseEnvelopeJSON) RawJSON() string {
339339
}
340340

341341
// Whether the API call was successful
342-
type SfuNewResponseEnvelopeSuccess bool
342+
type SFUNewResponseEnvelopeSuccess bool
343343

344344
const (
345-
SfuNewResponseEnvelopeSuccessTrue SfuNewResponseEnvelopeSuccess = true
345+
SFUNewResponseEnvelopeSuccessTrue SFUNewResponseEnvelopeSuccess = true
346346
)
347347

348-
func (r SfuNewResponseEnvelopeSuccess) IsKnown() bool {
348+
func (r SFUNewResponseEnvelopeSuccess) IsKnown() bool {
349349
switch r {
350-
case SfuNewResponseEnvelopeSuccessTrue:
350+
case SFUNewResponseEnvelopeSuccessTrue:
351351
return true
352352
}
353353
return false
354354
}
355355

356-
type SfuUpdateParams struct {
356+
type SFUUpdateParams struct {
357357
// The account identifier tag.
358358
AccountID param.Field[string] `path:"account_id,required"`
359359
// A short description of Calls app, not shown to end users.
360360
Name param.Field[string] `json:"name"`
361361
}
362362

363-
func (r SfuUpdateParams) MarshalJSON() (data []byte, err error) {
363+
func (r SFUUpdateParams) MarshalJSON() (data []byte, err error) {
364364
return apijson.MarshalRoot(r)
365365
}
366366

367-
type SfuUpdateResponseEnvelope struct {
367+
type SFUUpdateResponseEnvelope struct {
368368
Errors []shared.ResponseInfo `json:"errors,required"`
369369
Messages []shared.ResponseInfo `json:"messages,required"`
370370
// Whether the API call was successful
371-
Success SfuUpdateResponseEnvelopeSuccess `json:"success,required"`
372-
Result SfuUpdateResponse `json:"result"`
371+
Success SFUUpdateResponseEnvelopeSuccess `json:"success,required"`
372+
Result SFUUpdateResponse `json:"result"`
373373
JSON sfuUpdateResponseEnvelopeJSON `json:"-"`
374374
}
375375

376376
// sfuUpdateResponseEnvelopeJSON contains the JSON metadata for the struct
377-
// [SfuUpdateResponseEnvelope]
377+
// [SFUUpdateResponseEnvelope]
378378
type sfuUpdateResponseEnvelopeJSON struct {
379379
Errors apijson.Field
380380
Messages apijson.Field
@@ -384,7 +384,7 @@ type sfuUpdateResponseEnvelopeJSON struct {
384384
ExtraFields map[string]apijson.Field
385385
}
386386

387-
func (r *SfuUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
387+
func (r *SFUUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
388388
return apijson.UnmarshalRoot(data, r)
389389
}
390390

@@ -393,41 +393,41 @@ func (r sfuUpdateResponseEnvelopeJSON) RawJSON() string {
393393
}
394394

395395
// Whether the API call was successful
396-
type SfuUpdateResponseEnvelopeSuccess bool
396+
type SFUUpdateResponseEnvelopeSuccess bool
397397

398398
const (
399-
SfuUpdateResponseEnvelopeSuccessTrue SfuUpdateResponseEnvelopeSuccess = true
399+
SFUUpdateResponseEnvelopeSuccessTrue SFUUpdateResponseEnvelopeSuccess = true
400400
)
401401

402-
func (r SfuUpdateResponseEnvelopeSuccess) IsKnown() bool {
402+
func (r SFUUpdateResponseEnvelopeSuccess) IsKnown() bool {
403403
switch r {
404-
case SfuUpdateResponseEnvelopeSuccessTrue:
404+
case SFUUpdateResponseEnvelopeSuccessTrue:
405405
return true
406406
}
407407
return false
408408
}
409409

410-
type SfuListParams struct {
410+
type SFUListParams struct {
411411
// The account identifier tag.
412412
AccountID param.Field[string] `path:"account_id,required"`
413413
}
414414

415-
type SfuDeleteParams struct {
415+
type SFUDeleteParams struct {
416416
// The account identifier tag.
417417
AccountID param.Field[string] `path:"account_id,required"`
418418
}
419419

420-
type SfuDeleteResponseEnvelope struct {
420+
type SFUDeleteResponseEnvelope struct {
421421
Errors []shared.ResponseInfo `json:"errors,required"`
422422
Messages []shared.ResponseInfo `json:"messages,required"`
423423
// Whether the API call was successful
424-
Success SfuDeleteResponseEnvelopeSuccess `json:"success,required"`
425-
Result SfuDeleteResponse `json:"result"`
424+
Success SFUDeleteResponseEnvelopeSuccess `json:"success,required"`
425+
Result SFUDeleteResponse `json:"result"`
426426
JSON sfuDeleteResponseEnvelopeJSON `json:"-"`
427427
}
428428

429429
// sfuDeleteResponseEnvelopeJSON contains the JSON metadata for the struct
430-
// [SfuDeleteResponseEnvelope]
430+
// [SFUDeleteResponseEnvelope]
431431
type sfuDeleteResponseEnvelopeJSON struct {
432432
Errors apijson.Field
433433
Messages apijson.Field
@@ -437,7 +437,7 @@ type sfuDeleteResponseEnvelopeJSON struct {
437437
ExtraFields map[string]apijson.Field
438438
}
439439

440-
func (r *SfuDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
440+
func (r *SFUDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
441441
return apijson.UnmarshalRoot(data, r)
442442
}
443443

@@ -446,36 +446,36 @@ func (r sfuDeleteResponseEnvelopeJSON) RawJSON() string {
446446
}
447447

448448
// Whether the API call was successful
449-
type SfuDeleteResponseEnvelopeSuccess bool
449+
type SFUDeleteResponseEnvelopeSuccess bool
450450

451451
const (
452-
SfuDeleteResponseEnvelopeSuccessTrue SfuDeleteResponseEnvelopeSuccess = true
452+
SFUDeleteResponseEnvelopeSuccessTrue SFUDeleteResponseEnvelopeSuccess = true
453453
)
454454

455-
func (r SfuDeleteResponseEnvelopeSuccess) IsKnown() bool {
455+
func (r SFUDeleteResponseEnvelopeSuccess) IsKnown() bool {
456456
switch r {
457-
case SfuDeleteResponseEnvelopeSuccessTrue:
457+
case SFUDeleteResponseEnvelopeSuccessTrue:
458458
return true
459459
}
460460
return false
461461
}
462462

463-
type SfuGetParams struct {
463+
type SFUGetParams struct {
464464
// The account identifier tag.
465465
AccountID param.Field[string] `path:"account_id,required"`
466466
}
467467

468-
type SfuGetResponseEnvelope struct {
468+
type SFUGetResponseEnvelope struct {
469469
Errors []shared.ResponseInfo `json:"errors,required"`
470470
Messages []shared.ResponseInfo `json:"messages,required"`
471471
// Whether the API call was successful
472-
Success SfuGetResponseEnvelopeSuccess `json:"success,required"`
473-
Result SfuGetResponse `json:"result"`
472+
Success SFUGetResponseEnvelopeSuccess `json:"success,required"`
473+
Result SFUGetResponse `json:"result"`
474474
JSON sfuGetResponseEnvelopeJSON `json:"-"`
475475
}
476476

477477
// sfuGetResponseEnvelopeJSON contains the JSON metadata for the struct
478-
// [SfuGetResponseEnvelope]
478+
// [SFUGetResponseEnvelope]
479479
type sfuGetResponseEnvelopeJSON struct {
480480
Errors apijson.Field
481481
Messages apijson.Field
@@ -485,7 +485,7 @@ type sfuGetResponseEnvelopeJSON struct {
485485
ExtraFields map[string]apijson.Field
486486
}
487487

488-
func (r *SfuGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
488+
func (r *SFUGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
489489
return apijson.UnmarshalRoot(data, r)
490490
}
491491

@@ -494,15 +494,15 @@ func (r sfuGetResponseEnvelopeJSON) RawJSON() string {
494494
}
495495

496496
// Whether the API call was successful
497-
type SfuGetResponseEnvelopeSuccess bool
497+
type SFUGetResponseEnvelopeSuccess bool
498498

499499
const (
500-
SfuGetResponseEnvelopeSuccessTrue SfuGetResponseEnvelopeSuccess = true
500+
SFUGetResponseEnvelopeSuccessTrue SFUGetResponseEnvelopeSuccess = true
501501
)
502502

503-
func (r SfuGetResponseEnvelopeSuccess) IsKnown() bool {
503+
func (r SFUGetResponseEnvelopeSuccess) IsKnown() bool {
504504
switch r {
505-
case SfuGetResponseEnvelopeSuccessTrue:
505+
case SFUGetResponseEnvelopeSuccessTrue:
506506
return true
507507
}
508508
return false

‎calls/sfu_test.go

+13-13
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/cloudflare/cloudflare-go/v3/option"
1515
)
1616

17-
func TestSfuNewWithOptionalParams(t *testing.T) {
17+
func TestSFUNewWithOptionalParams(t *testing.T) {
1818
baseURL := "http://localhost:4010"
1919
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
2020
baseURL = envURL
@@ -27,7 +27,7 @@ func TestSfuNewWithOptionalParams(t *testing.T) {
2727
option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
2828
option.WithAPIEmail("user@example.com"),
2929
)
30-
_, err := client.Calls.Sfu.New(context.TODO(), calls.SfuNewParams{
30+
_, err := client.Calls.SFU.New(context.TODO(), calls.SFUNewParams{
3131
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
3232
Name: cloudflare.F("production-realtime-app"),
3333
})
@@ -40,7 +40,7 @@ func TestSfuNewWithOptionalParams(t *testing.T) {
4040
}
4141
}
4242

43-
func TestSfuUpdateWithOptionalParams(t *testing.T) {
43+
func TestSFUUpdateWithOptionalParams(t *testing.T) {
4444
baseURL := "http://localhost:4010"
4545
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
4646
baseURL = envURL
@@ -53,10 +53,10 @@ func TestSfuUpdateWithOptionalParams(t *testing.T) {
5353
option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
5454
option.WithAPIEmail("user@example.com"),
5555
)
56-
_, err := client.Calls.Sfu.Update(
56+
_, err := client.Calls.SFU.Update(
5757
context.TODO(),
5858
"2a95132c15732412d22c1476fa83f27a",
59-
calls.SfuUpdateParams{
59+
calls.SFUUpdateParams{
6060
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
6161
Name: cloudflare.F("production-realtime-app"),
6262
},
@@ -70,7 +70,7 @@ func TestSfuUpdateWithOptionalParams(t *testing.T) {
7070
}
7171
}
7272

73-
func TestSfuList(t *testing.T) {
73+
func TestSFUList(t *testing.T) {
7474
baseURL := "http://localhost:4010"
7575
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
7676
baseURL = envURL
@@ -83,7 +83,7 @@ func TestSfuList(t *testing.T) {
8383
option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
8484
option.WithAPIEmail("user@example.com"),
8585
)
86-
_, err := client.Calls.Sfu.List(context.TODO(), calls.SfuListParams{
86+
_, err := client.Calls.SFU.List(context.TODO(), calls.SFUListParams{
8787
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
8888
})
8989
if err != nil {
@@ -95,7 +95,7 @@ func TestSfuList(t *testing.T) {
9595
}
9696
}
9797

98-
func TestSfuDelete(t *testing.T) {
98+
func TestSFUDelete(t *testing.T) {
9999
baseURL := "http://localhost:4010"
100100
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
101101
baseURL = envURL
@@ -108,10 +108,10 @@ func TestSfuDelete(t *testing.T) {
108108
option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
109109
option.WithAPIEmail("user@example.com"),
110110
)
111-
_, err := client.Calls.Sfu.Delete(
111+
_, err := client.Calls.SFU.Delete(
112112
context.TODO(),
113113
"2a95132c15732412d22c1476fa83f27a",
114-
calls.SfuDeleteParams{
114+
calls.SFUDeleteParams{
115115
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
116116
},
117117
)
@@ -124,7 +124,7 @@ func TestSfuDelete(t *testing.T) {
124124
}
125125
}
126126

127-
func TestSfuGet(t *testing.T) {
127+
func TestSFUGet(t *testing.T) {
128128
baseURL := "http://localhost:4010"
129129
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
130130
baseURL = envURL
@@ -137,10 +137,10 @@ func TestSfuGet(t *testing.T) {
137137
option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
138138
option.WithAPIEmail("user@example.com"),
139139
)
140-
_, err := client.Calls.Sfu.Get(
140+
_, err := client.Calls.SFU.Get(
141141
context.TODO(),
142142
"2a95132c15732412d22c1476fa83f27a",
143-
calls.SfuGetParams{
143+
calls.SFUGetParams{
144144
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
145145
},
146146
)

0 commit comments

Comments
 (0)
Please sign in to comment.