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,355 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# ProjectsApi
|
|
8
|
+
class ProjectsApi < BaseApi
|
|
9
|
+
# Returns projects, most recently updated first. By default only API-created
|
|
10
|
+
# projects are included; pass `includeUiProjects=true` to also include
|
|
11
|
+
# dashboard-created projects. Use `selfOnly=true` to restrict results to the
|
|
12
|
+
# calling API key's user; otherwise all matching projects for the team are
|
|
13
|
+
# returned. Cursor-paginated; see the [Pagination](/pagination) guide.
|
|
14
|
+
# @param [String] authorization Required parameter: API key from
|
|
15
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
16
|
+
# shown once when you create it.
|
|
17
|
+
# @param [Integer] limit Optional parameter: Maximum number of items to
|
|
18
|
+
# return in the page. Defaults to 50; capped at 200. See
|
|
19
|
+
# [Pagination](/pagination).
|
|
20
|
+
# @param [String] cursor Optional parameter: Opaque pagination cursor
|
|
21
|
+
# returned as `nextCursor` by the previous page. Omit on the first request.
|
|
22
|
+
# Cursors are tied to the endpoint that produced them and must be passed
|
|
23
|
+
# unmodified. See [Pagination](/pagination).
|
|
24
|
+
# @param [TrueClass | FalseClass] self_only Optional parameter: When true,
|
|
25
|
+
# returns only items created by the API key's owner. When false (default),
|
|
26
|
+
# returns all items accessible to the team.
|
|
27
|
+
# @param [TrueClass | FalseClass] include_ui_projects Optional parameter:
|
|
28
|
+
# When true, includes dashboard-created projects in addition to API-created
|
|
29
|
+
# projects. When false (default), returns only API-created projects.
|
|
30
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
31
|
+
def list_projects(authorization,
|
|
32
|
+
limit: 50,
|
|
33
|
+
cursor: nil,
|
|
34
|
+
self_only: false,
|
|
35
|
+
include_ui_projects: false)
|
|
36
|
+
@api_call
|
|
37
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
38
|
+
'/v1/projects',
|
|
39
|
+
Server::DEFAULT)
|
|
40
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
41
|
+
.is_required(true))
|
|
42
|
+
.query_param(new_parameter(limit, key: 'limit'))
|
|
43
|
+
.query_param(new_parameter(cursor, key: 'cursor'))
|
|
44
|
+
.query_param(new_parameter(self_only, key: 'selfOnly'))
|
|
45
|
+
.query_param(new_parameter(include_ui_projects, key: 'includeUiProjects'))
|
|
46
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
47
|
+
.response(new_response_handler
|
|
48
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
49
|
+
.deserialize_into(ListProjectsResponse.method(:from_hash))
|
|
50
|
+
.is_api_response(true))
|
|
51
|
+
.execute
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Returns a simplified view of a project including its title, aspect ratio,
|
|
55
|
+
# status, and URL.
|
|
56
|
+
# @param [String] project_id Required parameter: The project id (e.g.
|
|
57
|
+
# `vg_proj_...`).
|
|
58
|
+
# @param [String] authorization Required parameter: API key from
|
|
59
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
60
|
+
# shown once when you create it.
|
|
61
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
62
|
+
def get_project(project_id,
|
|
63
|
+
authorization)
|
|
64
|
+
@api_call
|
|
65
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
66
|
+
'/v1/projects/{projectId}',
|
|
67
|
+
Server::DEFAULT)
|
|
68
|
+
.template_param(new_parameter(project_id, key: 'projectId')
|
|
69
|
+
.is_required(true)
|
|
70
|
+
.should_encode(true))
|
|
71
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
72
|
+
.is_required(true))
|
|
73
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
74
|
+
.response(new_response_handler
|
|
75
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
76
|
+
.deserialize_into(ProjectResponse.method(:from_hash))
|
|
77
|
+
.is_api_response(true))
|
|
78
|
+
.execute
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Starts an export of a project to MP4. Returns immediately with an export
|
|
82
|
+
# id; the file becomes available when the export task completes. Exporting
|
|
83
|
+
# requires a paid plan in the app, but the API lets you export for free with
|
|
84
|
+
# a VideoGen watermark and a short 'Made with VideoGen' end screen appended
|
|
85
|
+
# to the video. A Pro plan lets you remove both by setting `watermarkMode`
|
|
86
|
+
# and `endScreenMode` to `NONE`.
|
|
87
|
+
# @param [String] project_id Required parameter: The project id (e.g.
|
|
88
|
+
# `vg_proj_...`).
|
|
89
|
+
# @param [String] authorization Required parameter: API key from
|
|
90
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
91
|
+
# shown once when you create it.
|
|
92
|
+
# @param [ExportProjectRequest] body Optional parameter: TODO: type
|
|
93
|
+
# description here
|
|
94
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
95
|
+
def export_project(project_id,
|
|
96
|
+
authorization,
|
|
97
|
+
body: nil)
|
|
98
|
+
@api_call
|
|
99
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
100
|
+
'/v1/projects/{projectId}/export',
|
|
101
|
+
Server::DEFAULT)
|
|
102
|
+
.template_param(new_parameter(project_id, key: 'projectId')
|
|
103
|
+
.is_required(true)
|
|
104
|
+
.should_encode(true))
|
|
105
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
106
|
+
.is_required(true))
|
|
107
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
108
|
+
.body_param(new_parameter(body))
|
|
109
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
110
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
111
|
+
.response(new_response_handler
|
|
112
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
113
|
+
.deserialize_into(ExportProjectResponse.method(:from_hash))
|
|
114
|
+
.is_api_response(true))
|
|
115
|
+
.execute
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Returns a project's exports, newest first, as fully hydrated
|
|
119
|
+
# `ProjectExport` objects (status, signed download/thumbnail URLs, and the
|
|
120
|
+
# embedded `file`). Signed URLs are re-signed when within an hour of
|
|
121
|
+
# expiring, so they are always valid long enough to use. Cursor-paginated;
|
|
122
|
+
# see the [Pagination](/pagination) guide.
|
|
123
|
+
# @param [String] project_id Required parameter: The project id (e.g.
|
|
124
|
+
# `vg_proj_...`).
|
|
125
|
+
# @param [String] authorization Required parameter: API key from
|
|
126
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
127
|
+
# shown once when you create it.
|
|
128
|
+
# @param [Integer] limit Optional parameter: Maximum number of items to
|
|
129
|
+
# return in the page. Defaults to 50; capped at 200. See
|
|
130
|
+
# [Pagination](/pagination).
|
|
131
|
+
# @param [String] cursor Optional parameter: Opaque pagination cursor
|
|
132
|
+
# returned as `nextCursor` by the previous page. Omit on the first request.
|
|
133
|
+
# Cursors are tied to the endpoint that produced them and must be passed
|
|
134
|
+
# unmodified. See [Pagination](/pagination).
|
|
135
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
136
|
+
def list_project_exports(project_id,
|
|
137
|
+
authorization,
|
|
138
|
+
limit: 50,
|
|
139
|
+
cursor: nil)
|
|
140
|
+
@api_call
|
|
141
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
142
|
+
'/v1/projects/{projectId}/exports',
|
|
143
|
+
Server::DEFAULT)
|
|
144
|
+
.template_param(new_parameter(project_id, key: 'projectId')
|
|
145
|
+
.is_required(true)
|
|
146
|
+
.should_encode(true))
|
|
147
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
148
|
+
.is_required(true))
|
|
149
|
+
.query_param(new_parameter(limit, key: 'limit'))
|
|
150
|
+
.query_param(new_parameter(cursor, key: 'cursor'))
|
|
151
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
152
|
+
.response(new_response_handler
|
|
153
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
154
|
+
.deserialize_into(ListProjectExportsResponse.method(:from_hash))
|
|
155
|
+
.is_api_response(true))
|
|
156
|
+
.execute
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Returns the current status of a project export started via `POST
|
|
160
|
+
# /v1/projects/{projectId}/export`, and — once `status` is `succeeded` — the
|
|
161
|
+
# signed download/thumbnail URLs and the hydrated export `file`. Poll this
|
|
162
|
+
# endpoint until `status` is `succeeded`, `failed`, or `cancelled`. The
|
|
163
|
+
# signed URLs are private and valid for 7 days; this endpoint automatically
|
|
164
|
+
# re-signs them when they are within an hour of expiring, so a caller always
|
|
165
|
+
# receives a URL valid long enough to use. Every endpoint that returns
|
|
166
|
+
# hydrated files auto-rehydrates this way — only the file endpoints (`GET
|
|
167
|
+
# /v1/files/{fileId}` and `POST /v1/files/{fileId}/hydrate`) are the
|
|
168
|
+
# explicit, on-demand hydration paths. Use `exportFileId` with `POST
|
|
169
|
+
# /v1/files/{fileId}/hydrate` if you need to re-sign the export file
|
|
170
|
+
# directly later.
|
|
171
|
+
# @param [String] project_id Required parameter: The project id (e.g.
|
|
172
|
+
# `vg_proj_...`).
|
|
173
|
+
# @param [String] export_id Required parameter: The export id (e.g.
|
|
174
|
+
# `vg_expo_...`) returned by `POST /v1/projects/{projectId}/export`.
|
|
175
|
+
# @param [String] authorization Required parameter: API key from
|
|
176
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
177
|
+
# shown once when you create it.
|
|
178
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
179
|
+
def get_project_export(project_id,
|
|
180
|
+
export_id,
|
|
181
|
+
authorization)
|
|
182
|
+
@api_call
|
|
183
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
184
|
+
'/v1/projects/{projectId}/exports/{exportId}',
|
|
185
|
+
Server::DEFAULT)
|
|
186
|
+
.template_param(new_parameter(project_id, key: 'projectId')
|
|
187
|
+
.is_required(true)
|
|
188
|
+
.should_encode(true))
|
|
189
|
+
.template_param(new_parameter(export_id, key: 'exportId')
|
|
190
|
+
.is_required(true)
|
|
191
|
+
.should_encode(true))
|
|
192
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
193
|
+
.is_required(true))
|
|
194
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
195
|
+
.response(new_response_handler
|
|
196
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
197
|
+
.deserialize_into(ProjectExport.method(:from_hash))
|
|
198
|
+
.is_api_response(true))
|
|
199
|
+
.execute
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Starts a timeline interchange job that converts a project into an editor
|
|
203
|
+
# interchange document (Final Cut Pro FCPXML, Adobe Premiere Pro XML,
|
|
204
|
+
# OpenTimelineIO, or an SRT caption sidecar). Returns immediately with an
|
|
205
|
+
# interchange job id; the file becomes available when the job completes.
|
|
206
|
+
# Unlike `POST /v1/projects/{projectId}/export` (which renders a flattened
|
|
207
|
+
# MP4), this preserves the project as an editable timeline of separate
|
|
208
|
+
# clips, tracks, and captions so you can keep editing it in a desktop video
|
|
209
|
+
# editor. Choose `mediaDelivery` to control how the document references
|
|
210
|
+
# media: `REMOTE_URLS` produces a single document that links to signed media
|
|
211
|
+
# URLs, while `BUNDLE` produces a zip containing the document plus every
|
|
212
|
+
# referenced media file for durable offline relinking.
|
|
213
|
+
# @param [String] project_id Required parameter: The project id (e.g.
|
|
214
|
+
# `vg_proj_...`).
|
|
215
|
+
# @param [String] authorization Required parameter: API key from
|
|
216
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
217
|
+
# shown once when you create it.
|
|
218
|
+
# @param [CreateTimelineInterchangeRequest] body Optional parameter: TODO:
|
|
219
|
+
# type description here
|
|
220
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
221
|
+
def create_timeline_interchange(project_id,
|
|
222
|
+
authorization,
|
|
223
|
+
body: nil)
|
|
224
|
+
@api_call
|
|
225
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
226
|
+
'/v1/projects/{projectId}/timeline-interchange',
|
|
227
|
+
Server::DEFAULT)
|
|
228
|
+
.template_param(new_parameter(project_id, key: 'projectId')
|
|
229
|
+
.is_required(true)
|
|
230
|
+
.should_encode(true))
|
|
231
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
232
|
+
.is_required(true))
|
|
233
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
234
|
+
.body_param(new_parameter(body))
|
|
235
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
236
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
237
|
+
.response(new_response_handler
|
|
238
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
239
|
+
.deserialize_into(CreateTimelineInterchangeResponse.method(:from_hash))
|
|
240
|
+
.is_api_response(true))
|
|
241
|
+
.execute
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Returns the current status of a timeline interchange job started via `POST
|
|
245
|
+
# /v1/projects/{projectId}/timeline-interchange`, and, once `status` is
|
|
246
|
+
# `succeeded`, the signed download URL and the hydrated interchange `file`.
|
|
247
|
+
# Poll this endpoint until `status` is `succeeded`, `failed`, or
|
|
248
|
+
# `cancelled`. The signed URL is private and valid for 7 days; this endpoint
|
|
249
|
+
# automatically re-signs it when it is within an hour of expiring. Use
|
|
250
|
+
# `interchangeFileId` with `POST /v1/files/{fileId}/hydrate` if you need to
|
|
251
|
+
# re-sign the file directly later.
|
|
252
|
+
# @param [String] interchange_job_id Required parameter: The timeline
|
|
253
|
+
# interchange job id (e.g. `vg_inte_...`) returned by `POST
|
|
254
|
+
# /v1/projects/{projectId}/timeline-interchange`.
|
|
255
|
+
# @param [String] authorization Required parameter: API key from
|
|
256
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
257
|
+
# shown once when you create it.
|
|
258
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
259
|
+
def get_timeline_interchange(interchange_job_id,
|
|
260
|
+
authorization)
|
|
261
|
+
@api_call
|
|
262
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
263
|
+
'/v1/timeline-interchange/{interchangeJobId}',
|
|
264
|
+
Server::DEFAULT)
|
|
265
|
+
.template_param(new_parameter(interchange_job_id, key: 'interchangeJobId')
|
|
266
|
+
.is_required(true)
|
|
267
|
+
.should_encode(true))
|
|
268
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
269
|
+
.is_required(true))
|
|
270
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
271
|
+
.response(new_response_handler
|
|
272
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
273
|
+
.deserialize_into(TimelineInterchange.method(:from_hash))
|
|
274
|
+
.is_api_response(true))
|
|
275
|
+
.execute
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Applies an ordered list of edits (background music, logo overlay, caption
|
|
279
|
+
# visibility/style) to a project. Each action runs asynchronously as its own
|
|
280
|
+
# remix action; the response returns one remix action id per action in
|
|
281
|
+
# order. Set `saveAsNewProject` to apply the edits to a copy and leave the
|
|
282
|
+
# original untouched. Poll `GET /v1/projects/{projectId}/remix-actions` for
|
|
283
|
+
# status.
|
|
284
|
+
# @param [String] project_id Required parameter: The project id (e.g.
|
|
285
|
+
# `vg_proj_...`).
|
|
286
|
+
# @param [String] authorization Required parameter: API key from
|
|
287
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
288
|
+
# shown once when you create it.
|
|
289
|
+
# @param [RemixProjectRequest] body Optional parameter: TODO: type
|
|
290
|
+
# description here
|
|
291
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
292
|
+
def remix_project(project_id,
|
|
293
|
+
authorization,
|
|
294
|
+
body: nil)
|
|
295
|
+
@api_call
|
|
296
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
297
|
+
'/v1/projects/{projectId}/remix',
|
|
298
|
+
Server::DEFAULT)
|
|
299
|
+
.template_param(new_parameter(project_id, key: 'projectId')
|
|
300
|
+
.is_required(true)
|
|
301
|
+
.should_encode(true))
|
|
302
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
303
|
+
.is_required(true))
|
|
304
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
305
|
+
.body_param(new_parameter(body))
|
|
306
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
307
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
308
|
+
.response(new_response_handler
|
|
309
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
310
|
+
.deserialize_into(RemixProjectResponse.method(:from_hash))
|
|
311
|
+
.is_api_response(true))
|
|
312
|
+
.execute
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
# Returns remix actions applied to a project (via `POST
|
|
316
|
+
# /v1/projects/{projectId}/remix` or as a post-workflow step), most recent
|
|
317
|
+
# first, with each action's status and progress. Cursor-paginated; see the
|
|
318
|
+
# [Pagination](/pagination) guide.
|
|
319
|
+
# @param [String] project_id Required parameter: The project id (e.g.
|
|
320
|
+
# `vg_proj_...`).
|
|
321
|
+
# @param [String] authorization Required parameter: API key from
|
|
322
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
323
|
+
# shown once when you create it.
|
|
324
|
+
# @param [Integer] limit Optional parameter: Maximum number of items to
|
|
325
|
+
# return in the page. Defaults to 50; capped at 200. See
|
|
326
|
+
# [Pagination](/pagination).
|
|
327
|
+
# @param [String] cursor Optional parameter: Opaque pagination cursor
|
|
328
|
+
# returned as `nextCursor` by the previous page. Omit on the first request.
|
|
329
|
+
# Cursors are tied to the endpoint that produced them and must be passed
|
|
330
|
+
# unmodified. See [Pagination](/pagination).
|
|
331
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
332
|
+
def list_project_remix_actions(project_id,
|
|
333
|
+
authorization,
|
|
334
|
+
limit: 50,
|
|
335
|
+
cursor: nil)
|
|
336
|
+
@api_call
|
|
337
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
338
|
+
'/v1/projects/{projectId}/remix-actions',
|
|
339
|
+
Server::DEFAULT)
|
|
340
|
+
.template_param(new_parameter(project_id, key: 'projectId')
|
|
341
|
+
.is_required(true)
|
|
342
|
+
.should_encode(true))
|
|
343
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
344
|
+
.is_required(true))
|
|
345
|
+
.query_param(new_parameter(limit, key: 'limit'))
|
|
346
|
+
.query_param(new_parameter(cursor, key: 'cursor'))
|
|
347
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
348
|
+
.response(new_response_handler
|
|
349
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
350
|
+
.deserialize_into(ListRemixActionsResponse.method(:from_hash))
|
|
351
|
+
.is_api_response(true))
|
|
352
|
+
.execute
|
|
353
|
+
end
|
|
354
|
+
end
|
|
355
|
+
end
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# ResourcesApi
|
|
8
|
+
class ResourcesApi < BaseApi
|
|
9
|
+
# List available text-to-speech voices. Pass a `voiceId` or `displayName`
|
|
10
|
+
# from the response to the text-to-speech endpoint. Cursor-paginated; see
|
|
11
|
+
# the [Pagination](/pagination) guide. Pass `query` to filter by voice id,
|
|
12
|
+
# display name, language, accent, or description.
|
|
13
|
+
# @param [String] authorization Required parameter: API key from
|
|
14
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
15
|
+
# shown once when you create it.
|
|
16
|
+
# @param [Integer] limit Optional parameter: Maximum number of items to
|
|
17
|
+
# return in the page. Defaults to 50; capped at 200. See
|
|
18
|
+
# [Pagination](/pagination).
|
|
19
|
+
# @param [String] cursor Optional parameter: Opaque pagination cursor
|
|
20
|
+
# returned as `nextCursor` by the previous page. Omit on the first request.
|
|
21
|
+
# Cursors are tied to the endpoint that produced them and must be passed
|
|
22
|
+
# unmodified. See [Pagination](/pagination).
|
|
23
|
+
# @param [TrueClass | FalseClass] include_deprecated_voices Optional
|
|
24
|
+
# parameter: When true, includes voices that are deprecated but still
|
|
25
|
+
# callable. Defaults to false.
|
|
26
|
+
# @param [String] query Optional parameter: Optional case-insensitive
|
|
27
|
+
# substring filter across each item's searchable text fields. Omit to return
|
|
28
|
+
# the unfiltered catalogue.
|
|
29
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
30
|
+
def list_tts_voices(authorization,
|
|
31
|
+
limit: 50,
|
|
32
|
+
cursor: nil,
|
|
33
|
+
include_deprecated_voices: false,
|
|
34
|
+
query: nil)
|
|
35
|
+
@api_call
|
|
36
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
37
|
+
'/v1/resources/tts-voices',
|
|
38
|
+
Server::DEFAULT)
|
|
39
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
40
|
+
.is_required(true))
|
|
41
|
+
.query_param(new_parameter(limit, key: 'limit'))
|
|
42
|
+
.query_param(new_parameter(cursor, key: 'cursor'))
|
|
43
|
+
.query_param(new_parameter(include_deprecated_voices, key: 'includeDeprecatedVoices'))
|
|
44
|
+
.query_param(new_parameter(query, key: 'query'))
|
|
45
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
46
|
+
.response(new_response_handler
|
|
47
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
48
|
+
.deserialize_into(TtsVoiceListResponse.method(:from_hash))
|
|
49
|
+
.is_api_response(true))
|
|
50
|
+
.execute
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List the languages a project can be translated into. Pass a `languageCode`
|
|
54
|
+
# from the response to the `TRANSLATE_PROJECT` remix action. Returns the
|
|
55
|
+
# full catalogue in a single response (not paginated). Pass `query` to
|
|
56
|
+
# filter by language code or English name.
|
|
57
|
+
# @param [String] authorization Required parameter: API key from
|
|
58
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
59
|
+
# shown once when you create it.
|
|
60
|
+
# @param [String] query Optional parameter: Optional case-insensitive
|
|
61
|
+
# substring filter across each item's searchable text fields. Omit to return
|
|
62
|
+
# the unfiltered catalogue.
|
|
63
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
64
|
+
def list_languages(authorization,
|
|
65
|
+
query: nil)
|
|
66
|
+
@api_call
|
|
67
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
68
|
+
'/v1/resources/languages',
|
|
69
|
+
Server::DEFAULT)
|
|
70
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
71
|
+
.is_required(true))
|
|
72
|
+
.query_param(new_parameter(query, key: 'query'))
|
|
73
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
74
|
+
.response(new_response_handler
|
|
75
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
76
|
+
.deserialize_into(LanguageListResponse.method(:from_hash))
|
|
77
|
+
.is_api_response(true))
|
|
78
|
+
.execute
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# TextApi
|
|
8
|
+
class TextApi < BaseApi
|
|
9
|
+
# Generate text from a prompt using a general-purpose language model. Choose
|
|
10
|
+
# a quality tier with `quality` (`LOW`, `STANDARD`, `HIGH`, or `MAX`).
|
|
11
|
+
# Synchronous: the response includes the generated text. Useful for drafting
|
|
12
|
+
# scripts, titles, descriptions, and other short copy before generating a
|
|
13
|
+
# video.
|
|
14
|
+
# @param [String] authorization Required parameter: API key from
|
|
15
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
16
|
+
# shown once when you create it.
|
|
17
|
+
# @param [GenerateTextRequest] body Optional parameter: TODO: type
|
|
18
|
+
# description here
|
|
19
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
20
|
+
def generate_text(authorization,
|
|
21
|
+
body: nil)
|
|
22
|
+
@api_call
|
|
23
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
24
|
+
'/v1/text/generate',
|
|
25
|
+
Server::DEFAULT)
|
|
26
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
27
|
+
.is_required(true))
|
|
28
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
29
|
+
.body_param(new_parameter(body))
|
|
30
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
31
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
32
|
+
.response(new_response_handler
|
|
33
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
34
|
+
.deserialize_into(GenerateTextResponse.method(:from_hash))
|
|
35
|
+
.is_api_response(true))
|
|
36
|
+
.execute
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|