Last active
March 13, 2017 09:31
-
-
Save halvardos/5ae2291861298003363ba48423f3a8bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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