Created
March 1, 2015 04:09
-
-
Save crowelch/2f285be83aa8b7a61fd1 to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* Welcome to Pebble.js! | |
* | |
* This is where you write your app. | |
*/ | |
var UI = require('ui'); | |
var Settings = require('settings'); | |
var main = new UI.Card({ | |
title: 'Pebble.js', | |
icon: 'images/menu_icon.png', | |
subtitle: 'Hello World!', | |
body: 'Press any button.' | |
}); | |
main.show(); | |
// Set a configurable with just the close callback | |
Settings.config( | |
{ url: 'https://salty-sea-3552.herokuapp.com/' }, | |
function(e) { | |
console.log('closed configurable'); | |
// Show the parsed response | |
console.log(JSON.stringify(e.options)); | |
// Show the raw response if parsing failed | |
if (e.failed) { | |
console.log(e.response); | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment