Class: Repull::StudioApi

Inherits:
Object
  • Object
show all
Defined in:
lib/repull/api/studio_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ StudioApi

Returns a new instance of StudioApi.



19
20
21
# File 'lib/repull/api/studio_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/repull/api/studio_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_studio_deployment(create_studio_deployment_request, opts = {}) ⇒ CreateStudioDeployment201Response

Trigger a Studio deployment Kicks off a new deployment for a project — Repull provisions a Fly.io machine, writes the subdomain DNS record, and builds the project. The response returns immediately with ‘provisioning` status; poll `GET /api/studio/deployments/id` until `live`.

Parameters:

Returns:



27
28
29
30
# File 'lib/repull/api/studio_api.rb', line 27

def create_studio_deployment(create_studio_deployment_request, opts = {})
  data, _status_code, _headers = create_studio_deployment_with_http_info(create_studio_deployment_request, opts)
  data
end

#create_studio_deployment_with_http_info(create_studio_deployment_request, opts = {}) ⇒ Array<(CreateStudioDeployment201Response, Integer, Hash)>

Trigger a Studio deployment Kicks off a new deployment for a project — Repull provisions a Fly.io machine, writes the subdomain DNS record, and builds the project. The response returns immediately with &#x60;provisioning&#x60; status; poll &#x60;GET /api/studio/deployments/id&#x60; until &#x60;live&#x60;.

Parameters:

Returns:



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/repull/api/studio_api.rb', line 37

def create_studio_deployment_with_http_info(create_studio_deployment_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.create_studio_deployment ...'
  end
  # verify the required parameter 'create_studio_deployment_request' is set
  if @api_client.config.client_side_validation && create_studio_deployment_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_studio_deployment_request' when calling StudioApi.create_studio_deployment"
  end
  # resource path
  local_var_path = '/api/studio/deployments'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_studio_deployment_request)

  # return_type
  return_type = opts[:debug_return_type] || 'CreateStudioDeployment201Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.create_studio_deployment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#create_studio_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_studio_project(create_studio_project_request, opts = {}) ⇒ CreateStudioProject201Response

Create a Studio project Spins up a new Studio project from a name + prompt. Repull AI uses the prompt to materialize the initial template; the returned project starts in ‘draft` status.

Parameters:

Returns:



95
96
97
98
# File 'lib/repull/api/studio_api.rb', line 95

def create_studio_project(create_studio_project_request, opts = {})
  data, _status_code, _headers = create_studio_project_with_http_info(create_studio_project_request, opts)
  data
end

#create_studio_project_generation(id, create_studio_project_generation_request, opts = {}) ⇒ CreateStudioProjectGeneration201Response

