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,230 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# EntitiesApi
|
|
8
|
+
class EntitiesApi < BaseApi
|
|
9
|
+
# List built-in actors, products, visual styles, and slideshow themes,
|
|
10
|
+
# followed by the entities available to your team. Built-in entities have
|
|
11
|
+
# `isBuiltIn: true` and cannot be updated or archived. Cursor-paginated; see
|
|
12
|
+
# the [Pagination](/pagination) guide.
|
|
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 [V1EntitiesGetParametersEntityType] entity_type Optional parameter:
|
|
17
|
+
# When provided, returns only entities of this type. Omit to return all
|
|
18
|
+
# entities.
|
|
19
|
+
# @param [Integer] limit Optional parameter: Maximum number of items to
|
|
20
|
+
# return in the page. Defaults to 50; capped at 200. See
|
|
21
|
+
# [Pagination](/pagination).
|
|
22
|
+
# @param [String] cursor Optional parameter: Opaque pagination cursor
|
|
23
|
+
# returned as `nextCursor` by the previous page. Omit on the first request.
|
|
24
|
+
# Cursors are tied to the endpoint that produced them and must be passed
|
|
25
|
+
# unmodified. See [Pagination](/pagination).
|
|
26
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
27
|
+
def list_entities(authorization,
|
|
28
|
+
entity_type: nil,
|
|
29
|
+
limit: 50,
|
|
30
|
+
cursor: nil)
|
|
31
|
+
@api_call
|
|
32
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
33
|
+
'/v1/entities',
|
|
34
|
+
Server::DEFAULT)
|
|
35
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
36
|
+
.is_required(true))
|
|
37
|
+
.query_param(new_parameter(entity_type, key: 'entityType'))
|
|
38
|
+
.query_param(new_parameter(limit, key: 'limit'))
|
|
39
|
+
.query_param(new_parameter(cursor, key: 'cursor'))
|
|
40
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
41
|
+
.response(new_response_handler
|
|
42
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
43
|
+
.deserialize_into(ListEntitiesResponse.method(:from_hash))
|
|
44
|
+
.is_api_response(true))
|
|
45
|
+
.execute
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Create a new actor or visual style. Attach reference images with `POST
|
|
49
|
+
# /v1/entities/{entityId}/references`.
|
|
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 [CreateEntityRequest] body Optional parameter: TODO: type
|
|
54
|
+
# description here
|
|
55
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
56
|
+
def create_entity(authorization,
|
|
57
|
+
body: nil)
|
|
58
|
+
@api_call
|
|
59
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
60
|
+
'/v1/entities',
|
|
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(Entity.method(:from_hash))
|
|
71
|
+
.is_api_response(true))
|
|
72
|
+
.execute
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Retrieve a single entity by its id, including its reference images.
|
|
76
|
+
# Built-in catalog entities are included.
|
|
77
|
+
# @param [String] entity_id Required parameter: The entity id (e.g.
|
|
78
|
+
# `vg_enti_...`).
|
|
79
|
+
# @param [String] authorization Required parameter: API key from
|
|
80
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
81
|
+
# shown once when you create it.
|
|
82
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
83
|
+
def get_entity(entity_id,
|
|
84
|
+
authorization)
|
|
85
|
+
@api_call
|
|
86
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
87
|
+
'/v1/entities/{entityId}',
|
|
88
|
+
Server::DEFAULT)
|
|
89
|
+
.template_param(new_parameter(entity_id, key: 'entityId')
|
|
90
|
+
.is_required(true)
|
|
91
|
+
.should_encode(true))
|
|
92
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
93
|
+
.is_required(true))
|
|
94
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
95
|
+
.response(new_response_handler
|
|
96
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
97
|
+
.deserialize_into(Entity.method(:from_hash))
|
|
98
|
+
.is_api_response(true))
|
|
99
|
+
.execute
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Update an entity's name or description. Provide at least one field.
|
|
103
|
+
# Built-in entities (`isBuiltIn: true`) cannot be updated.
|
|
104
|
+
# @param [String] entity_id Required parameter: The entity id (e.g.
|
|
105
|
+
# `vg_enti_...`).
|
|
106
|
+
# @param [String] authorization Required parameter: API key from
|
|
107
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
108
|
+
# shown once when you create it.
|
|
109
|
+
# @param [UpdateEntityRequest] body Optional parameter: TODO: type
|
|
110
|
+
# description here
|
|
111
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
112
|
+
def update_entity(entity_id,
|
|
113
|
+
authorization,
|
|
114
|
+
body: nil)
|
|
115
|
+
@api_call
|
|
116
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
117
|
+
'/v1/entities/{entityId}/update',
|
|
118
|
+
Server::DEFAULT)
|
|
119
|
+
.template_param(new_parameter(entity_id, key: 'entityId')
|
|
120
|
+
.is_required(true)
|
|
121
|
+
.should_encode(true))
|
|
122
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
123
|
+
.is_required(true))
|
|
124
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
125
|
+
.body_param(new_parameter(body))
|
|
126
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
127
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
128
|
+
.response(new_response_handler
|
|
129
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
130
|
+
.deserialize_into(Entity.method(:from_hash))
|
|
131
|
+
.is_api_response(true))
|
|
132
|
+
.execute
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Archive an entity. Archived entities no longer appear in `GET
|
|
136
|
+
# /v1/entities` and can't be attached to new workflows. Built-in entities
|
|
137
|
+
# (`isBuiltIn: true`) cannot be archived.
|
|
138
|
+
# @param [String] entity_id Required parameter: The entity id (e.g.
|
|
139
|
+
# `vg_enti_...`).
|
|
140
|
+
# @param [String] authorization Required parameter: API key from
|
|
141
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
142
|
+
# shown once when you create it.
|
|
143
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
144
|
+
def archive_entity(entity_id,
|
|
145
|
+
authorization)
|
|
146
|
+
@api_call
|
|
147
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
148
|
+
'/v1/entities/{entityId}/archive',
|
|
149
|
+
Server::DEFAULT)
|
|
150
|
+
.template_param(new_parameter(entity_id, key: 'entityId')
|
|
151
|
+
.is_required(true)
|
|
152
|
+
.should_encode(true))
|
|
153
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
154
|
+
.is_required(true))
|
|
155
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
156
|
+
.response(new_response_handler
|
|
157
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
158
|
+
.deserialize_into(EntityArchiveResponse.method(:from_hash))
|
|
159
|
+
.is_api_response(true))
|
|
160
|
+
.execute
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Attach an image file as a reference for the entity. Upload the image first
|
|
164
|
+
# via `POST /v1/files/upload`. Returns the updated entity. Built-in entities
|
|
165
|
+
# (`isBuiltIn: true`) cannot have references added.
|
|
166
|
+
# @param [String] entity_id Required parameter: The entity id (e.g.
|
|
167
|
+
# `vg_enti_...`).
|
|
168
|
+
# @param [String] authorization Required parameter: API key from
|
|
169
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
170
|
+
# shown once when you create it.
|
|
171
|
+
# @param [AddEntityReferenceRequest] body Optional parameter: TODO: type
|
|
172
|
+
# description here
|
|
173
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
174
|
+
def add_entity_reference(entity_id,
|
|
175
|
+
authorization,
|
|
176
|
+
body: nil)
|
|
177
|
+
@api_call
|
|
178
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
179
|
+
'/v1/entities/{entityId}/references',
|
|
180
|
+
Server::DEFAULT)
|
|
181
|
+
.template_param(new_parameter(entity_id, key: 'entityId')
|
|
182
|
+
.is_required(true)
|
|
183
|
+
.should_encode(true))
|
|
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(Entity.method(:from_hash))
|
|
193
|
+
.is_api_response(true))
|
|
194
|
+
.execute
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Detach a reference image from the entity. Returns the updated entity.
|
|
198
|
+
# Built-in entities (`isBuiltIn: true`) cannot have references removed.
|
|
199
|
+
# @param [String] entity_id Required parameter: The entity id (e.g.
|
|
200
|
+
# `vg_enti_...`).
|
|
201
|
+
# @param [String] authorization Required parameter: API key from
|
|
202
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
203
|
+
# shown once when you create it.
|
|
204
|
+
# @param [RemoveEntityReferenceRequest] body Optional parameter: TODO: type
|
|
205
|
+
# description here
|
|
206
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
207
|
+
def remove_entity_reference(entity_id,
|
|
208
|
+
authorization,
|
|
209
|
+
body: nil)
|
|
210
|
+
@api_call
|
|
211
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
212
|
+
'/v1/entities/{entityId}/references/remove',
|
|
213
|
+
Server::DEFAULT)
|
|
214
|
+
.template_param(new_parameter(entity_id, key: 'entityId')
|
|
215
|
+
.is_required(true)
|
|
216
|
+
.should_encode(true))
|
|
217
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
218
|
+
.is_required(true))
|
|
219
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
220
|
+
.body_param(new_parameter(body))
|
|
221
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
222
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
223
|
+
.response(new_response_handler
|
|
224
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
225
|
+
.deserialize_into(Entity.method(:from_hash))
|
|
226
|
+
.is_api_response(true))
|
|
227
|
+
.execute
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
end
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# FilesApi
|
|
8
|
+
class FilesApi < BaseApi
|
|
9
|
+
# List files accessible to your team. By default this returns standalone
|
|
10
|
+
# files (direct tool-call outputs and uploads) and omits two categories:
|
|
11
|
+
# export files (the raw output files of your exports) and project files (the
|
|
12
|
+
# generative files created within a project, e.g. each AI image and
|
|
13
|
+
# text-to-speech file in a script-to-video workflow output). Set
|
|
14
|
+
# `includeExportFiles` and/or `includeProjectFiles` to true to include them.
|
|
15
|
+
# Use `selfOnly=true` to restrict results to files created by the calling
|
|
16
|
+
# API key's user. Files are returned most recently updated first.
|
|
17
|
+
# Cursor-paginated; see the [Pagination](/pagination) guide.
|
|
18
|
+
# @param [String] authorization Required parameter: API key from
|
|
19
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
20
|
+
# shown once when you create it.
|
|
21
|
+
# @param [Integer] limit Optional parameter: Maximum number of items to
|
|
22
|
+
# return in the page. Defaults to 50; capped at 200. See
|
|
23
|
+
# [Pagination](/pagination).
|
|
24
|
+
# @param [String] cursor Optional parameter: Opaque pagination cursor
|
|
25
|
+
# returned as `nextCursor` by the previous page. Omit on the first request.
|
|
26
|
+
# Cursors are tied to the endpoint that produced them and must be passed
|
|
27
|
+
# unmodified. See [Pagination](/pagination).
|
|
28
|
+
# @param [TrueClass | FalseClass] self_only Optional parameter: When true,
|
|
29
|
+
# returns only items created by the API key's owner. When false (default),
|
|
30
|
+
# returns all items accessible to the team.
|
|
31
|
+
# @param [TrueClass | FalseClass] include_export_files Optional parameter:
|
|
32
|
+
# When true, includes export files: the raw output files of your exports
|
|
33
|
+
# (the rendered MP4 you download from an export). When false (default), they
|
|
34
|
+
# are omitted.
|
|
35
|
+
# @param [TrueClass | FalseClass] include_project_files Optional parameter:
|
|
36
|
+
# When true, includes project files: the generative files created within a
|
|
37
|
+
# project (e.g. each AI image and text-to-speech file produced inside a
|
|
38
|
+
# script-to-video workflow output). When false (default), they are
|
|
39
|
+
# omitted.
|
|
40
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
41
|
+
def get_files(authorization,
|
|
42
|
+
limit: 50,
|
|
43
|
+
cursor: nil,
|
|
44
|
+
self_only: false,
|
|
45
|
+
include_export_files: false,
|
|
46
|
+
include_project_files: false)
|
|
47
|
+
@api_call
|
|
48
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
49
|
+
'/v1/files',
|
|
50
|
+
Server::DEFAULT)
|
|
51
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
52
|
+
.is_required(true))
|
|
53
|
+
.query_param(new_parameter(limit, key: 'limit'))
|
|
54
|
+
.query_param(new_parameter(cursor, key: 'cursor'))
|
|
55
|
+
.query_param(new_parameter(self_only, key: 'selfOnly'))
|
|
56
|
+
.query_param(new_parameter(include_export_files, key: 'includeExportFiles'))
|
|
57
|
+
.query_param(new_parameter(include_project_files, key: 'includeProjectFiles'))
|
|
58
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
59
|
+
.response(new_response_handler
|
|
60
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
61
|
+
.deserialize_into(GetFilesResponse.method(:from_hash))
|
|
62
|
+
.is_api_response(true))
|
|
63
|
+
.execute
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Semantic vector search over your files. Embeds the query text and returns
|
|
67
|
+
# the closest matching files ranked by cosine similarity. Only files with
|
|
68
|
+
# indexed descriptions are searchable.
|
|
69
|
+
# @param [String] authorization Required parameter: API key from
|
|
70
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
71
|
+
# shown once when you create it.
|
|
72
|
+
# @param [SearchFilesRequest] body Optional parameter: TODO: type
|
|
73
|
+
# description here
|
|
74
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
75
|
+
def search_files(authorization,
|
|
76
|
+
body: nil)
|
|
77
|
+
@api_call
|
|
78
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
79
|
+
'/v1/files/search',
|
|
80
|
+
Server::DEFAULT)
|
|
81
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
82
|
+
.is_required(true))
|
|
83
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
84
|
+
.body_param(new_parameter(body))
|
|
85
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
86
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
87
|
+
.response(new_response_handler
|
|
88
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
89
|
+
.deserialize_into(SearchFilesResponse.method(:from_hash))
|
|
90
|
+
.is_api_response(true))
|
|
91
|
+
.execute
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Retrieve metadata for a single file by its id.
|
|
95
|
+
# @param [String] file_id Required parameter: The file id (e.g.
|
|
96
|
+
# `vg_file_...`).
|
|
97
|
+
# @param [String] authorization Required parameter: API key from
|
|
98
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
99
|
+
# shown once when you create it.
|
|
100
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
101
|
+
def get_file(file_id,
|
|
102
|
+
authorization)
|
|
103
|
+
@api_call
|
|
104
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
105
|
+
'/v1/files/{fileId}',
|
|
106
|
+
Server::DEFAULT)
|
|
107
|
+
.template_param(new_parameter(file_id, key: 'fileId')
|
|
108
|
+
.is_required(true)
|
|
109
|
+
.should_encode(true))
|
|
110
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
111
|
+
.is_required(true))
|
|
112
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
113
|
+
.response(new_response_handler
|
|
114
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
115
|
+
.deserialize_into(FileInfo.method(:from_hash))
|
|
116
|
+
.is_api_response(true))
|
|
117
|
+
.execute
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Create a new file and receive a pre-signed upload URL. PUT the file bytes
|
|
121
|
+
# to the returned URL, then poll `GET /v1/files/{fileId}` until the file is
|
|
122
|
+
# ready.
|
|
123
|
+
# @param [String] authorization Required parameter: API key from
|
|
124
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
125
|
+
# shown once when you create it.
|
|
126
|
+
# @param [CreateFileUploadRequest] body Optional parameter: TODO: type
|
|
127
|
+
# description here
|
|
128
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
129
|
+
def create_file_upload(authorization,
|
|
130
|
+
body: nil)
|
|
131
|
+
@api_call
|
|
132
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
133
|
+
'/v1/files/upload',
|
|
134
|
+
Server::DEFAULT)
|
|
135
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
136
|
+
.is_required(true))
|
|
137
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
138
|
+
.body_param(new_parameter(body))
|
|
139
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
140
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
141
|
+
.response(new_response_handler
|
|
142
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
143
|
+
.deserialize_into(FileUploadResponse.method(:from_hash))
|
|
144
|
+
.is_api_response(true))
|
|
145
|
+
.execute
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Generate fresh signed URLs for all available renditions of a file. Call
|
|
149
|
+
# this when source URLs are missing or expired. Returns the full file object
|
|
150
|
+
# with populated `downloadSource`, `thumbnailSource`, and `previewSource`
|
|
151
|
+
# (and the convenience root-level `downloadUrl` / `thumbnailUrl`).
|
|
152
|
+
# @param [String] file_id Required parameter: The file id (e.g.
|
|
153
|
+
# `vg_file_...`).
|
|
154
|
+
# @param [String] authorization Required parameter: API key from
|
|
155
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
156
|
+
# shown once when you create it.
|
|
157
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
158
|
+
def hydrate_file(file_id,
|
|
159
|
+
authorization)
|
|
160
|
+
@api_call
|
|
161
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
162
|
+
'/v1/files/{fileId}/hydrate',
|
|
163
|
+
Server::DEFAULT)
|
|
164
|
+
.template_param(new_parameter(file_id, key: 'fileId')
|
|
165
|
+
.is_required(true)
|
|
166
|
+
.should_encode(true))
|
|
167
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
168
|
+
.is_required(true))
|
|
169
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
170
|
+
.response(new_response_handler
|
|
171
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
172
|
+
.deserialize_into(FileInfo.method(:from_hash))
|
|
173
|
+
.is_api_response(true))
|
|
174
|
+
.execute
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Archive a file by setting its archived timestamp. Archived files are
|
|
178
|
+
# excluded from list results. Returns the updated file object.
|
|
179
|
+
# @param [String] file_id Required parameter: The file id (e.g.
|
|
180
|
+
# `vg_file_...`).
|
|
181
|
+
# @param [String] authorization Required parameter: API key from
|
|
182
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
183
|
+
# shown once when you create it.
|
|
184
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
185
|
+
def archive_file(file_id,
|
|
186
|
+
authorization)
|
|
187
|
+
@api_call
|
|
188
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
189
|
+
'/v1/files/{fileId}/archive',
|
|
190
|
+
Server::DEFAULT)
|
|
191
|
+
.template_param(new_parameter(file_id, key: 'fileId')
|
|
192
|
+
.is_required(true)
|
|
193
|
+
.should_encode(true))
|
|
194
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
195
|
+
.is_required(true))
|
|
196
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
197
|
+
.response(new_response_handler
|
|
198
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
199
|
+
.deserialize_into(FileInfo.method(:from_hash))
|
|
200
|
+
.is_api_response(true))
|
|
201
|
+
.execute
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Enable public preview for a file. Works for any file type. Copies the file
|
|
205
|
+
# to a permanent public URL (`staticPublicPreviewSource`) and, for video and
|
|
206
|
+
# audio, registers a public embed playback id (`publicPlaybackId`) for use
|
|
207
|
+
# with `@videogen/player`. If streaming playback is still processing, the
|
|
208
|
+
# endpoint polls briefly and background processing finishes creating the
|
|
209
|
+
# embed playback id. Returns the updated file.
|
|
210
|
+
# @param [String] file_id Required parameter: The file id (e.g.
|
|
211
|
+
# `vg_file_...`).
|
|
212
|
+
# @param [String] authorization Required parameter: API key from
|
|
213
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
214
|
+
# shown once when you create it.
|
|
215
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
216
|
+
def enable_public_preview(file_id,
|
|
217
|
+
authorization)
|
|
218
|
+
@api_call
|
|
219
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
220
|
+
'/v1/files/{fileId}/enable-public-preview',
|
|
221
|
+
Server::DEFAULT)
|
|
222
|
+
.template_param(new_parameter(file_id, key: 'fileId')
|
|
223
|
+
.is_required(true)
|
|
224
|
+
.should_encode(true))
|
|
225
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
226
|
+
.is_required(true))
|
|
227
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
228
|
+
.response(new_response_handler
|
|
229
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
230
|
+
.deserialize_into(FileInfo.method(:from_hash))
|
|
231
|
+
.is_api_response(true))
|
|
232
|
+
.execute
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Disable public preview for a file. Removes the permanent public URL copy
|
|
236
|
+
# and revokes unauthenticated embed streaming access. Authenticated signed
|
|
237
|
+
# URLs remain functional. Returns the updated file.
|
|
238
|
+
# @param [String] file_id Required parameter: The file id (e.g.
|
|
239
|
+
# `vg_file_...`).
|
|
240
|
+
# @param [String] authorization Required parameter: API key from
|
|
241
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
242
|
+
# shown once when you create it.
|
|
243
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
244
|
+
def disable_public_preview(file_id,
|
|
245
|
+
authorization)
|
|
246
|
+
@api_call
|
|
247
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
248
|
+
'/v1/files/{fileId}/disable-public-preview',
|
|
249
|
+
Server::DEFAULT)
|
|
250
|
+
.template_param(new_parameter(file_id, key: 'fileId')
|
|
251
|
+
.is_required(true)
|
|
252
|
+
.should_encode(true))
|
|
253
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
254
|
+
.is_required(true))
|
|
255
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
256
|
+
.response(new_response_handler
|
|
257
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
258
|
+
.deserialize_into(FileInfo.method(:from_hash))
|
|
259
|
+
.is_api_response(true))
|
|
260
|
+
.execute
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
end
|