Class: RunApi::Hailuo::Client
- Inherits:
-
Object
- Object
- RunApi::Hailuo::Client
- Defined in:
- lib/runapi/hailuo/client.rb
Instance Attribute Summary collapse
-
#image_to_video ⇒ Object
readonly
Returns the value of attribute image_to_video.
-
#text_to_video ⇒ Object
readonly
Returns the value of attribute text_to_video.
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.
8 9 10 11 12 13 14 15 16 |
# File 'lib/runapi/hailuo/client.rb', line 8 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) @image_to_video = Resources::ImageToVideo.new(http) end |
Instance Attribute Details
#image_to_video ⇒ Object (readonly)
Returns the value of attribute image_to_video.
6 7 8 |
# File 'lib/runapi/hailuo/client.rb', line 6 def image_to_video @image_to_video end |
#text_to_video ⇒ Object (readonly)
Returns the value of attribute text_to_video.
6 7 8 |
# File 'lib/runapi/hailuo/client.rb', line 6 def text_to_video @text_to_video end |