https://github.com/mrdotb/ex_imaginary
:zap: An Elixir client library for generating image URLs for imaginary.
https://github.com/mrdotb/ex_imaginary
Last synced: 3 months ago
JSON representation
:zap: An Elixir client library for generating image URLs for imaginary.
- Host: GitHub
- URL: https://github.com/mrdotb/ex_imaginary
- Owner: mrdotb
- License: mit
- Created: 2022-01-01T15:36:27.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-20T10:29:44.000Z (over 3 years ago)
- Last Synced: 2025-02-27T01:58:04.445Z (4 months ago)
- Language: Elixir
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ExImaginary
> An Elixir client library for generating image URLs for [imaginary](https://github.com/h2non/imaginary)[](https://github.com/mrdotb/ex_imaginary/actions/workflows/ci.yml)
[](https://hex.pm/packages/ex_imaginary)
[](https://hexdocs.pm/ex_imaginary/)
[](https://hex.pm/packages/ex_imaginary)
[](https://github.com/mrdotb/ex_imaginary/blob/master/LICENSE.md)
[](https://github.com/mrdotb/ex_imaginary/commits/master)- [Installation](#installation)
- [Documentation](#documentation)
- [Configuration](#configuration)
- [Usage](#usage)## Installation
ex_imaginary is [available in Hex](https://hex.pm/packages/ex_imaginary), the package can be
installed as:Add `:ex_imaginary` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:ex_imaginary, "~> 0.1.0"}
]
end
```## Documentation
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.
```elixir
url = ExImaginary.url "/thumbnail", %{url: "https://raw.githubusercontent.com/mrdotb/i/master/mcdo.jpg"}
```Check [imaginary documentation](https://github.com/h2non/imaginary) to see all the supported path.