View Source ExImaginary
An Elixir client library for generating image URLs for imaginary
Installation
ex_imaginary is available in Hex, the package can be installed as:
Add :ex_imaginary to your list of dependencies in mix.exs:
def deps do
[
{:ex_imaginary, "~> 0.1.0"}
]
endDocumentation
The source is really small so reading through it should be straight-forward but the full package documentation is available at https://hexdocs.pm/ex_imaginary
Configuration
To use the library you have to configure your imaginary domain and secure token or
pass them as an options map %{domain: "domain", token: "token"} as the
third parameter to ExImaginary.url/3.
See config/test.exs for an example of how to configure this.
Usage
Create a thumbnail image.
url = ExImaginary.url "/thumbnail", %{url: "https://raw.githubusercontent.com/mrdotb/i/master/mcdo.jpg"}Check imaginary documentation to see all the supported path.