Skip to content

Instantly share code, notes, and snippets.

@stepchud
Last active August 29, 2015 14:16
Show Gist options
  • Save stepchud/3e8a04744c40d254bcad to your computer and use it in GitHub Desktop.
Save stepchud/3e8a04744c40d254bcad to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="https://www.dropbox.com/s/l6hgjq7mh52o6od/spiceworks-sdk.js?dl=1&raw=1" 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>
<p>So what you tryna do.</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment