Created
January 5, 2019 06:49
-
-
Save laughingturtle/e98a8886d44dc9c50089da62714b718d to your computer and use it in GitHub Desktop.
API call options / rough
This file contains hidden or 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
| /* | |
| 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)); | |
| }); | |
| }; | |
| */ |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Server folder
https://github.com/laughingturtle/friends-activity/blob/master/server/index.js