Skip to content

Instantly share code, notes, and snippets.

@halvardos
Last active March 13, 2017 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halvardos/5ae2291861298003363ba48423f3a8bd to your computer and use it in GitHub Desktop.
Save halvardos/5ae2291861298003363ba48423f3a8bd to your computer and use it in GitHub Desktop.
//import Synq from 'synq'; // if you transpile
const Synq = require('synq').default;
const api = new Synq(process.env.SYNQ_API_KEY, 'https://api.synq.fm/v1/');
api.video.create()
.then((videoObject) => {
console.log('Video object created successfully', videoObject)
return videoObject.video_id;
})
.then((video_id) => {
return api.video.uploader(video_id);
})
.then((uploader) => {
console.log('Success getting uploader:', uploader);
})
.catch((error) => {
console.log('Error: ', error.statusCode);
console.log(error.message);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment