@@ -43,7 +43,7 @@ func (r *EditorService) Get(ctx context.Context, body EditorGetParams, opts ...o
43
43
}
44
44
45
45
// ListEditors lists all editors available to the caller
46
- func (r * EditorService ) List (ctx context.Context , params EditorListParams , opts ... option.RequestOption ) (res * pagination.PersonalAccessTokensPage [EditorListResponse ], err error ) {
46
+ func (r * EditorService ) List (ctx context.Context , params EditorListParams , opts ... option.RequestOption ) (res * pagination.EditorsPage [EditorListResponse ], err error ) {
47
47
var raw * http.Response
48
48
opts = append (r .Options [:], opts ... )
49
49
opts = append ([]option.RequestOption {option .WithResponseInto (& raw )}, opts ... )
@@ -61,8 +61,8 @@ func (r *EditorService) List(ctx context.Context, params EditorListParams, opts
61
61
}
62
62
63
63
// ListEditors lists all editors available to the caller
64
- func (r * EditorService ) ListAutoPaging (ctx context.Context , params EditorListParams , opts ... option.RequestOption ) * pagination.PersonalAccessTokensPageAutoPager [EditorListResponse ] {
65
- return pagination .NewPersonalAccessTokensPageAutoPager (r .List (ctx , params , opts ... ))
64
+ func (r * EditorService ) ListAutoPaging (ctx context.Context , params EditorListParams , opts ... option.RequestOption ) * pagination.EditorsPageAutoPager [EditorListResponse ] {
65
+ return pagination .NewEditorsPageAutoPager (r .List (ctx , params , opts ... ))
66
66
}
67
67
68
68
// ResolveEditorURL resolves the editor's URL for an environment
@@ -130,44 +130,19 @@ func (r editorGetResponseEditorJSON) RawJSON() string {
130
130
}
131
131
132
132
type EditorListResponse struct {
133
- // editors contains the list of editors
134
- Editors []EditorListResponseEditor `json:"editors"`
135
- // pagination contains the pagination options for listing environments
136
- Pagination EditorListResponsePagination `json:"pagination"`
137
- JSON editorListResponseJSON `json:"-"`
133
+ ID string `json:"id"`
134
+ Alias string `json:"alias"`
135
+ IconURL string `json:"iconUrl"`
136
+ InstallationInstructions string `json:"installationInstructions"`
137
+ Name string `json:"name"`
138
+ ShortDescription string `json:"shortDescription"`
139
+ URLTemplate string `json:"urlTemplate"`
140
+ JSON editorListResponseJSON `json:"-"`
138
141
}
139
142
140
143
// editorListResponseJSON contains the JSON metadata for the struct
141
144
// [EditorListResponse]
142
145
type editorListResponseJSON struct {
143
- Editors apijson.Field
144
- Pagination apijson.Field
145
- raw string
146
- ExtraFields map [string ]apijson.Field
147
- }
148
-
149
- func (r * EditorListResponse ) UnmarshalJSON (data []byte ) (err error ) {
150
- return apijson .UnmarshalRoot (data , r )
151
- }
152
-
153
- func (r editorListResponseJSON ) RawJSON () string {
154
- return r .raw
155
- }
156
-
157
- type EditorListResponseEditor struct {
158
- ID string `json:"id"`
159
- Alias string `json:"alias"`
160
- IconURL string `json:"iconUrl"`
161
- InstallationInstructions string `json:"installationInstructions"`
162
- Name string `json:"name"`
163
- ShortDescription string `json:"shortDescription"`
164
- URLTemplate string `json:"urlTemplate"`
165
- JSON editorListResponseEditorJSON `json:"-"`
166
- }
167
-
168
- // editorListResponseEditorJSON contains the JSON metadata for the struct
169
- // [EditorListResponseEditor]
170
- type editorListResponseEditorJSON struct {
171
146
ID apijson.Field
172
147
Alias apijson.Field
173
148
IconURL apijson.Field
@@ -179,39 +154,11 @@ type editorListResponseEditorJSON struct {
179
154
ExtraFields map [string ]apijson.Field
180
155
}
181
156
182
- func (r * EditorListResponseEditor ) UnmarshalJSON (data []byte ) (err error ) {
183
- return apijson .UnmarshalRoot (data , r )
184
- }
185
-
186
- func (r editorListResponseEditorJSON ) RawJSON () string {
187
- return r .raw
188
- }
189
-
190
- // pagination contains the pagination options for listing environments
191
- type EditorListResponsePagination struct {
192
- // Token for the next set of results that was returned as next_token of a
193
- // PaginationResponse
194
- Token string `json:"token"`
195
- // Page size is the maximum number of results to retrieve per page. Defaults to 25.
196
- // Maximum 100.
197
- PageSize int64 `json:"pageSize"`
198
- JSON editorListResponsePaginationJSON `json:"-"`
199
- }
200
-
201
- // editorListResponsePaginationJSON contains the JSON metadata for the struct
202
- // [EditorListResponsePagination]
203
- type editorListResponsePaginationJSON struct {
204
- Token apijson.Field
205
- PageSize apijson.Field
206
- raw string
207
- ExtraFields map [string ]apijson.Field
208
- }
209
-
210
- func (r * EditorListResponsePagination ) UnmarshalJSON (data []byte ) (err error ) {
157
+ func (r * EditorListResponse ) UnmarshalJSON (data []byte ) (err error ) {
211
158
return apijson .UnmarshalRoot (data , r )
212
159
}
213
160
214
- func (r editorListResponsePaginationJSON ) RawJSON () string {
161
+ func (r editorListResponseJSON ) RawJSON () string {
215
162
return r .raw
216
163
}
217
164
0 commit comments