Socket
Socket
Sign inDemoInstall

mediaflow

Package Overview
Dependencies
10
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mediaflow

Mediaflow client


Version published
Weekly downloads
2
Maintainers
1
Install size
758 kB
Created
Weekly downloads
 

Readme

Source

Mediaflow.js

Build Status

Mediaflow Node + Browser JavaScript implementation

Usage

var Mediaflow = require('mediaflow')
var mf = new Mediaflow('my.mediaflow.host.com')
mf.auth(username, apiKey) // Optional

mf.search('foobar').then(function(data) {
    console.log('Got', data.total, 'search results', data.media)
})

// Upload media in Node.js
// Requires `auth` to be called prior
// When passing a readstream you also need to specify
// a name of your file!
var options = {
    name: 'image.jpg',
    tags: ['foo', 'bar']
}
mf.upload(fs.createReadStream(filepath), options)
.then(function(media) {
  console.log('Media successfully uploaded', media)
})
.catch(function(err) {
  console.log('Got err', err)
})

// Load existing media
mf.media(mediaId).then(function(media) {
  console.log('Media details', media)
})

Node style callbacks are also supported.

Roadmap

  • Get single media
  • Search medias
  • Signed requests as well as anonymous
  • Upload support
  • Set up Travis-CI
  • Promises based API
  • Set up tests to run in browser environments
  • Investigate providing as package for everything: npm + bower + amd + ES6

Keywords

FAQs

Last updated on 19 Aug 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc