Class: RunApi::Kling::Client
- Inherits:
-
Object
- Object
- RunApi::Kling::Client
- Defined in:
- lib/runapi/kling/client.rb
Overview
Kling video generation API client.
Instance Attribute Summary collapse
-
#ai_avatar ⇒ Resources::AiAvatar
readonly
AI avatar generation operations.
-
#image_to_video ⇒ Resources::ImageToVideo
readonly
Image-to-video operations.
-
#motion_control ⇒ Resources::MotionControl
readonly
Motion control operations.
-
#text_to_video ⇒ Resources::TextToVideo
readonly
Text-to-video operations.
Instance Method Summary collapse
-
#initialize(api_key: nil, **options) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(api_key: nil, **options) ⇒ Client
Returns a new instance of Client.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/runapi/kling/client.rb', line 22 def initialize(api_key: nil, **) @api_key = Core::Auth.resolve_api_key(api_key) = Core::ClientOptions.new(api_key: @api_key, **) http = .http_client || Core::HttpClient.new() @text_to_video = Resources::TextToVideo.new(http) @ai_avatar = Resources::AiAvatar.new(http) @image_to_video = Resources::ImageToVideo.new(http) @motion_control = Resources::MotionControl.new(http) end |
Instance Attribute Details
#ai_avatar ⇒ Resources::AiAvatar (readonly)
Returns AI avatar generation operations.
16 17 18 |
# File 'lib/runapi/kling/client.rb', line 16 def ai_avatar @ai_avatar end |
#image_to_video ⇒ Resources::ImageToVideo (readonly)
Returns Image-to-video operations.
18 19 20 |
# File 'lib/runapi/kling/client.rb', line 18 def image_to_video @image_to_video end |
#motion_control ⇒ Resources::MotionControl (readonly)
Returns Motion control operations.
20 21 22 |
# File 'lib/runapi/kling/client.rb', line 20 def motion_control @motion_control end |
#text_to_video ⇒ Resources::TextToVideo (readonly)
Returns Text-to-video operations.
14 15 16 |
# File 'lib/runapi/kling/client.rb', line 14 def text_to_video @text_to_video end |