Class: RunApi::Midjourney::Resources::GetSeed

Inherits:
Object
  • Object
show all
Includes:
Core::ResourceHelpers
Defined in:
lib/runapi/midjourney/resources/get_seed.rb

Overview

Looks up the seed for an account-owned generated image.

Constant Summary collapse

ENDPOINT =
"/api/v1/midjourney/get_seed"
RESPONSE_CLASS =
Types::GetSeedResponse

Instance Method Summary collapse

Constructor Details

#initialize(http) ⇒ GetSeed

Returns a new instance of GetSeed.



13
# File 'lib/runapi/midjourney/resources/get_seed.rb', line 13

def initialize(http) = (@http = http)

Instance Method Details

#run(options: nil, **params) ⇒ Object



15
16
17
18
19
# File 'lib/runapi/midjourney/resources/get_seed.rb', line 15

def run(options: nil, **params)
  params = compact_params(params)
  validate_contract!(CONTRACT["get-seed"], params)
  request(:post, ENDPOINT, body: params, options: options)
end