Class: RunApi::Midjourney::Client

Inherits:
Core::Client
  • Object
show all
Defined in:
lib/runapi/midjourney/client.rb

Overview

Midjourney image generation, editing, image-to-video, and helper client.

Instance Attribute Summary collapse

Instance Method Summary collapse

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, **options)
  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_imageObject (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_seedObject (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_promptObject (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_videoObject (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_promptObject (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_imageObject (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