vgen-apimatic-sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +152 -0
- data/bin/console +15 -0
- data/lib/videogen/api_helper.rb +10 -0
- data/lib/videogen/apis/account_api.rb +31 -0
- data/lib/videogen/apis/assistant_api.rb +191 -0
- data/lib/videogen/apis/base_api.rb +67 -0
- data/lib/videogen/apis/entities_api.rb +230 -0
- data/lib/videogen/apis/files_api.rb +263 -0
- data/lib/videogen/apis/projects_api.rb +355 -0
- data/lib/videogen/apis/resources_api.rb +81 -0
- data/lib/videogen/apis/text_api.rb +39 -0
- data/lib/videogen/apis/tools_api.rb +494 -0
- data/lib/videogen/apis/webhooks_api.rb +94 -0
- data/lib/videogen/apis/workflows_api.rb +217 -0
- data/lib/videogen/client.rb +127 -0
- data/lib/videogen/configuration.rb +166 -0
- data/lib/videogen/exceptions/api_exception.rb +21 -0
- data/lib/videogen/http/api_response.rb +19 -0
- data/lib/videogen/http/auth/oauth_2.rb +53 -0
- data/lib/videogen/http/http_call_back.rb +10 -0
- data/lib/videogen/http/http_method_enum.rb +10 -0
- data/lib/videogen/http/http_request.rb +10 -0
- data/lib/videogen/http/http_response.rb +10 -0
- data/lib/videogen/http/proxy_settings.rb +22 -0
- data/lib/videogen/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/videogen/logging/sdk_logger.rb +17 -0
- data/lib/videogen/models/act_on_assistant_action_request.rb +77 -0
- data/lib/videogen/models/act_on_assistant_action_request_decision.rb +36 -0
- data/lib/videogen/models/act_on_assistant_action_response.rb +77 -0
- data/lib/videogen/models/add_entity_reference_request.rb +95 -0
- data/lib/videogen/models/api_error.rb +137 -0
- data/lib/videogen/models/aspect_ratio.rb +105 -0
- data/lib/videogen/models/aspect_ratio1.rb +82 -0
- data/lib/videogen/models/aspect_ratio2.rb +82 -0
- data/lib/videogen/models/aspect_ratio4.rb +83 -0
- data/lib/videogen/models/assistant_action.rb +148 -0
- data/lib/videogen/models/assistant_action_detail.rb +108 -0
- data/lib/videogen/models/assistant_action_detail1.rb +117 -0
- data/lib/videogen/models/assistant_action_kind.rb +52 -0
- data/lib/videogen/models/assistant_message.rb +167 -0
- data/lib/videogen/models/assistant_message1.rb +259 -0
- data/lib/videogen/models/assistant_message_attachment.rb +101 -0
- data/lib/videogen/models/assistant_message_status.rb +49 -0
- data/lib/videogen/models/assistant_workflow_suggestion.rb +133 -0
- data/lib/videogen/models/base_model.rb +110 -0
- data/lib/videogen/models/content_policy_config.rb +80 -0
- data/lib/videogen/models/create_entity_request.rb +96 -0
- data/lib/videogen/models/create_entity_request_entity_type.rb +47 -0
- data/lib/videogen/models/create_file_upload_request.rb +125 -0
- data/lib/videogen/models/create_timeline_interchange_request.rb +93 -0
- data/lib/videogen/models/create_timeline_interchange_response.rb +76 -0
- data/lib/videogen/models/create_webhook_endpoint_request.rb +94 -0
- data/lib/videogen/models/end_screen_mode.rb +43 -0
- data/lib/videogen/models/entity.rb +166 -0
- data/lib/videogen/models/entity_actor_config.rb +101 -0
- data/lib/videogen/models/entity_archive_response.rb +82 -0
- data/lib/videogen/models/entity_entity_type.rb +47 -0
- data/lib/videogen/models/entity_reference.rb +93 -0
- data/lib/videogen/models/error_requirement.rb +101 -0
- data/lib/videogen/models/executed_tool.rb +148 -0
- data/lib/videogen/models/export_delivery_destination.rb +110 -0
- data/lib/videogen/models/export_delivery_destination_type.rb +36 -0
- data/lib/videogen/models/export_project_quality.rb +44 -0
- data/lib/videogen/models/export_project_request.rb +124 -0
- data/lib/videogen/models/export_project_response.rb +76 -0
- data/lib/videogen/models/file_analysis_metadata.rb +112 -0
- data/lib/videogen/models/file_analysis_metadata1.rb +112 -0
- data/lib/videogen/models/file_analysis_metadata_analysis_loading_state.rb +48 -0
- data/lib/videogen/models/file_info.rb +386 -0
- data/lib/videogen/models/file_info1.rb +387 -0
- data/lib/videogen/models/file_info_scope.rb +54 -0
- data/lib/videogen/models/file_source.rb +134 -0
- data/lib/videogen/models/file_source_status.rb +46 -0
- data/lib/videogen/models/file_type.rb +57 -0
- data/lib/videogen/models/file_type1.rb +56 -0
- data/lib/videogen/models/file_type2.rb +57 -0
- data/lib/videogen/models/file_upload_response.rb +82 -0
- data/lib/videogen/models/generate_avatar_request.rb +149 -0
- data/lib/videogen/models/generate_image_request.rb +187 -0
- data/lib/videogen/models/generate_motion_graphic_request.rb +193 -0
- data/lib/videogen/models/generate_music_request.rb +111 -0
- data/lib/videogen/models/generate_sound_effect_request.rb +139 -0
- data/lib/videogen/models/generate_text_request.rb +120 -0
- data/lib/videogen/models/generate_text_response.rb +72 -0
- data/lib/videogen/models/generate_video_clip_request.rb +297 -0
- data/lib/videogen/models/get_assistant_response.rb +135 -0
- data/lib/videogen/models/get_files_response.rb +102 -0
- data/lib/videogen/models/image_asset_request.rb +125 -0
- data/lib/videogen/models/job_status.rb +51 -0
- data/lib/videogen/models/language.rb +83 -0
- data/lib/videogen/models/language_list_response.rb +83 -0
- data/lib/videogen/models/list_entities_response.rb +103 -0
- data/lib/videogen/models/list_project_exports_response.rb +104 -0
- data/lib/videogen/models/list_projects_response.rb +105 -0
- data/lib/videogen/models/list_remix_actions_response.rb +103 -0
- data/lib/videogen/models/me_response.rb +114 -0
- data/lib/videogen/models/model_quality.rb +51 -0
- data/lib/videogen/models/model_quality1.rb +47 -0
- data/lib/videogen/models/model_quality10.rb +46 -0
- data/lib/videogen/models/model_quality11.rb +46 -0
- data/lib/videogen/models/model_quality12.rb +45 -0
- data/lib/videogen/models/model_quality13.rb +46 -0
- data/lib/videogen/models/model_quality2.rb +46 -0
- data/lib/videogen/models/model_quality3.rb +46 -0
- data/lib/videogen/models/model_quality4.rb +48 -0
- data/lib/videogen/models/model_quality9.rb +47 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode.rb +44 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode1.rb +40 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode2.rb +41 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode3.rb +40 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode4.rb +40 -0
- data/lib/videogen/models/motion_graphic_sub_tool_modes.rb +114 -0
- data/lib/videogen/models/motion_graphic_sub_tool_modes1.rb +116 -0
- data/lib/videogen/models/project_export.rb +207 -0
- data/lib/videogen/models/project_response.rb +151 -0
- data/lib/videogen/models/project_response_status.rb +36 -0
- data/lib/videogen/models/prompt_to_video_clip_request.rb +155 -0
- data/lib/videogen/models/pronunciation_replacement.rb +82 -0
- data/lib/videogen/models/remix_action.rb +111 -0
- data/lib/videogen/models/remix_action1.rb +123 -0
- data/lib/videogen/models/remix_action10.rb +115 -0
- data/lib/videogen/models/remix_action11.rb +148 -0
- data/lib/videogen/models/remix_action12.rb +89 -0
- data/lib/videogen/models/remix_action13.rb +105 -0
- data/lib/videogen/models/remix_action14.rb +138 -0
- data/lib/videogen/models/remix_action2.rb +101 -0
- data/lib/videogen/models/remix_action3.rb +85 -0
- data/lib/videogen/models/remix_action4.rb +120 -0
- data/lib/videogen/models/remix_action5.rb +88 -0
- data/lib/videogen/models/remix_action6.rb +106 -0
- data/lib/videogen/models/remix_action7.rb +137 -0
- data/lib/videogen/models/remix_action8.rb +131 -0
- data/lib/videogen/models/remix_action9.rb +120 -0
- data/lib/videogen/models/remix_action_discriminator_mapping_set_logo_position.rb +53 -0
- data/lib/videogen/models/remix_action_run.rb +150 -0
- data/lib/videogen/models/remix_action_type.rb +88 -0
- data/lib/videogen/models/remix_project_request.rb +105 -0
- data/lib/videogen/models/remix_project_response.rb +101 -0
- data/lib/videogen/models/remix_transition_style.rb +58 -0
- data/lib/videogen/models/remove_entity_reference_request.rb +73 -0
- data/lib/videogen/models/scene_description_range.rb +121 -0
- data/lib/videogen/models/script_to_video_request.rb +309 -0
- data/lib/videogen/models/search_files_request.rb +96 -0
- data/lib/videogen/models/search_files_response.rb +82 -0
- data/lib/videogen/models/search_files_result.rb +85 -0
- data/lib/videogen/models/send_assistant_message_request.rb +73 -0
- data/lib/videogen/models/send_assistant_message_response.rb +76 -0
- data/lib/videogen/models/slideshow_to_video_request.rb +276 -0
- data/lib/videogen/models/start_assistant_chat_request.rb +88 -0
- data/lib/videogen/models/start_assistant_chat_response.rb +105 -0
- data/lib/videogen/models/start_tool_execution_response.rb +76 -0
- data/lib/videogen/models/start_workflow_run_response.rb +141 -0
- data/lib/videogen/models/text_to_speech_request.rb +191 -0
- data/lib/videogen/models/timeline_interchange.rb +210 -0
- data/lib/videogen/models/timeline_interchange_format.rb +47 -0
- data/lib/videogen/models/timeline_interchange_media_delivery.rb +39 -0
- data/lib/videogen/models/tool_execution_list_response.rb +104 -0
- data/lib/videogen/models/tool_success_result.rb +152 -0
- data/lib/videogen/models/transcript.rb +97 -0
- data/lib/videogen/models/transcript_word.rb +93 -0
- data/lib/videogen/models/tts_voice.rb +162 -0
- data/lib/videogen/models/tts_voice_display_gender.rb +40 -0
- data/lib/videogen/models/tts_voice_list_response.rb +103 -0
- data/lib/videogen/models/update_entity_request.rb +88 -0
- data/lib/videogen/models/v1_entities_get_parameters_entity_type.rb +44 -0
- data/lib/videogen/models/video_asset_request.rb +125 -0
- data/lib/videogen/models/visual_pacing.rb +41 -0
- data/lib/videogen/models/voiceover_to_video_request.rb +297 -0
- data/lib/videogen/models/watermark_mode.rb +43 -0
- data/lib/videogen/models/webhook_endpoint.rb +137 -0
- data/lib/videogen/models/webhook_endpoint_list_response.rb +103 -0
- data/lib/videogen/models/webhook_event_name.rb +100 -0
- data/lib/videogen/models/workflow_caption_background_style.rb +133 -0
- data/lib/videogen/models/workflow_caption_background_style_type.rb +41 -0
- data/lib/videogen/models/workflow_caption_style.rb +220 -0
- data/lib/videogen/models/workflow_caption_style_font_weight.rb +64 -0
- data/lib/videogen/models/workflow_caption_style_text_justification.rb +40 -0
- data/lib/videogen/models/workflow_caption_style_vertical_alignment.rb +40 -0
- data/lib/videogen/models/workflow_rgb_color.rb +116 -0
- data/lib/videogen/models/workflow_run.rb +150 -0
- data/lib/videogen/models/workflow_run_list_response.rb +103 -0
- data/lib/videogen/models/workflow_type.rb +52 -0
- data/lib/videogen/models/workflow_type1.rb +52 -0
- data/lib/videogen/models/workflow_visual_style.rb +136 -0
- data/lib/videogen/models/workflow_visual_style_type.rb +38 -0
- data/lib/videogen/utilities/date_time_helper.rb +11 -0
- data/lib/videogen/utilities/file_wrapper.rb +28 -0
- data/lib/videogen/utilities/union_type_lookup.rb +188 -0
- data/lib/videogen.rb +213 -0
- metadata +275 -0
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# ToolsApi
|
|
8
|
+
class ToolsApi < BaseApi
|
|
9
|
+
# Generate an image from a text prompt, optionally guided by reference
|
|
10
|
+
# images and actor, product, or visual-style entity ids. When reference
|
|
11
|
+
# images are provided, the prompt describes the desired transformation.
|
|
12
|
+
# VideoGen automatically routes each request to the most effective
|
|
13
|
+
# state-of-the-art image model for your prompt, reference images, entities,
|
|
14
|
+
# and quality tier, so you don't pick a model.
|
|
15
|
+
# @param [String] authorization Required parameter: API key from
|
|
16
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
17
|
+
# shown once when you create it.
|
|
18
|
+
# @param [GenerateImageRequest] body Optional parameter: TODO: type
|
|
19
|
+
# description here
|
|
20
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
21
|
+
def generate_image(authorization,
|
|
22
|
+
body: nil)
|
|
23
|
+
@api_call
|
|
24
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
25
|
+
'/v1/tools/generate-image',
|
|
26
|
+
Server::DEFAULT)
|
|
27
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
28
|
+
.is_required(true))
|
|
29
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
30
|
+
.body_param(new_parameter(body))
|
|
31
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
32
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
33
|
+
.response(new_response_handler
|
|
34
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
35
|
+
.deserialize_into(StartToolExecutionResponse.method(:from_hash))
|
|
36
|
+
.is_api_response(true))
|
|
37
|
+
.execute
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Generate a single short video clip (up to 30 seconds) from a text prompt,
|
|
41
|
+
# optionally guided by an opening-frame still, reference images, videos, and
|
|
42
|
+
# audio. At least one of `prompt`, `startFrameFileId`, `imageFileIds`,
|
|
43
|
+
# `videoFileIds`, `audioFileIds`, or `spokenDialogue` must be provided.
|
|
44
|
+
# VideoGen automatically routes each request to the most effective
|
|
45
|
+
# state-of-the-art video model for your inputs and settings, so you don't
|
|
46
|
+
# pick a model. This endpoint returns one standalone clip. For longer,
|
|
47
|
+
# higher-quality, professionally edited videos with narration, captions,
|
|
48
|
+
# music, and multiple scenes, use a video workflow such as [Script to
|
|
49
|
+
# video](/workflows) (`POST /v1/workflows/script-to-video`) instead.
|
|
50
|
+
# @param [String] authorization Required parameter: API key from
|
|
51
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
52
|
+
# shown once when you create it.
|
|
53
|
+
# @param [GenerateVideoClipRequest] body Optional parameter: TODO: type
|
|
54
|
+
# description here
|
|
55
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
56
|
+
def generate_video_clip(authorization,
|
|
57
|
+
body: nil)
|
|
58
|
+
@api_call
|
|
59
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
60
|
+
'/v1/tools/generate-video-clip',
|
|
61
|
+
Server::DEFAULT)
|
|
62
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
63
|
+
.is_required(true))
|
|
64
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
65
|
+
.body_param(new_parameter(body))
|
|
66
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
67
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
68
|
+
.response(new_response_handler
|
|
69
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
70
|
+
.deserialize_into(StartToolExecutionResponse.method(:from_hash))
|
|
71
|
+
.is_api_response(true))
|
|
72
|
+
.execute
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Generate an animated motion graphic video from a text prompt. This is an
|
|
76
|
+
# experimental, fully agentic alternative to a video workflow: VideoGen
|
|
77
|
+
# plans the animation, optionally generates or fetches supporting media, and
|
|
78
|
+
# renders a self-contained animated clip. It is especially well suited to
|
|
79
|
+
# precise text animations (e.g. a typing effect, animated captions, kinetic
|
|
80
|
+
# typography, lower thirds) that are hard to express with stock or generated
|
|
81
|
+
# footage. Optionally pass uploaded `fileIds` for reference media and
|
|
82
|
+
# `entityIds` for actors, products, or visual styles the animation should
|
|
83
|
+
# use. This endpoint returns one standalone video. For longer, narrated,
|
|
84
|
+
# multi-scene videos, use a video workflow such as [Script to
|
|
85
|
+
# video](/workflows) (`POST /v1/workflows/script-to-video`) instead.
|
|
86
|
+
# @param [String] authorization Required parameter: API key from
|
|
87
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
88
|
+
# shown once when you create it.
|
|
89
|
+
# @param [GenerateMotionGraphicRequest] body Optional parameter: TODO: type
|
|
90
|
+
# description here
|
|
91
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
92
|
+
def generate_motion_graphic(authorization,
|
|
93
|
+
body: nil)
|
|
94
|
+
@api_call
|
|
95
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
96
|
+
'/v1/tools/generate-motion-graphic',
|
|
97
|
+
Server::DEFAULT)
|
|
98
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
99
|
+
.is_required(true))
|
|
100
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
101
|
+
.body_param(new_parameter(body))
|
|
102
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
103
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
104
|
+
.response(new_response_handler
|
|
105
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
106
|
+
.deserialize_into(StartToolExecutionResponse.method(:from_hash))
|
|
107
|
+
.is_api_response(true))
|
|
108
|
+
.execute
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Convert text into a spoken audio file. Only voices with
|
|
112
|
+
# `supportsDirectToolExecution` set to true can be used. Optionally choose a
|
|
113
|
+
# voice, language, speed, and pronunciation overrides.
|
|
114
|
+
# @param [String] authorization Required parameter: API key from
|
|
115
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
116
|
+
# shown once when you create it.
|
|
117
|
+
# @param [TextToSpeechRequest] body Optional parameter: TODO: type
|
|
118
|
+
# description here
|
|
119
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
120
|
+
def text_to_speech(authorization,
|
|
121
|
+
body: nil)
|
|
122
|
+
@api_call
|
|
123
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
124
|
+
'/v1/tools/text-to-speech',
|
|
125
|
+
Server::DEFAULT)
|
|
126
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
127
|
+
.is_required(true))
|
|
128
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
129
|
+
.body_param(new_parameter(body))
|
|
130
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
131
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
132
|
+
.response(new_response_handler
|
|
133
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
134
|
+
.deserialize_into(StartToolExecutionResponse.method(:from_hash))
|
|
135
|
+
.is_api_response(true))
|
|
136
|
+
.execute
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Generate a sound effect from a text description. Optionally control the
|
|
140
|
+
# duration and prompt influence. VideoGen automatically routes each request
|
|
141
|
+
# to the most effective state-of-the-art sound effect model for your prompt
|
|
142
|
+
# and settings, so you don't pick a model.
|
|
143
|
+
# @param [String] authorization Required parameter: API key from
|
|
144
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
145
|
+
# shown once when you create it.
|
|
146
|
+
# @param [GenerateSoundEffectRequest] body Optional parameter: TODO: type
|
|
147
|
+
# description here
|
|
148
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
149
|
+
def generate_sound_effect(authorization,
|
|
150
|
+
body: nil)
|
|
151
|
+
@api_call
|
|
152
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
153
|
+
'/v1/tools/generate-sound-effect',
|
|
154
|
+
Server::DEFAULT)
|
|
155
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
156
|
+
.is_required(true))
|
|
157
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
158
|
+
.body_param(new_parameter(body))
|
|
159
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
160
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
161
|
+
.response(new_response_handler
|
|
162
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
163
|
+
.deserialize_into(StartToolExecutionResponse.method(:from_hash))
|
|
164
|
+
.is_api_response(true))
|
|
165
|
+
.execute
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Generate an instrumental music track from a text description. The returned
|
|
169
|
+
# track is approximately 30 seconds long. VideoGen automatically routes each
|
|
170
|
+
# request to the most effective state-of-the-art music model for your
|
|
171
|
+
# prompt, so you don't pick a model.
|
|
172
|
+
# @param [String] authorization Required parameter: API key from
|
|
173
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
174
|
+
# shown once when you create it.
|
|
175
|
+
# @param [GenerateMusicRequest] body Optional parameter: TODO: type
|
|
176
|
+
# description here
|
|
177
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
178
|
+
def generate_music(authorization,
|
|
179
|
+
body: nil)
|
|
180
|
+
@api_call
|
|
181
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
182
|
+
'/v1/tools/generate-music',
|
|
183
|
+
Server::DEFAULT)
|
|
184
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
185
|
+
.is_required(true))
|
|
186
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
187
|
+
.body_param(new_parameter(body))
|
|
188
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
189
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
190
|
+
.response(new_response_handler
|
|
191
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
192
|
+
.deserialize_into(StartToolExecutionResponse.method(:from_hash))
|
|
193
|
+
.is_api_response(true))
|
|
194
|
+
.execute
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Generate a talking-head avatar video by pairing an ACTOR entity with an
|
|
198
|
+
# audio file, typically from a prior text-to-speech result.
|
|
199
|
+
# @param [String] authorization Required parameter: API key from
|
|
200
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
201
|
+
# shown once when you create it.
|
|
202
|
+
# @param [GenerateAvatarRequest] body Optional parameter: TODO: type
|
|
203
|
+
# description here
|
|
204
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
205
|
+
def generate_avatar(authorization,
|
|
206
|
+
body: nil)
|
|
207
|
+
@api_call
|
|
208
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
209
|
+
'/v1/tools/generate-avatar',
|
|
210
|
+
Server::DEFAULT)
|
|
211
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
212
|
+
.is_required(true))
|
|
213
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
214
|
+
.body_param(new_parameter(body))
|
|
215
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
216
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
217
|
+
.response(new_response_handler
|
|
218
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
219
|
+
.deserialize_into(StartToolExecutionResponse.method(:from_hash))
|
|
220
|
+
.is_api_response(true))
|
|
221
|
+
.execute
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Convert any raster image into a scalable vector graphic (SVG). The output
|
|
225
|
+
# traces the shapes and colors of the input image.
|
|
226
|
+
# @param [String] authorization Required parameter: API key from
|
|
227
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
228
|
+
# shown once when you create it.
|
|
229
|
+
# @param [ImageAssetRequest] body Optional parameter: TODO: type description
|
|
230
|
+
# here
|
|
231
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
232
|
+
def vectorize_image(authorization,
|
|
233
|
+
body: nil)
|
|
234
|
+
@api_call
|
|
235
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
236
|
+
'/v1/tools/vectorize-image',
|
|
237
|
+
Server::DEFAULT)
|
|
238
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
239
|
+
.is_required(true))
|
|
240
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
241
|
+
.body_param(new_parameter(body))
|
|
242
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
243
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
244
|
+
.response(new_response_handler
|
|
245
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
246
|
+
.deserialize_into(StartToolExecutionResponse.method(:from_hash))
|
|
247
|
+
.is_api_response(true))
|
|
248
|
+
.execute
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Remove the background from an image, returning a transparent-background
|
|
252
|
+
# PNG of the foreground subject.
|
|
253
|
+
# @param [String] authorization Required parameter: API key from
|
|
254
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
255
|
+
# shown once when you create it.
|
|
256
|
+
# @param [ImageAssetRequest] body Optional parameter: TODO: type description
|
|
257
|
+
# here
|
|
258
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
259
|
+
def remove_image_background(authorization,
|
|
260
|
+
body: nil)
|
|
261
|
+
@api_call
|
|
262
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
263
|
+
'/v1/tools/remove-image-background',
|
|
264
|
+
Server::DEFAULT)
|
|
265
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
266
|
+
.is_required(true))
|
|
267
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
268
|
+
.body_param(new_parameter(body))
|
|
269
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
270
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
271
|
+
.response(new_response_handler
|
|
272
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
273
|
+
.deserialize_into(StartToolExecutionResponse.method(:from_hash))
|
|
274
|
+
.is_api_response(true))
|
|
275
|
+
.execute
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Remove the background from a video, producing a transparent-background
|
|
279
|
+
# video of the foreground subject.
|
|
280
|
+
# @param [String] authorization Required parameter: API key from
|
|
281
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
282
|
+
# shown once when you create it.
|
|
283
|
+
# @param [VideoAssetRequest] body Optional parameter: TODO: type description
|
|
284
|
+
# here
|
|
285
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
286
|
+
def remove_video_background(authorization,
|
|
287
|
+
body: nil)
|
|
288
|
+
@api_call
|
|
289
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
290
|
+
'/v1/tools/remove-video-background',
|
|
291
|
+
Server::DEFAULT)
|
|
292
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
293
|
+
.is_required(true))
|
|
294
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
295
|
+
.body_param(new_parameter(body))
|
|
296
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
297
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
298
|
+
.response(new_response_handler
|
|
299
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
300
|
+
.deserialize_into(StartToolExecutionResponse.method(:from_hash))
|
|
301
|
+
.is_api_response(true))
|
|
302
|
+
.execute
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
# Increase the resolution of an image while preserving detail and sharpness.
|
|
306
|
+
# @param [String] authorization Required parameter: API key from
|
|
307
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
308
|
+
# shown once when you create it.
|
|
309
|
+
# @param [ImageAssetRequest] body Optional parameter: TODO: type description
|
|
310
|
+
# here
|
|
311
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
312
|
+
def upscale_image(authorization,
|
|
313
|
+
body: nil)
|
|
314
|
+
@api_call
|
|
315
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
316
|
+
'/v1/tools/upscale-image',
|
|
317
|
+
Server::DEFAULT)
|
|
318
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
319
|
+
.is_required(true))
|
|
320
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
321
|
+
.body_param(new_parameter(body))
|
|
322
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
323
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
324
|
+
.response(new_response_handler
|
|
325
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
326
|
+
.deserialize_into(StartToolExecutionResponse.method(:from_hash))
|
|
327
|
+
.is_api_response(true))
|
|
328
|
+
.execute
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
# Increase the resolution of a video while preserving detail and sharpness.
|
|
332
|
+
# @param [String] authorization Required parameter: API key from
|
|
333
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
334
|
+
# shown once when you create it.
|
|
335
|
+
# @param [VideoAssetRequest] body Optional parameter: TODO: type description
|
|
336
|
+
# here
|
|
337
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
338
|
+
def upscale_video(authorization,
|
|
339
|
+
body: nil)
|
|
340
|
+
@api_call
|
|
341
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
342
|
+
'/v1/tools/upscale-video',
|
|
343
|
+
Server::DEFAULT)
|
|
344
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
345
|
+
.is_required(true))
|
|
346
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
347
|
+
.body_param(new_parameter(body))
|
|
348
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
349
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
350
|
+
.response(new_response_handler
|
|
351
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
352
|
+
.deserialize_into(StartToolExecutionResponse.method(:from_hash))
|
|
353
|
+
.is_api_response(true))
|
|
354
|
+
.execute
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
# Turn a still image into a short video clip with a 3D parallax motion
|
|
358
|
+
# effect, simulating camera movement through the scene.
|
|
359
|
+
# @param [String] authorization Required parameter: API key from
|
|
360
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
361
|
+
# shown once when you create it.
|
|
362
|
+
# @param [ImageAssetRequest] body Optional parameter: TODO: type description
|
|
363
|
+
# here
|
|
364
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
365
|
+
def image3d_effect(authorization,
|
|
366
|
+
body: nil)
|
|
367
|
+
@api_call
|
|
368
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
369
|
+
'/v1/tools/image-3d-effect',
|
|
370
|
+
Server::DEFAULT)
|
|
371
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
372
|
+
.is_required(true))
|
|
373
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
374
|
+
.body_param(new_parameter(body))
|
|
375
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
376
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
377
|
+
.response(new_response_handler
|
|
378
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
379
|
+
.deserialize_into(StartToolExecutionResponse.method(:from_hash))
|
|
380
|
+
.is_api_response(true))
|
|
381
|
+
.execute
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
# Request cancellation of a running tool execution. The execution
|
|
385
|
+
# transitions to `cancelled` if it has not already completed.
|
|
386
|
+
# @param [String] tool_execution_id Required parameter: The tool execution
|
|
387
|
+
# id returned when the tool was started.
|
|
388
|
+
# @param [String] authorization Required parameter: API key from
|
|
389
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
390
|
+
# shown once when you create it.
|
|
391
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
392
|
+
def cancel_tool_execution(tool_execution_id,
|
|
393
|
+
authorization)
|
|
394
|
+
@api_call
|
|
395
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
396
|
+
'/v1/tools/executions/{toolExecutionId}/cancel',
|
|
397
|
+
Server::DEFAULT)
|
|
398
|
+
.template_param(new_parameter(tool_execution_id, key: 'toolExecutionId')
|
|
399
|
+
.is_required(true)
|
|
400
|
+
.should_encode(true))
|
|
401
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
402
|
+
.is_required(true))
|
|
403
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
404
|
+
.response(new_response_handler
|
|
405
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
406
|
+
.deserialize_into(StartToolExecutionResponse.method(:from_hash))
|
|
407
|
+
.is_api_response(true))
|
|
408
|
+
.execute
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
# List tool executions started via the API, most recently created first. Use
|
|
412
|
+
# `selfOnly=true` to restrict results to the calling API key's user;
|
|
413
|
+
# otherwise all executions for the team are returned. Cursor-paginated; see
|
|
414
|
+
# the [Pagination](/pagination) guide. Executions remain listable
|
|
415
|
+
# indefinitely (including those older than 7 days). For efficiency this list
|
|
416
|
+
# does not re-sign result download URLs, so `downloadUrl`/`thumbnailUrl`
|
|
417
|
+
# reflect the last time they were signed and may be expired (always check
|
|
418
|
+
# `downloadUrlExpiresAt`). To obtain a fresh signed URL, GET the individual
|
|
419
|
+
# execution (`GET /v1/tools/executions/{toolExecutionId}`) or hydrate the
|
|
420
|
+
# file (`GET /v1/files/{fileId}` / `POST /v1/files/{fileId}/hydrate`).
|
|
421
|
+
# @param [String] authorization Required parameter: API key from
|
|
422
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
423
|
+
# shown once when you create it.
|
|
424
|
+
# @param [Integer] limit Optional parameter: Maximum number of items to
|
|
425
|
+
# return in the page. Defaults to 50; capped at 200. See
|
|
426
|
+
# [Pagination](/pagination).
|
|
427
|
+
# @param [String] cursor Optional parameter: Opaque pagination cursor
|
|
428
|
+
# returned as `nextCursor` by the previous page. Omit on the first request.
|
|
429
|
+
# Cursors are tied to the endpoint that produced them and must be passed
|
|
430
|
+
# unmodified. See [Pagination](/pagination).
|
|
431
|
+
# @param [TrueClass | FalseClass] self_only Optional parameter: When true,
|
|
432
|
+
# returns only items created by the API key's owner. When false (default),
|
|
433
|
+
# returns all items accessible to the team.
|
|
434
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
435
|
+
def list_tool_executions(authorization,
|
|
436
|
+
limit: 50,
|
|
437
|
+
cursor: nil,
|
|
438
|
+
self_only: false)
|
|
439
|
+
@api_call
|
|
440
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
441
|
+
'/v1/tools/executions',
|
|
442
|
+
Server::DEFAULT)
|
|
443
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
444
|
+
.is_required(true))
|
|
445
|
+
.query_param(new_parameter(limit, key: 'limit'))
|
|
446
|
+
.query_param(new_parameter(cursor, key: 'cursor'))
|
|
447
|
+
.query_param(new_parameter(self_only, key: 'selfOnly'))
|
|
448
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
449
|
+
.response(new_response_handler
|
|
450
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
451
|
+
.deserialize_into(ToolExecutionListResponse.method(:from_hash))
|
|
452
|
+
.is_api_response(true))
|
|
453
|
+
.execute
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
# Retrieve the current status and result of a tool execution. Poll this
|
|
457
|
+
# endpoint until `status` is `succeeded`, `failed`, or `cancelled`. Each
|
|
458
|
+
# succeeded result carries signed `downloadUrl`/`thumbnailUrl` (with
|
|
459
|
+
# matching `*ExpiresAt` timestamps) alongside the full hydrated `file`. The
|
|
460
|
+
# signed URLs are private and valid for 7 days; this single-execution
|
|
461
|
+
# endpoint automatically re-signs them when they are within an hour of
|
|
462
|
+
# expiring, so a caller always receives a URL valid long enough to use.
|
|
463
|
+
# Results remain retrievable indefinitely, including executions older than 7
|
|
464
|
+
# days. Note that list endpoints (e.g. `GET /v1/tools/executions`) do not
|
|
465
|
+
# re-sign URLs: they return the last-signed URL, which may already be
|
|
466
|
+
# expired (check `downloadUrlExpiresAt`). To refresh a URL, GET the
|
|
467
|
+
# individual execution here, or hydrate the file directly via `GET
|
|
468
|
+
# /v1/files/{fileId}` / `POST /v1/files/{fileId}/hydrate`.
|
|
469
|
+
# @param [String] tool_execution_id Required parameter: The tool execution
|
|
470
|
+
# id returned when the tool was started.
|
|
471
|
+
# @param [String] authorization Required parameter: API key from
|
|
472
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
473
|
+
# shown once when you create it.
|
|
474
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
475
|
+
def get_tool_execution_info(tool_execution_id,
|
|
476
|
+
authorization)
|
|
477
|
+
@api_call
|
|
478
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
479
|
+
'/v1/tools/executions/{toolExecutionId}',
|
|
480
|
+
Server::DEFAULT)
|
|
481
|
+
.template_param(new_parameter(tool_execution_id, key: 'toolExecutionId')
|
|
482
|
+
.is_required(true)
|
|
483
|
+
.should_encode(true))
|
|
484
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
485
|
+
.is_required(true))
|
|
486
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
487
|
+
.response(new_response_handler
|
|
488
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
489
|
+
.deserialize_into(ExecutedTool.method(:from_hash))
|
|
490
|
+
.is_api_response(true))
|
|
491
|
+
.execute
|
|
492
|
+
end
|
|
493
|
+
end
|
|
494
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# WebhooksApi
|
|
8
|
+
class WebhooksApi < BaseApi
|
|
9
|
+
# List configured webhook endpoints for your account. Cursor-paginated; see
|
|
10
|
+
# the [Pagination](/pagination) guide.
|
|
11
|
+
# @param [String] authorization Required parameter: API key from
|
|
12
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
13
|
+
# shown once when you create it.
|
|
14
|
+
# @param [Integer] limit Optional parameter: Maximum number of items to
|
|
15
|
+
# return in the page. Defaults to 50; capped at 200. See
|
|
16
|
+
# [Pagination](/pagination).
|
|
17
|
+
# @param [String] cursor Optional parameter: Opaque pagination cursor
|
|
18
|
+
# returned as `nextCursor` by the previous page. Omit on the first request.
|
|
19
|
+
# Cursors are tied to the endpoint that produced them and must be passed
|
|
20
|
+
# unmodified. See [Pagination](/pagination).
|
|
21
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
22
|
+
def list_webhook_endpoints(authorization,
|
|
23
|
+
limit: 50,
|
|
24
|
+
cursor: nil)
|
|
25
|
+
@api_call
|
|
26
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
27
|
+
'/v1/webhooks/endpoints',
|
|
28
|
+
Server::DEFAULT)
|
|
29
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
30
|
+
.is_required(true))
|
|
31
|
+
.query_param(new_parameter(limit, key: 'limit'))
|
|
32
|
+
.query_param(new_parameter(cursor, key: 'cursor'))
|
|
33
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
34
|
+
.response(new_response_handler
|
|
35
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
36
|
+
.deserialize_into(WebhookEndpointListResponse.method(:from_hash))
|
|
37
|
+
.is_api_response(true))
|
|
38
|
+
.execute
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Register a new webhook endpoint to receive `tool_execution.*`,
|
|
42
|
+
# `workflow_run.*`, and `file.*` events. The signing secret is only returned
|
|
43
|
+
# in this response. Store it securely.
|
|
44
|
+
# @param [String] authorization Required parameter: API key from
|
|
45
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
46
|
+
# shown once when you create it.
|
|
47
|
+
# @param [CreateWebhookEndpointRequest] body Optional parameter: TODO: type
|
|
48
|
+
# description here
|
|
49
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
50
|
+
def create_webhook_endpoint(authorization,
|
|
51
|
+
body: nil)
|
|
52
|
+
@api_call
|
|
53
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
54
|
+
'/v1/webhooks/endpoints',
|
|
55
|
+
Server::DEFAULT)
|
|
56
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
57
|
+
.is_required(true))
|
|
58
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
59
|
+
.body_param(new_parameter(body))
|
|
60
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
61
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
62
|
+
.response(new_response_handler
|
|
63
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
64
|
+
.deserialize_into(WebhookEndpoint.method(:from_hash))
|
|
65
|
+
.is_api_response(true))
|
|
66
|
+
.execute
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Remove a webhook endpoint. It will stop receiving events immediately.
|
|
70
|
+
# @param [String] endpoint_id Required parameter: The webhook endpoint id
|
|
71
|
+
# (e.g. `ep_...`) returned by `POST /v1/webhooks/endpoints`.
|
|
72
|
+
# @param [String] authorization Required parameter: API key from
|
|
73
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
74
|
+
# shown once when you create it.
|
|
75
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
76
|
+
def delete_webhook_endpoint(endpoint_id,
|
|
77
|
+
authorization)
|
|
78
|
+
@api_call
|
|
79
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
|
80
|
+
'/v1/webhooks/endpoints/{endpointId}',
|
|
81
|
+
Server::DEFAULT)
|
|
82
|
+
.template_param(new_parameter(endpoint_id, key: 'endpointId')
|
|
83
|
+
.is_required(true)
|
|
84
|
+
.should_encode(true))
|
|
85
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
86
|
+
.is_required(true))
|
|
87
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
88
|
+
.response(new_response_handler
|
|
89
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
|
90
|
+
.is_api_response(true))
|
|
91
|
+
.execute
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|