Run a Studio generation Records a generation run scoped to a single project — Repull AI takes the prompt, generates the response, and stores it on the project timeline. Use this when you want generation history; for one-shot completions without persistence use ‘POST /api/studio/generate`.

Parameters:

Returns:



164
165
166
167
# File 'lib/repull/api/studio_api.rb', line 164

def create_studio_project_generation(id, create_studio_project_generation_request, opts = {})
  data, _status_code, _headers = create_studio_project_generation_with_http_info(id, create_studio_project_generation_request, opts)
  data
end

#create_studio_project_generation_with_http_info(id, create_studio_project_generation_request, opts = {}) ⇒ Array<(CreateStudioProjectGeneration201Response, Integer, Hash)>

Run a Studio generation Records a generation run scoped to a single project — Repull AI takes the prompt, generates the response, and stores it on the project timeline. Use this when you want generation history; for one-shot completions without persistence use &#x60;POST /api/studio/generate&#x60;.

Parameters:

Returns:



175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/repull/api/studio_api.rb', line 175

def create_studio_project_generation_with_http_info(id, create_studio_project_generation_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.create_studio_project_generation ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.create_studio_project_generation"
  end
  # verify the required parameter 'create_studio_project_generation_request' is set
  if @api_client.config.client_side_validation && create_studio_project_generation_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_studio_project_generation_request' when calling StudioApi.create_studio_project_generation"
  end
  # resource path
  local_var_path = '/api/studio/projects/{id}/generations'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_studio_project_generation_request)

  # return_type
  return_type = opts[:debug_return_type] || 'CreateStudioProjectGeneration201Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.create_studio_project_generation",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#create_studio_project_generation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_studio_project_with_http_info(create_studio_project_request, opts = {}) ⇒ Array<(CreateStudioProject201Response, Integer, Hash)>

Create a Studio project Spins up a new Studio project from a name + prompt. Repull AI uses the prompt to materialize the initial template; the returned project starts in &#x60;draft&#x60; status.

Parameters:

Returns:



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/repull/api/studio_api.rb', line 105

def create_studio_project_with_http_info(create_studio_project_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.create_studio_project ...'
  end
  # verify the required parameter 'create_studio_project_request' is set
  if @api_client.config.client_side_validation && create_studio_project_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_studio_project_request' when calling StudioApi.create_studio_project"
  end
  # resource path
  local_var_path = '/api/studio/projects'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_studio_project_request)

  # return_type
  return_type = opts[:debug_return_type] || 'CreateStudioProject201Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.create_studio_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#create_studio_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_studio_deployment(id, opts = {}) ⇒ DeleteStudioDeployment200Response

Delete a Studio deployment Tears down a deployment — releases the Fly.io machine, removes the DNS record, and marks the deployment as deleted. The underlying project is unaffected.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



237
238
239
240
# File 'lib/repull/api/studio_api.rb', line 237

def delete_studio_deployment(id, opts = {})
  data, _status_code, _headers = delete_studio_deployment_with_http_info(id, opts)
  data
end

#delete_studio_deployment_with_http_info(id, opts = {}) ⇒ Array<(DeleteStudioDeployment200Response, Integer, Hash)>

Delete a Studio deployment Tears down a deployment — releases the Fly.io machine, removes the DNS record, and marks the deployment as deleted. The underlying project is unaffected.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/repull/api/studio_api.rb', line 247

def delete_studio_deployment_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.delete_studio_deployment ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.delete_studio_deployment"
  end
  # resource path
  local_var_path = '/api/studio/deployments/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DeleteStudioDeployment200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.delete_studio_deployment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#delete_studio_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_studio_project(id, opts = {}) ⇒ DeleteStudioProject200Response

Delete a Studio project Soft-deletes a project. The project is archived and removed from the listing endpoint, but its files and deployments are retained for recovery.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



300
301
302
303
# File 'lib/repull/api/studio_api.rb', line 300

def delete_studio_project(id, opts = {})
  data, _status_code, _headers = delete_studio_project_with_http_info(id, opts)
  data
end

#delete_studio_project_file(id, path, opts = {}) ⇒ DeleteStudioProjectFile200Response

Delete a Studio project file Removes a single file from the project tree. The deployment is not redeployed automatically — trigger a new deployment to apply the change.

Parameters:

  • id (String)
  • path (String)

    URL-encoded project-relative path.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



364
365
366
367
# File 'lib/repull/api/studio_api.rb', line 364

def delete_studio_project_file(id, path, opts = {})
  data, _status_code, _headers = delete_studio_project_file_with_http_info(id, path, opts)
  data
end

#delete_studio_project_file_with_http_info(id, path, opts = {}) ⇒ Array<(DeleteStudioProjectFile200Response, Integer, Hash)>

Delete a Studio project file Removes a single file from the project tree. The deployment is not redeployed automatically — trigger a new deployment to apply the change.

Parameters:

  • id (String)
  • path (String)

    URL-encoded project-relative path.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
# File 'lib/repull/api/studio_api.rb', line 375

def delete_studio_project_file_with_http_info(id, path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.delete_studio_project_file ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.delete_studio_project_file"
  end
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    fail ArgumentError, "Missing the required parameter 'path' when calling StudioApi.delete_studio_project_file"
  end
  # resource path
  local_var_path = '/api/studio/projects/{id}/files/{path}'.sub('{id}', CGI.escape(id.to_s)).sub('{path}', CGI.escape(path.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DeleteStudioProjectFile200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.delete_studio_project_file",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#delete_studio_project_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_studio_project_with_http_info(id, opts = {}) ⇒ Array<(DeleteStudioProject200Response, Integer, Hash)>

Delete a Studio project Soft-deletes a project. The project is archived and removed from the listing endpoint, but its files and deployments are retained for recovery.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
# File 'lib/repull/api/studio_api.rb', line 310

def delete_studio_project_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.delete_studio_project ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.delete_studio_project"
  end
  # resource path
  local_var_path = '/api/studio/projects/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DeleteStudioProject200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.delete_studio_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#delete_studio_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#generate_studio_completion(generate_studio_completion_request, opts = {}) ⇒ GenerateStudioCompletion200Response

Generate text with Repull AI Sends a prompt to Repull AI and returns the completion synchronously. This is the single LLM endpoint used by the Studio UI; programmatic clients can use it to drive their own vibe-coding flows. Responses include token accounting, cost-in-micros, and cache/fallback flags. 429s include a ‘Retry-After` header.

