https://github.com/shdblowers/imgurex
Adapter for Imgur API
https://github.com/shdblowers/imgurex
elixir imgur-api
Last synced: 13 days ago
JSON representation
Adapter for Imgur API
- Host: GitHub
- URL: https://github.com/shdblowers/imgurex
- Owner: shdblowers
- License: mit
- Created: 2016-12-03T18:36:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-07T19:25:18.000Z (about 9 years ago)
- Last Synced: 2025-12-27T01:59:03.569Z (5 months ago)
- Topics: elixir, imgur-api
- Language: Elixir
- Homepage:
- Size: 111 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Imgurex
[](https://travis-ci.org/shdblowers/imgurex)
[](https://coveralls.io/github/shdblowers/imgurex?branch=master)
[](https://ebertapp.io/github/shdblowers/imgurex)
**Adapter for Imgur API**
Imgur is an online image hosting and sharing community. The aim of this package is to allow Elixir users to be able to easily interact with the Imgur API.
[Imgur API Documentation](https://api.imgur.com/)
## Getting Started
In order to start using the API you need to register in order to receive a client id and client secret. This can be done on the [Register an Application](https://api.imgur.com/oauth2/addclient?) page on the Imgur website.
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed by adding `imgurex` to your list of dependencies:
```elixir
def deps do
[{:imgurex, "~> 0.1.0"}]
end
```
You will also need to set your client id in config:
```elixir
use Mix.Config
config :imgurex,
client_id: "dNqgBNYyLAmmMAx"
```
## Usage
### Image
#### Getting Image Information
```elixir
iex> image_id = "THE IMAGE'S ID"
iex> Imgurex.Image.info(image_id)
%Imgurex.Image{ ... }
```
#### Uploading an Anonymous Image
```elixir
iex> Imgurex.Image.upload("test/imgurex/test_image.jpeg")
%Imgurex.Image{ ... }
```
### Album
#### Creating an Anonymous Album
```elixir
iex> Imgurex.Album.create(client_id)
%Imgurex.Album{ ... }
```