Skip to content

Instantly share code, notes, and snippets.

@halvardos
Created March 9, 2017 11:12
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/58aeacb802af462c35452eeba16d1966 to your computer and use it in GitHub Desktop.
Save halvardos/58aeacb802af462c35452eeba16d1966 to your computer and use it in GitHub Desktop.
import Synq from 'synq'
const api = new Synq('process.env.SYNQ_API_KEY', 'https://api.synq.fm/v1/');
const video_id = '0c19b46991ae49be994cec9f3909329a';
api.video.details(video_id)
.then((videoObject) => {
console.log('Videoplayer:', videoObject.player.embed_url);
console.log('Views:', videoObject.player.views);
console.log('Thumbnail:', videoObject.player.thumbnail_url);
})
.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