# ember-imgur

> Service allowing your to upload and get images from Imgur using EmberJS

Latest version **0.1.0** (published 2016-02-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-imgur
pnpm add ember-imgur
yarn add ember-imgur
bun add ember-imgur
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2016-02-08 |
| First published | 2016-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Alexis Mangin |
| Maintainers | alexmngn |
| Keywords | ember-addon, ember, ember-cli, imgur |

## Links

- npm: https://www.npmjs.com/package/ember-imgur
- Repository: https://github.com/alexmngn/ember-imgur
- Issues: https://github.com/alexmngn/ember-imgur/issues
- npm.io page: https://npm.io/package/ember-imgur

## Dependencies (2)

- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^5.1.5
- [ember-get-config](https://npm.io/package/ember-get-config.md) 0.0.2

## Recent versions

- 0.1.0 (latest) — 2016-02-08

## README

# Ember-imgur [![Build Status](https://travis-ci.org/alexmngn/ember-imgur.png?branch=master)](https://travis-ci.org/alexmngn/ember-imgur)

This Ember Service allows you to upload and get images from imgur.

## Installation

```
ember install ember-imgur
```

## How to use it

Setup your Client-ID in the `config/environment.js` file of your project.

```javascript
var ENV = {
    imgur: {
      clientId: 'YOUR_ID'
    }
};
```

Then, simply inject the service in your controller or anything else.

```javascript
export default Ember.Controller.extend({
	imgur: Ember.inject.service()
});

```

### Post an image

`imageData` is the base64 representation of the image. It shouldn't include the `data:image/png;base64,` prefix. You can also pass an URL.

```javascript
this.get('imgur').imagePost(imageData).then((result) => {
	//Result from imgur
}).catch((result) => {
	//Error
});
```

### Get an image

```javascript
this.get('imgur').imageGet(imageId).then((result) => {
	//Result from imgur
}).catch((result) => {
	//Error
});
```

Feel free to implement additional features to this addon.

---
_Source: https://npm.io/package/ember-imgur · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
