Class: RunApi::HappyHorse::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/runapi/happyhorse/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key: nil, **options) ⇒ Client

Returns a new instance of Client.



8
9
10
11
12
13
14
15
16
17
# File 'lib/runapi/happyhorse/client.rb', line 8

def initialize(api_key: nil, **options)
  @api_key = Core::Auth.resolve_api_key(api_key)

  client_options = Core::ClientOptions.new(api_key: @api_key, **options)
  http = client_options.http_client || Core::HttpClient.new(client_options)
  @text_to_video = Resources::TextToVideo.new(http)
  @image_to_video = Resources::ImageToVideo.new(http)
  @reference_to_video = Resources::ReferenceToVideo.new(http)
  @edit_video = Resources::EditVideo.new(http)
end

Instance Attribute Details

#edit_videoObject (readonly)

Returns the value of attribute edit_video.



6
7
8
# File 'lib/runapi/happyhorse/client.rb', line 6

def edit_video
  @edit_video
end

#image_to_videoObject (readonly)

Returns the value of attribute image_to_video.



6
7
8
# File 'lib/runapi/happyhorse/client.rb', line 6

def image_to_video
  @image_to_video
end

#reference_to_videoObject (readonly)

Returns the value of attribute reference_to_video.



6
7
8
# File 'lib/runapi/happyhorse/client.rb', line 6

def reference_to_video
  @reference_to_video
end

#text_to_videoObject (readonly)

Returns the value of attribute text_to_video.



6
7
8
# File 'lib/runapi/happyhorse/client.rb', line 6

def text_to_video
  @text_to_video
end