Parameters:

Returns:



432
433
434
435
# File 'lib/repull/api/studio_api.rb', line 432

def generate_studio_completion(generate_studio_completion_request, opts = {})
  data, _status_code, _headers = generate_studio_completion_with_http_info(generate_studio_completion_request, opts)
  data
end

#generate_studio_completion_with_http_info(generate_studio_completion_request, opts = {}) ⇒ Array<(GenerateStudioCompletion200Response, Integer, Hash)>

Generate text with Repull AI Sends a prompt to Repull AI and returns the completion synchronously. This is the single LLM endpoint used by the Studio UI; programmatic clients can use it to drive their own vibe-coding flows. Responses include token accounting, cost-in-micros, and cache/fallback flags. 429s include a &#x60;Retry-After&#x60; header.

Parameters:

Returns:



442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
# File 'lib/repull/api/studio_api.rb', line 442

def generate_studio_completion_with_http_info(generate_studio_completion_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.generate_studio_completion ...'
  end
  # verify the required parameter 'generate_studio_completion_request' is set
  if @api_client.config.client_side_validation && generate_studio_completion_request.nil?
    fail ArgumentError, "Missing the required parameter 'generate_studio_completion_request' when calling StudioApi.generate_studio_completion"
  end
  # resource path
  local_var_path = '/api/studio/generate'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(generate_studio_completion_request)

  # return_type
  return_type = opts[:debug_return_type] || 'GenerateStudioCompletion200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.generate_studio_completion",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#generate_studio_completion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_studio_deployment(id, opts = {}) ⇒ GetStudioDeployment200Response

Get a Studio deployment Fetches a single deployment, including its current status and live URL. Poll this endpoint after ‘POST /api/studio/deployments` until `status` is `live`.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



500
501
502
503
# File 'lib/repull/api/studio_api.rb', line 500

def get_studio_deployment(id, opts = {})
  data, _status_code, _headers = get_studio_deployment_with_http_info(id, opts)
  data
end

#get_studio_deployment_with_http_info(id, opts = {}) ⇒ Array<(GetStudioDeployment200Response, Integer, Hash)>

Get a Studio deployment Fetches a single deployment, including its current status and live URL. Poll this endpoint after &#x60;POST /api/studio/deployments&#x60; until &#x60;status&#x60; is &#x60;live&#x60;.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
# File 'lib/repull/api/studio_api.rb', line 510

def get_studio_deployment_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.get_studio_deployment ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.get_studio_deployment"
  end
  # resource path
  local_var_path = '/api/studio/deployments/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetStudioDeployment200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.get_studio_deployment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#get_studio_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_studio_project(id, opts = {}) ⇒ GetStudioProject200Response

Get a Studio project Fetches a single Studio project by ID, including its current status and timestamps.

Parameters:

  • id (String)

    Project UUID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



563
564
565
566
# File 'lib/repull/api/studio_api.rb', line 563

def get_studio_project(id, opts = {})
  data, _status_code, _headers = get_studio_project_with_http_info(id, opts)
  data
end

#get_studio_project_with_http_info(id, opts = {}) ⇒ Array<(GetStudioProject200Response, Integer, Hash)>

Get a Studio project Fetches a single Studio project by ID, including its current status and timestamps.

Parameters:

  • id (String)

    Project UUID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GetStudioProject200Response, Integer, Hash)>)

    GetStudioProject200Response data, response status code and response headers



573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
# File 'lib/repull/api/studio_api.rb', line 573

def get_studio_project_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.get_studio_project ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.get_studio_project"
  end
  # resource path
  local_var_path = '/api/studio/projects/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetStudioProject200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.get_studio_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#get_studio_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_studio_deployments(opts = {}) ⇒ ListStudioDeployments200Response

List Studio deployments Returns every deployment across all projects in your account, newest first. Filter by project with ‘project_id`.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :project_id (String)

    Optional — restrict the list to a single project.

  • :status (String)
  • :limit (Integer) — default: default to 50
  • :offset (Integer) — default: default to 0

Returns:



629
630
631
632
# File 'lib/repull/api/studio_api.rb', line 629

def list_studio_deployments(opts = {})
  data, _status_code, _headers = list_studio_deployments_with_http_info(opts)
  data
end

#list_studio_deployments_with_http_info(opts = {}) ⇒ Array<(ListStudioDeployments200Response, Integer, Hash)>

List Studio deployments Returns every deployment across all projects in your account, newest first. Filter by project with &#x60;project_id&#x60;.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :project_id (String)

    Optional — restrict the list to a single project.

  • :status (String)
  • :limit (Integer) — default: default to 50
  • :offset (Integer) — default: default to 0

Returns:



642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
# File 'lib/repull/api/studio_api.rb', line 642

def list_studio_deployments_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.list_studio_deployments ...'
  end
  allowable_values = ["provisioning", "building", "live", "suspended", "failed"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/api/studio/deployments'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'project_id'] = opts[:'project_id'] if !opts[:'project_id'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListStudioDeployments200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.list_studio_deployments",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#list_studio_deployments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_studio_project_files(id, opts = {}) ⇒ ListStudioProjectFiles200Response

List Studio project files Returns every file in the project tree with its content, sha256, and size. Use the digests to detect drift before writing.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



699
700
701
702
# File 'lib/repull/api/studio_api.rb', line 699

def list_studio_project_files(id, opts = {})
  data, _status_code, _headers = list_studio_project_files_with_http_info(id, opts)
  data
end

#list_studio_project_files_with_http_info(id, opts = {}) ⇒ Array<(ListStudioProjectFiles200Response, Integer, Hash)>

List Studio project files Returns every file in the project tree with its content, sha256, and size. Use the digests to detect drift before writing.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
# File 'lib/repull/api/studio_api.rb', line 709

def list_studio_project_files_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.list_studio_project_files ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.list_studio_project_files"
  end
  # resource path
  local_var_path = '/api/studio/projects/{id}/files'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListStudioProjectFiles200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.list_studio_project_files",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#list_studio_project_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_studio_projects(opts = {}) ⇒ ListStudioProjects200Response

List Studio projects Returns every Studio project owned by the authenticated account, excluding soft-deleted ones. Use this to populate a project picker or dashboard.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



761
762
763
764
# File 'lib/repull/api/studio_api.rb', line 761

def list_studio_projects(opts = {})
  data, _status_code, _headers = list_studio_projects_with_http_info(opts)
  data
end

#list_studio_projects_with_http_info(opts = {}) ⇒ Array<(ListStudioProjects200Response, Integer, Hash)>

List Studio projects Returns every Studio project owned by the authenticated account, excluding soft-deleted ones. Use this to populate a project picker or dashboard.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
# File 'lib/repull/api/studio_api.rb', line 770

def list_studio_projects_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.list_studio_projects ...'
  end
  # resource path
  local_var_path = '/api/studio/projects'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListStudioProjects200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.list_studio_projects",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#list_studio_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#suspend_studio_deployment(id, opts = {}) ⇒ GetStudioDeployment200Response

Suspend a Studio deployment Pauses a deployment without deleting it — the Fly.io machine is stopped and the URL returns 503 until the deployment is woken. Suspended deployments do not accrue runtime charges.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



819
820
821
822
# File 'lib/repull/api/studio_api.rb', line 819

def suspend_studio_deployment(id, opts = {})
  data, _status_code, _headers = suspend_studio_deployment_with_http_info(id, opts)
  data
end

#suspend_studio_deployment_with_http_info(id, opts = {}) ⇒ Array<(GetStudioDeployment200Response, Integer, Hash)>

Suspend a Studio deployment Pauses a deployment without deleting it — the Fly.io machine is stopped and the URL returns 503 until the deployment is woken. Suspended deployments do not accrue runtime charges.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
# File 'lib/repull/api/studio_api.rb', line 829

def suspend_studio_deployment_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.suspend_studio_deployment ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.suspend_studio_deployment"
  end
  # resource path
  local_var_path = '/api/studio/deployments/{id}/suspend'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetStudioDeployment200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.suspend_studio_deployment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#suspend_studio_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_studio_project(id, update_studio_project_request, opts = {}) ⇒ GetStudioProject200Response

Update a Studio project Updates project metadata. Only the included fields are touched; omit a field to leave it unchanged.

Parameters:

  • id (String)
  • update_studio_project_request (UpdateStudioProjectRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



883
884
885
886
# File 'lib/repull/api/studio_api.rb', line 883

def update_studio_project(id, update_studio_project_request, opts = {})
  data, _status_code, _headers = update_studio_project_with_http_info(id, update_studio_project_request, opts)
  data
end

#update_studio_project_with_http_info(id, update_studio_project_request, opts = {}) ⇒ Array<(GetStudioProject200Response, Integer, Hash)>

Update a Studio project Updates project metadata. Only the included fields are touched; omit a field to leave it unchanged.

Parameters:

  • id (String)
  • update_studio_project_request (UpdateStudioProjectRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GetStudioProject200Response, Integer, Hash)>)

    GetStudioProject200Response data, response status code and response headers



894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
# File 'lib/repull/api/studio_api.rb', line 894

def update_studio_project_with_http_info(id, update_studio_project_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.update_studio_project ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.update_studio_project"
  end
  # verify the required parameter 'update_studio_project_request' is set
  if @api_client.config.client_side_validation && update_studio_project_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_studio_project_request' when calling StudioApi.update_studio_project"
  end
  # resource path
  local_var_path = '/api/studio/projects/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_studio_project_request)

  # return_type
  return_type = opts[:debug_return_type] || 'GetStudioProject200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.update_studio_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#update_studio_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upsert_studio_project_file(id, path, upsert_studio_project_file_request, opts = {}) ⇒ UpsertStudioProjectFile200Response

Upsert a Studio project file Creates or replaces a file at the given path. Returns the new sha256 so subsequent writes can use optimistic concurrency.

Parameters:

  • id (String)
  • path (String)

    URL-encoded project-relative path, e.g. &#x60;src%2Fapp%2Fpage.tsx&#x60;.

  • upsert_studio_project_file_request (UpsertStudioProjectFileRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



958
959
960
961
# File 'lib/repull/api/studio_api.rb', line 958

def upsert_studio_project_file(id, path, upsert_studio_project_file_request, opts = {})
  data, _status_code, _headers = upsert_studio_project_file_with_http_info(id, path, upsert_studio_project_file_request, opts)
  data
end

#upsert_studio_project_file_with_http_info(id, path, upsert_studio_project_file_request, opts = {}) ⇒ Array<(UpsertStudioProjectFile200Response, Integer, Hash)>

Upsert a Studio project file Creates or replaces a file at the given path. Returns the new sha256 so subsequent writes can use optimistic concurrency.

Parameters:

  • id (String)
  • path (String)

    URL-encoded project-relative path, e.g. &#x60;src%2Fapp%2Fpage.tsx&#x60;.

  • upsert_studio_project_file_request (UpsertStudioProjectFileRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
# File 'lib/repull/api/studio_api.rb', line 970

def upsert_studio_project_file_with_http_info(id, path, upsert_studio_project_file_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.upsert_studio_project_file ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.upsert_studio_project_file"
  end
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    fail ArgumentError, "Missing the required parameter 'path' when calling StudioApi.upsert_studio_project_file"
  end
  # verify the required parameter 'upsert_studio_project_file_request' is set
  if @api_client.config.client_side_validation && upsert_studio_project_file_request.nil?
    fail ArgumentError, "Missing the required parameter 'upsert_studio_project_file_request' when calling StudioApi.upsert_studio_project_file"
  end
  # resource path
  local_var_path = '/api/studio/projects/{id}/files/{path}'.sub('{id}', CGI.escape(id.to_s)).sub('{path}', CGI.escape(path.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(upsert_studio_project_file_request)

  # return_type
  return_type = opts[:debug_return_type] || 'UpsertStudioProjectFile200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.upsert_studio_project_file",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#upsert_studio_project_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wake_studio_deployment(id, opts = {}) ⇒ GetStudioDeployment200Response

Wake a suspended Studio deployment Resumes a previously suspended deployment — Repull restarts the Fly.io machine and the URL becomes reachable again once ‘status` returns to `live`.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1036
1037
1038
1039
# File 'lib/repull/api/studio_api.rb', line 1036

def wake_studio_deployment(id, opts = {})
  data, _status_code, _headers = wake_studio_deployment_with_http_info(id, opts)
  data
end

#wake_studio_deployment_with_http_info(id, opts = {}) ⇒ Array<(GetStudioDeployment200Response, Integer, Hash)>

Wake a suspended Studio deployment Resumes a previously suspended deployment — Repull restarts the Fly.io machine and the URL becomes reachable again once &#x60;status&#x60; returns to &#x60;live&#x60;.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
# File 'lib/repull/api/studio_api.rb', line 1046

def wake_studio_deployment_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StudioApi.wake_studio_deployment ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling StudioApi.wake_studio_deployment"
  end
  # resource path
  local_var_path = '/api/studio/deployments/{id}/wake'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetStudioDeployment200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"StudioApi.wake_studio_deployment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StudioApi#wake_studio_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end