Skip to content

Instantly share code, notes, and snippets.

@josephholsten
Created February 17, 2009 02:38
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 josephholsten/65544 to your computer and use it in GitHub Desktop.
Save josephholsten/65544 to your computer and use it in GitHub Desktop.
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