Skip to content

Instantly share code, notes, and snippets.

@laughingturtle
Created January 5, 2019 06:49
Show Gist options
  • Select an option

  • Save laughingturtle/e98a8886d44dc9c50089da62714b718d to your computer and use it in GitHub Desktop.

Select an option

Save laughingturtle/e98a8886d44dc9c50089da62714b718d to your computer and use it in GitHub Desktop.

Revisions

  1. laughingturtle created this gist Jan 5, 2019.
    32 changes: 32 additions & 0 deletions index.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    /*
    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));
    });
    };
    */