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
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 14b5f03cdedbb3f8117386372585f51450aa682af41008628d21995d214872af
|
|
4
|
+
data.tar.gz: a00180861a93292562d9fcc7c2b19dc86d090bf378311a316d565daf328a14ad
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 1f36642af396fa22c5b6cad882499c501514f66e6702a91e2ad4360bb0dc5eae043613bfa3c1c0ef0aa2f5cf285ac21eced2e89886b9f121b6db53f7ad4ede97
|
|
7
|
+
data.tar.gz: e6c303b9bd4f8566a9484b6068c88fb410994479c00ead8904f0ffe62d508f8e0716ba6ed56cb48f7c3b82644805364e43640f26b5fb964fc4127b293662f12c
|
data/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
License:
|
|
2
|
+
========
|
|
3
|
+
The MIT License (MIT)
|
|
4
|
+
http://opensource.org/licenses/MIT
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2014 - 2026 APIMATIC Limited
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in
|
|
16
|
+
all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
|
+
THE SOFTWARE.
|
|
25
|
+
|
|
26
|
+
Trade Mark:
|
|
27
|
+
==========
|
|
28
|
+
APIMATIC is a trade mark for APIMATIC Limited
|
data/README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
|
|
2
|
+
# Getting Started with Videogen
|
|
3
|
+
|
|
4
|
+
## Install the Package
|
|
5
|
+
|
|
6
|
+
Install the gem from the command line:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
gem install vgen-apimatic-sdk -v 0.0.1
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Or add the gem to your Gemfile and run `bundle`:
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
gem 'vgen-apimatic-sdk', '0.0.1'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
For additional gem details, see the [RubyGems page for the vgen-apimatic-sdk gem](https://rubygems.org/gems/vgen-apimatic-sdk/versions/0.0.1).
|
|
19
|
+
|
|
20
|
+
## IRB Console Usage
|
|
21
|
+
|
|
22
|
+
You can explore the SDK interactively using IRB in two ways
|
|
23
|
+
|
|
24
|
+
### 1. Use IRB with Installed Gem
|
|
25
|
+
|
|
26
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and type the following command to start the irb console.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
irb
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Now you can load the SDK in the IRB
|
|
33
|
+
|
|
34
|
+
```ruby
|
|
35
|
+
require 'videogen'
|
|
36
|
+
include Videogen
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 2. Use IRB within SDK
|
|
40
|
+
|
|
41
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and navigate to the root folder of SDK.
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
cd path/to/videogen
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Now you can start the preconfigured irb console by running the following command
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
ruby bin/console
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**_Note:_** This automatically loads the SDK from lib/
|
|
54
|
+
|
|
55
|
+
## Initialize the API Client
|
|
56
|
+
|
|
57
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/client.md)
|
|
58
|
+
|
|
59
|
+
The following parameters are configurable for the API Client:
|
|
60
|
+
|
|
61
|
+
| Parameter | Type | Description |
|
|
62
|
+
| --- | --- | --- |
|
|
63
|
+
| connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
|
64
|
+
| adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
|
65
|
+
| timeout | `Float` | The value to use for connection timeout. <br> **Default: 30** |
|
|
66
|
+
| max_retries | `Integer` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
|
|
67
|
+
| retry_interval | `Float` | Pause in seconds between retries. <br> **Default: 1** |
|
|
68
|
+
| backoff_factor | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff. <br> **Default: 2** |
|
|
69
|
+
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
70
|
+
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
|
71
|
+
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
|
72
|
+
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
73
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
74
|
+
| bearer_auth_credentials | [`BearerAuthCredentials`](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/auth/oauth-2-bearer-token.md) | The credential object for OAuth 2 Bearer token |
|
|
75
|
+
|
|
76
|
+
The API client can be initialized as follows:
|
|
77
|
+
|
|
78
|
+
### Code-Based Client Initialization
|
|
79
|
+
|
|
80
|
+
```ruby
|
|
81
|
+
require 'videogen'
|
|
82
|
+
include Videogen
|
|
83
|
+
|
|
84
|
+
client = Client.new(
|
|
85
|
+
bearer_auth_credentials: BearerAuthCredentials.new(
|
|
86
|
+
access_token: 'AccessToken'
|
|
87
|
+
),
|
|
88
|
+
logging_configuration: LoggingConfiguration.new(
|
|
89
|
+
log_level: Logger::INFO,
|
|
90
|
+
request_logging_config: RequestLoggingConfiguration.new(
|
|
91
|
+
log_body: true
|
|
92
|
+
),
|
|
93
|
+
response_logging_config: ResponseLoggingConfiguration.new(
|
|
94
|
+
log_headers: true
|
|
95
|
+
)
|
|
96
|
+
)
|
|
97
|
+
)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Environment-Based Client Initialization
|
|
101
|
+
|
|
102
|
+
```ruby
|
|
103
|
+
require 'videogen'
|
|
104
|
+
include Videogen
|
|
105
|
+
|
|
106
|
+
# Create client from environment
|
|
107
|
+
client = Client.from_env
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md) section for details.
|
|
111
|
+
|
|
112
|
+
## Authorization
|
|
113
|
+
|
|
114
|
+
This API uses the following authentication schemes.
|
|
115
|
+
|
|
116
|
+
* [`bearerAuth (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/auth/oauth-2-bearer-token.md)
|
|
117
|
+
|
|
118
|
+
## List of APIs
|
|
119
|
+
|
|
120
|
+
* [Workflows](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/workflows.md)
|
|
121
|
+
* [Projects](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/projects.md)
|
|
122
|
+
* [Assistant](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/assistant.md)
|
|
123
|
+
* [Tools](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/tools.md)
|
|
124
|
+
* [Text](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/text.md)
|
|
125
|
+
* [Files](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/files.md)
|
|
126
|
+
* [Entities](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/entities.md)
|
|
127
|
+
* [Resources](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/resources.md)
|
|
128
|
+
* [Webhooks](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/webhooks.md)
|
|
129
|
+
* [Account](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/account.md)
|
|
130
|
+
|
|
131
|
+
## SDK Infrastructure
|
|
132
|
+
|
|
133
|
+
### Configuration
|
|
134
|
+
|
|
135
|
+
* [ProxySettings](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/proxy-settings.md)
|
|
136
|
+
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md)
|
|
137
|
+
* [AbstractLogger](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/abstract-logger.md)
|
|
138
|
+
* [LoggingConfiguration](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/logging-configuration.md)
|
|
139
|
+
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/request-logging-configuration.md)
|
|
140
|
+
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/response-logging-configuration.md)
|
|
141
|
+
|
|
142
|
+
### HTTP
|
|
143
|
+
|
|
144
|
+
* [HttpResponse](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/http-response.md)
|
|
145
|
+
* [HttpRequest](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/http-request.md)
|
|
146
|
+
|
|
147
|
+
### Utilities
|
|
148
|
+
|
|
149
|
+
* [ApiResponse](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/api-response.md)
|
|
150
|
+
* [ApiHelper](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/api-helper.md)
|
|
151
|
+
* [DateTimeHelper](https://www.github.com/sdks-io/vgen-apimatic-ruby-sdk/tree/0.0.1/doc/date-time-helper.md)
|
|
152
|
+
|
data/bin/console
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
# Load the lib folder into Ruby's load path
|
|
4
|
+
$LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
|
|
5
|
+
|
|
6
|
+
# Require the gem
|
|
7
|
+
require 'videogen'
|
|
8
|
+
|
|
9
|
+
puts 'Videogen SDK loaded!'
|
|
10
|
+
puts 'You can now create a client with: client = Videogen::Client.new'
|
|
11
|
+
puts 'Or use from_env: client = Videogen::Client.from_env'
|
|
12
|
+
|
|
13
|
+
# Start an interactive IRB session
|
|
14
|
+
require 'irb'
|
|
15
|
+
IRB.start
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# AccountApi
|
|
8
|
+
class AccountApi < BaseApi
|
|
9
|
+
# Return the account and team behind the API key making the request. Takes
|
|
10
|
+
# no parameters. Call it as a connection test to confirm a key is valid and
|
|
11
|
+
# to discover the `teamId` and account `email` a key belongs to.
|
|
12
|
+
# @param [String] authorization Required parameter: API key from
|
|
13
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
14
|
+
# shown once when you create it.
|
|
15
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
16
|
+
def get_me(authorization)
|
|
17
|
+
@api_call
|
|
18
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
19
|
+
'/v1/me',
|
|
20
|
+
Server::DEFAULT)
|
|
21
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
22
|
+
.is_required(true))
|
|
23
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
24
|
+
.response(new_response_handler
|
|
25
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
26
|
+
.deserialize_into(MeResponse.method(:from_hash))
|
|
27
|
+
.is_api_response(true))
|
|
28
|
+
.execute
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# AssistantApi
|
|
8
|
+
class AssistantApi < BaseApi
|
|
9
|
+
# Creates a new project and sends the first message to the VideoGen AI
|
|
10
|
+
# assistant, exactly like typing into the assistant on a new project in the
|
|
11
|
+
# app. Asynchronous: the response contains the `messageId` of the
|
|
12
|
+
# assistant's pending reply (e.g. `vg_mesg_...`). Poll `GET
|
|
13
|
+
# /v1/assistant-messages/{messageId}` until `status` is `succeeded`,
|
|
14
|
+
# `failed`, or `cancelled`, or subscribe to `assistant_message.*` webhooks.
|
|
15
|
+
# Fetch the parent assistant with `GET /v1/assistants/{assistantId}` to list
|
|
16
|
+
# all messages in the chat.
|
|
17
|
+
# @param [String] authorization Required parameter: API key from
|
|
18
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
19
|
+
# shown once when you create it.
|
|
20
|
+
# @param [StartAssistantChatRequest] body Optional parameter: TODO: type
|
|
21
|
+
# description here
|
|
22
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
23
|
+
def start_assistant_chat(authorization,
|
|
24
|
+
body: nil)
|
|
25
|
+
@api_call
|
|
26
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
27
|
+
'/v1/assistants',
|
|
28
|
+
Server::DEFAULT)
|
|
29
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
30
|
+
.is_required(true))
|
|
31
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
32
|
+
.body_param(new_parameter(body))
|
|
33
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
34
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
35
|
+
.response(new_response_handler
|
|
36
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
37
|
+
.deserialize_into(StartAssistantChatResponse.method(:from_hash))
|
|
38
|
+
.is_api_response(true))
|
|
39
|
+
.execute
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns the assistant chat identified by `assistantId`, including every
|
|
43
|
+
# message in it (user and assistant turns) in chronological order.
|
|
44
|
+
# @param [String] assistant_id Required parameter: The assistant chat id
|
|
45
|
+
# (e.g. `vg_asst_...`). Every API project has one assistant chat; find it on
|
|
46
|
+
# `ProjectResponse.assistantId`.
|
|
47
|
+
# @param [String] authorization Required parameter: API key from
|
|
48
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
49
|
+
# shown once when you create it.
|
|
50
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
51
|
+
def get_assistant(assistant_id,
|
|
52
|
+
authorization)
|
|
53
|
+
@api_call
|
|
54
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
55
|
+
'/v1/assistants/{assistantId}',
|
|
56
|
+
Server::DEFAULT)
|
|
57
|
+
.template_param(new_parameter(assistant_id, key: 'assistantId')
|
|
58
|
+
.is_required(true)
|
|
59
|
+
.should_encode(true))
|
|
60
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
61
|
+
.is_required(true))
|
|
62
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
63
|
+
.response(new_response_handler
|
|
64
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
65
|
+
.deserialize_into(GetAssistantResponse.method(:from_hash))
|
|
66
|
+
.is_api_response(true))
|
|
67
|
+
.execute
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Sends a follow-up message to an existing assistant chat started with `POST
|
|
71
|
+
# /v1/assistants`. Asynchronous: the response contains the `messageId` of
|
|
72
|
+
# the assistant's pending reply. Poll `GET
|
|
73
|
+
# /v1/assistant-messages/{messageId}` until `status` is terminal, or
|
|
74
|
+
# subscribe to `assistant_message.*` webhooks.
|
|
75
|
+
# @param [String] assistant_id Required parameter: The assistant chat id
|
|
76
|
+
# (e.g. `vg_asst_...`). Every API project has one assistant chat; find it on
|
|
77
|
+
# `ProjectResponse.assistantId`.
|
|
78
|
+
# @param [String] authorization Required parameter: API key from
|
|
79
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
80
|
+
# shown once when you create it.
|
|
81
|
+
# @param [SendAssistantMessageRequest] body Optional parameter: TODO: type
|
|
82
|
+
# description here
|
|
83
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
84
|
+
def send_assistant_message(assistant_id,
|
|
85
|
+
authorization,
|
|
86
|
+
body: nil)
|
|
87
|
+
@api_call
|
|
88
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
89
|
+
'/v1/assistants/{assistantId}/messages',
|
|
90
|
+
Server::DEFAULT)
|
|
91
|
+
.template_param(new_parameter(assistant_id, key: 'assistantId')
|
|
92
|
+
.is_required(true)
|
|
93
|
+
.should_encode(true))
|
|
94
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
95
|
+
.is_required(true))
|
|
96
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
97
|
+
.body_param(new_parameter(body))
|
|
98
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
99
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
100
|
+
.response(new_response_handler
|
|
101
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
102
|
+
.deserialize_into(SendAssistantMessageResponse.method(:from_hash))
|
|
103
|
+
.is_api_response(true))
|
|
104
|
+
.execute
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Acts on an actionable widget the assistant offered on a prior turn.
|
|
108
|
+
# Reference the action by its `actionId` from a prior assistant message.
|
|
109
|
+
# `APPROVE` (the default) completes the action; `REJECT` records the
|
|
110
|
+
# rejection. Two kinds are actionable via the API: accepting a workflow
|
|
111
|
+
# suggestion (`APPROVE` applies the suggested workflow and immediately
|
|
112
|
+
# starts generating; the returned assistant message carries the workflow run
|
|
113
|
+
# in `generation`), and applying an assistant edit (an `APPLY_EDIT` action
|
|
114
|
+
# with `requiresApp` false, which applies the edit to the project). Actions
|
|
115
|
+
# with `requiresApp` set to true (plans, tools, and other app-only widgets)
|
|
116
|
+
# can only be completed in the web app: open the assistant's `projectUrl`
|
|
117
|
+
# instead. Asynchronous: the response contains the `messageId` of the
|
|
118
|
+
# resulting assistant message. Poll `GET /v1/assistant-messages/{messageId}`
|
|
119
|
+
# for its terminal state.
|
|
120
|
+
# @param [String] assistant_id Required parameter: The assistant chat id
|
|
121
|
+
# (e.g. `vg_asst_...`). Every API project has one assistant chat; find it on
|
|
122
|
+
# `ProjectResponse.assistantId`.
|
|
123
|
+
# @param [String] action_id Required parameter: The `actionId` of the action
|
|
124
|
+
# to act on, from a prior assistant message.
|
|
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 [ActOnAssistantActionRequest] body Optional parameter: TODO: type
|
|
129
|
+
# description here
|
|
130
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
131
|
+
def act_on_assistant_action(assistant_id,
|
|
132
|
+
action_id,
|
|
133
|
+
authorization,
|
|
134
|
+
body: nil)
|
|
135
|
+
@api_call
|
|
136
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
137
|
+
'/v1/assistants/{assistantId}/actions/{actionId}',
|
|
138
|
+
Server::DEFAULT)
|
|
139
|
+
.template_param(new_parameter(assistant_id, key: 'assistantId')
|
|
140
|
+
.is_required(true)
|
|
141
|
+
.should_encode(true))
|
|
142
|
+
.template_param(new_parameter(action_id, key: 'actionId')
|
|
143
|
+
.is_required(true)
|
|
144
|
+
.should_encode(true))
|
|
145
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
146
|
+
.is_required(true))
|
|
147
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
148
|
+
.body_param(new_parameter(body))
|
|
149
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
150
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
151
|
+
.response(new_response_handler
|
|
152
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
153
|
+
.deserialize_into(ActOnAssistantActionResponse.method(:from_hash))
|
|
154
|
+
.is_api_response(true))
|
|
155
|
+
.execute
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Returns a single assistant chat message by id. Poll after a POST that
|
|
159
|
+
# returned `messageId` until `status` is `succeeded`, `failed`, or
|
|
160
|
+
# `cancelled`. Also supported for `USER` messages (which reach terminal
|
|
161
|
+
# state as soon as they're accepted).
|
|
162
|
+
# @param [String] message_id Required parameter: The assistant message id
|
|
163
|
+
# (e.g. `vg_mesg_...`) returned by an assistant POST.
|
|
164
|
+
# @param [String] authorization Required parameter: API key from
|
|
165
|
+
# [app.videogen.io/api](https://app.videogen.io/api). The full key is only
|
|
166
|
+
# shown once when you create it.
|
|
167
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
168
|
+
def get_assistant_message(message_id,
|
|
169
|
+
authorization)
|
|
170
|
+
@api_call
|
|
171
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
172
|
+
'/v1/assistant-messages/{messageId}',
|
|
173
|
+
Server::DEFAULT)
|
|
174
|
+
.template_param(new_parameter(message_id, key: 'messageId')
|
|
175
|
+
.is_required(true)
|
|
176
|
+
.should_encode(true))
|
|
177
|
+
.header_param(new_parameter(authorization, key: 'Authorization')
|
|
178
|
+
.is_required(true))
|
|
179
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
180
|
+
.response(new_response_handler
|
|
181
|
+
.deserializer(proc do |response, should_symbolize|
|
|
182
|
+
APIHelper.deserialize_union_type(
|
|
183
|
+
UnionTypeLookUp.get(:AssistantMessage2),
|
|
184
|
+
response, should_symbolize, true
|
|
185
|
+
)
|
|
186
|
+
end)
|
|
187
|
+
.is_api_response(true))
|
|
188
|
+
.execute
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# BaseApi.
|
|
8
|
+
class BaseApi
|
|
9
|
+
include CoreLibrary
|
|
10
|
+
attr_accessor :config, :http_call_back
|
|
11
|
+
|
|
12
|
+
def self.user_agent
|
|
13
|
+
'Ruby-SDK/0.0.1 (OS: {os-info}, Engine: {engine}/{engine-version})'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.user_agent_parameters
|
|
17
|
+
{
|
|
18
|
+
'{engine}' => { 'value' => RUBY_ENGINE, 'encode' => false },
|
|
19
|
+
'{engine-version}' => { 'value' => RUBY_ENGINE_VERSION, 'encode' => false },
|
|
20
|
+
'{os-info}' => { 'value' => RUBY_PLATFORM, 'encode' => false }
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
GLOBAL_ERRORS = {
|
|
25
|
+
'default' => ErrorCase.new
|
|
26
|
+
.error_message('HTTP response not OK.')
|
|
27
|
+
.exception_type(APIException)
|
|
28
|
+
}.freeze
|
|
29
|
+
|
|
30
|
+
# Initialization constructor.
|
|
31
|
+
# @param [GlobalConfiguration] global_configuration The instance of GlobalConfiguration.
|
|
32
|
+
def initialize(global_configuration)
|
|
33
|
+
@global_configuration = global_configuration
|
|
34
|
+
@config = @global_configuration.client_configuration
|
|
35
|
+
@http_call_back = @config.http_callback
|
|
36
|
+
@api_call = ApiCall.new(@global_configuration)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Creates a new instance of the request builder.
|
|
40
|
+
# @param [String] http_method The HTTP method to use in the request.
|
|
41
|
+
# @param [String] path The endpoint path to use in the request.
|
|
42
|
+
# @param [String] server The server to extract the base uri for the request.
|
|
43
|
+
# @return [RequestBuilder] The instance of RequestBuilder.
|
|
44
|
+
def new_request_builder(http_method, path, server)
|
|
45
|
+
RequestBuilder.new
|
|
46
|
+
.http_method(http_method)
|
|
47
|
+
.path(path)
|
|
48
|
+
.server(server)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Creates a new instance of the response handler.
|
|
52
|
+
# @return [ResponseHandler] The instance of ResponseHandler.
|
|
53
|
+
def new_response_handler
|
|
54
|
+
ResponseHandler.new
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Creates a new instance of the parameter.
|
|
58
|
+
# @param [String|optional] key The key of the parameter.
|
|
59
|
+
# @param [Object] value The value of the parameter.
|
|
60
|
+
# @return [Parameter] The instance of Parameter.
|
|
61
|
+
def new_parameter(value, key: nil)
|
|
62
|
+
Parameter.new
|
|
63
|
+
.key(key)
|
|
64
|
+
.value(value)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|