Skip to content

Instantly share code, notes, and snippets.

@laughingturtle
Created January 5, 2019 06:49
Show Gist options
  • Save laughingturtle/e98a8886d44dc9c50089da62714b718d to your computer and use it in GitHub Desktop.
Save laughingturtle/e98a8886d44dc9c50089da62714b718d to your computer and use it in GitHub Desktop.
API call options / rough
/*
Had crazy challenges setting up earlier version of mysql on older machine (2 days faffing around), while laptop is fixed, oy vey.
Anyhow, so I have not been able to actually test these, they're kind of roughed out options right now...
*/
var playSong = (id) => {
request('/* Jared/s Audio Player link*/' + id, function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log('success');
} else {
console.log('error connecting to player API:', error);
}
})
};
/*
var playSongTwo = ({id}, callback) => {
// TODO
$.get('Jared/s Audio Player link', {
id: id
})
.done(({items}) => {
if (callback) {
callback(items);
}
})
.fail(({responseJSON}) => {
responseJSON.error.forEach((err) => console.error(err));
});
};
*/
@laughingturtle
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment