4.2.1 • Published 8 years ago

imgur-uploader v4.2.1

Weekly downloads
131
License
MIT
Repository
github
Last release
8 years ago

imgur-uploader Build Status

Upload images to imgur

Install

$ npm install --save imgur-uploader

Usage

const fs = require('fs');
const imgurUploader = require('imgur-uploader');

imgurUploader(fs.readFileSync('cat.jpg'), {title: 'Hello!'}).then(data => {
	console.log(data);
	/*
	{
		id: 'OB74hEa',
		link: 'http://i.imgur.com/jbhDywa.jpg',
		title: 'Hello!',
		date: Sun May 24 2015 00:02:41 GMT+0200 (CEST),
		type: 'image/jpg',
		...
	}
	*/
});

API

imgurUploader(input, options)

input

Type: Buffer

Image to upload.

options

See the imgur options in addition to the ones below.

token

Type: string Default: Client-ID 34b90e75ab1c04b

Override the default authorization token (you probably want to).

Related

License

MIT © Kevin Martensson

4.2.1

8 years ago

4.2.0

8 years ago

4.1.0

9 years ago

4.0.0

9 years ago

3.0.0

10 years ago

2.0.0

10 years ago

1.3.1

10 years ago

1.3.0

10 years ago

1.2.0

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago