mediacrush

0.1.2 • Public • Published

node-mediacrush

Build Status Dependency Status

MediaCrush API wrapper.

Example

var mediacrush = require('mediacrush');
 
mediacrush.getInfo('kmopZLGFVRYs', function(error, data) {
  if (error) {
    throw error;
  }
 
  // => {
  // =>   "blob_type": "image",
  // =>   "compression": 1,
  // =>   "extras": [],
  // =>   "files": [
  // =>     {
  // =>       "file": "/kmopZLGFVRYs.png",
  // =>       "type": "image/png",
  // =>       "url": "https://cdn.mediacru.sh/kmopZLGFVRYs.png"
  // =>     }
  // =>   ],
  // =>   "flags": {},
  // =>   "hash": "kmopZLGFVRYs",
  // =>   "metadata": {
  // =>     "dimensions": {
  // =>       "height": 2000,
  // =>       "width": 2000
  // =>     }
  // =>   },
  // =>   "original": "/kmopZLGFVRYs.png",
  // =>   "type": "image/png"
  // => }
});

Installation

$ npm install mediacrush

API

var mediacrush = require('mediacrush');

mediacrush.createAlbum(hashes, callback)

Takes an Array of MediaCrush hashes and groups them into an album on MediaCrush. Calls callback(error, response) when response returns.

mediacrush.getInfo(hash, callback)

Gets information on String or Array hash from MediaCrush and calls callback(error, response).

mediacrush.uploadURL(url, callback)

Uploads the image found at String url to MediaCrush and calls callback(error, response).

Readme

Keywords

Package Sidebar

Install

npm i mediacrush

Weekly Downloads

2

Version

0.1.2

License

MIT

Last publish

Collaborators

  • kenan