Skip to content

Commit

Permalink
add prototype simulate link button press func
Browse files Browse the repository at this point in the history
  • Loading branch information
insanj authored Oct 5, 2018
1 parent 48c09e5 commit 911564b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions RockerObjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,20 @@ class RockerNetworker {
}
});
}

pressLinkButton(bridgeUsername) {
var linkButtonLocation = this.config.authLocation + "/api/" + bridgeUsername + "/config";
var linkButtonBody = {"linkbutton": true};
var linkButtonString = JSON.stringify(linkButtonBody);

$.ajax({
url: linkButtonLocation,
data: linkButtonString,
method: "PUT",
complete: function (data) {
rocker_log("Attempted to press link button! " + data);
}
});
}
}

0 comments on commit 911564b

Please sign in to comment.