Skip to content

Instantly share code, notes, and snippets.

@babbtx
Last active August 29, 2015 14:14
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 babbtx/dab075639fef532d612a to your computer and use it in GitHub Desktop.
Save babbtx/dab075639fef532d612a to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="https://spiceworks.github.io/spiceworks-js-sdk/dist/spiceworks-sdk.js" type="text/javascript"></script>
<script src="https://code.jquery.com/jquery-2.1.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
var card = new SW.Card();
var inventory = card.services('inventory');
inventory.request('devices').then(function(data){
$.each(data.devices, function(index, device){
$('body').append('<p>' + device.name);
});
});
});
</script>
</head>
<body>
<h3>Hello world!</h3>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment