Class: ReveAI::Resources::Effects
- Defined in:
- lib/reve_ai/resources/effects.rb
Overview
The list returns effect names only — effect parameter definitions are not included. Configure effect presets in the Reve application, save them with a name, and apply that name from the API.
Effects listing operations.
Lists the effects available to the project associated with the API key,
including saved project effects and built-in presets. Names from this
list can be applied to any generation via the postprocessing parameter
of the image resources (see Images#create).
Constant Summary collapse
- LIST_ENDPOINT =
Returns API endpoint for listing effects.
"/v1/image/effect"- VALID_SOURCES =
Returns Valid values for the
sourcefilter. %w[all project preset].freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#list(source: nil, breadcrumb: nil) ⇒ Response
Lists effects available to the project.
Methods inherited from Base
Constructor Details
This class inherits a constructor from ReveAI::Resources::Base
Instance Method Details
#list(source: nil, breadcrumb: nil) ⇒ Response
Lists effects available to the project.
The default response includes both saved project effects (+source+
"saved") and built-in presets (+source+ "builtin"). Each entry in
body[:effects] carries name and source, plus optional
description and category (e.g., "color", "textures") when
available. Use a returned name as effect_name in postprocessing
requests.
59 60 61 62 63 64 65 66 67 |
# File 'lib/reve_ai/resources/effects.rb', line 59 def list(source: nil, breadcrumb: nil) validate_source!(source) params = {} params[:source] = source if source params[:breadcrumb] = if get(LIST_ENDPOINT, params: params.empty? ? nil : params) end |