Manhwa.GifProvider behaviour (manhwa v0.1.1)

Copy Markdown View Source

Optional adapter backing the annotation composer's GIF picker. When unconfigured the GIF button doesn't render.

config :manhwa, gif_provider: MyApp.ReaderGifs

Results are returned to the client as %{data: gifs} — shape them however your picker JS expects (the built-in composer expects Giphy-style entries with images.fixed_width.url etc.).

Summary

Callbacks

search(query, opts)

@callback search(query :: String.t(), opts :: keyword()) ::
  {:ok, list()} | {:error, term()}

trending(opts)

@callback trending(opts :: keyword()) :: {:ok, list()} | {:error, term()}