https://github.com/socialpaymentsbv/cloudini
Cloudinary client for Elixir
https://github.com/socialpaymentsbv/cloudini
api-client hex-package
Last synced: 7 months ago
JSON representation
Cloudinary client for Elixir
- Host: GitHub
- URL: https://github.com/socialpaymentsbv/cloudini
- Owner: socialpaymentsbv
- License: other
- Created: 2016-05-30T07:42:26.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-09-20T04:38:01.000Z (over 7 years ago)
- Last Synced: 2025-10-21T14:56:20.906Z (7 months ago)
- Topics: api-client, hex-package
- Language: Elixir
- Size: 64.5 KB
- Stars: 3
- Watchers: 5
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloudini

Wrapper client library for [Cloudinary API](http://cloudinary.com).
For the time being, only image upload and deletion are supported.
## Installation
The package can be installed in a following steps:
1. Add `cloudini` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:cloudini, "~> 1.0"}]
end
```
2. Ensure `cloudini` is started before your application:
```elixir
def application do
[applications: [:cloudini]]
end
```
3. Configure cloudini in `config/config.exs`:
```elixir
config :cloudini,
name: "CLOUDINARYNAME",
api_key: "APIKEY",
api_secret: "APISECRET"
```
## Usage
Basic Cloudindary API usage:
```elixir
client = Cloudini.new
Cloudini.upload_image(client, "fixture/upload/test.gif", public_id: "image_id")
# {:ok, %{"public_id" => "image_id", ...}}
Cloudini.delete_image(client, "image_id")
# {:ok, %{"result" => "ok"}}
```
Helpers for building URLs:
* `fetch_url(client, "http://picture.from.internet.to.fetch.by.cloudinary.gif")`
* `transform_url(client, "http://res.cloudinary.com/...", mode: "fill", width: 200)`