Class: RunApi::Midjourney::Client
- Inherits:
-
Core::Client
- Object
- Core::Client
- RunApi::Midjourney::Client
- Defined in:
- lib/runapi/midjourney/client.rb
Overview
Midjourney image generation, editing, image-to-video, and helper client.
Instance Attribute Summary collapse
-
#edit_image ⇒ Object
readonly
Returns the value of attribute edit_image.
-
#get_seed ⇒ Object
readonly
Returns the value of attribute get_seed.
-
#image_to_prompt ⇒ Object
readonly
Returns the value of attribute image_to_prompt.
-
#image_to_video ⇒ Object
readonly
Returns the value of attribute image_to_video.
-
#shorten_prompt ⇒ Object
readonly
Returns the value of attribute shorten_prompt.
-
#text_to_image ⇒ Object
readonly
Returns the value of attribute text_to_image.
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.
9 10 11 12 13 14 15 16 17 |
# File 'lib/runapi/midjourney/client.rb', line 9 def initialize(api_key: nil, **) super @text_to_image = Resources::TextToImage.new(http) @edit_image = Resources::EditImage.new(http) @image_to_video = Resources::ImageToVideo.new(http) @image_to_prompt = Resources::ImageToPrompt.new(http) @shorten_prompt = Resources::ShortenPrompt.new(http) @get_seed = Resources::GetSeed.new(http) end |
Instance Attribute Details
#edit_image ⇒ Object (readonly)
Returns the value of attribute edit_image.
7 8 9 |
# File 'lib/runapi/midjourney/client.rb', line 7 def edit_image @edit_image end |
#get_seed ⇒ Object (readonly)
Returns the value of attribute get_seed.
7 8 9 |
# File 'lib/runapi/midjourney/client.rb', line 7 def get_seed @get_seed end |
#image_to_prompt ⇒ Object (readonly)
Returns the value of attribute image_to_prompt.
7 8 9 |
# File 'lib/runapi/midjourney/client.rb', line 7 def image_to_prompt @image_to_prompt end |
#image_to_video ⇒ Object (readonly)
Returns the value of attribute image_to_video.
7 8 9 |
# File 'lib/runapi/midjourney/client.rb', line 7 def image_to_video @image_to_video end |
#shorten_prompt ⇒ Object (readonly)
Returns the value of attribute shorten_prompt.
7 8 9 |
# File 'lib/runapi/midjourney/client.rb', line 7 def shorten_prompt @shorten_prompt end |
#text_to_image ⇒ Object (readonly)
Returns the value of attribute text_to_image.
7 8 9 |
# File 'lib/runapi/midjourney/client.rb', line 7 def text_to_image @text_to_image end |