Created
February 17, 2009 02:38
-
-
Save josephholsten/65544 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
APIKEY = "03724E57-E596-B87B-7CD1-585B3FD3AE99"; | |
CmdUtils.CreateCommand({ | |
name: "track", | |
homepage: "http://tracker.216brew.com/", | |
author: { name: "Joseph Anthony Pasquale Holsten", email: "joseph@josephholsten.com"}, | |
contributors: ["Joseph Anthony Pasquale Holsten"], | |
license: "MIT", | |
description: "Record your measurements to your <a href='http://tracker.216brew.com/'>Tracker</a>", | |
help: "Enter a record to track in natural language, amount type date", | |
takes: {message: noun_arb_text}, | |
preview: "Tracks a record to the 216 tracker", | |
execute: function(input) { | |
jQuery.ajax({ | |
url: "http://tracker.216brew.com/api/quick/"+APIKEY, | |
data: {message: input.text}, | |
dataType: "text", | |
cache: false, | |
error: function() { displayMessage("Tracking failed"); }, | |
success: function() { displayMessage("Message recorded"); } | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment