Code Monkey home page Code Monkey logo

movideo-web-sdk's Introduction

Movideo Web SDK

Movideo's Media API allows developers to interact with the platform through web-services. The API's are based on the REST principles. Where each request can be an HTTP POST or GET, and the response is a gzipped content (If client specified that gzip is supported in its HTTP Headers).

Installation

npm install movideo-web-sdk

API Overview

Every resource is accessed via your movideo instance:

var movideo = require('movideo-web-sdk')('key', 'alias');
// movideo.{ RESOURCE }.{ METHOD }

Every resource method accepts an optional callback as the last argument:

movideo.media.retrieve(80254, function(error, media) {
  error; // null if no error occured
  media; // the media object
});

Additionally, every resource method returns a promise, so you don't have to use the regular callback:

movideo.media.retrieve(80254)
.then(function(media) {
  return media;
}, function(error) {
  // deal with an error
});

Available resources & methods

Where you see params it is a plain JavaScript object, e.g. { email: '[email protected]' }

  • application
  • retrieve()
  • media
  • retrieve(id[, params])
  • daily([params])
  • weekly([params])
  • monthly([params])
  • cuepoints(id)
  • images(id)
  • related(id[, params])
  • total()
  • playlist
  • retrieve(id[, params])
  • media(id[, params])
  • images(id)
  • playlists(id[, params])
  • root([id, params])
  • tag
  • search(tag[, params])
  • profile(tagId)
  • profileSearch(keyword[, params])
  • session
  • get(key, alias)

Configuration

Avaliable methods

  • Movideo.setHost(host);
  • Movideo.setPost(port);
  • Movideo.setAlias(alias);
  • Movideo.setKey(key);
  • Movideo.setTimeout(ms); (default is node's default: 120000ms)
  • Movideo.setFormat(json/xml);
  • Movideo.setToken(token);

Development

To run the tests you'll need a Movideo Test API key (from your Movideo Dashboard):

$ npm install -g mocha
$ npm test

Author

Originally by Milos Dakic ([email protected]). Development was sponsored by Authentic Entertainment.

movideo-web-sdk's People

Contributors

milosdakic avatar

Stargazers

 avatar

Watchers

Scott G avatar James Cloos avatar Patrick Smith avatar Rajitha Ranawaka avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.