Skip to content

Instantly share code, notes, and snippets.

@hliyan
Created March 11, 2014 05:07
Show Gist options
  • Save hliyan/9479799 to your computer and use it in GitHub Desktop.
Save hliyan/9479799 to your computer and use it in GitHub Desktop.
Magpie init
magpie = include.magpie; // use the library identifer instead of 'include' if it's different
include.$db.set(ScriptDb.getMyDb()); // Magpie will use the spreadsheet's database
// this will create the Magpie menubar items
function onOpen() {
magpie.onOpen();
};
// this will run when you select Magpie > Update
// and once every hour
// replace the token with your own Github token
function update() {
magpie.update('43e200f4c7ec1a974182912a4cb7e3dc9ba95876'); // NOTE: replace!
}
// this will run when you select Magpie > Chart
function chart() {
magpie.viewChartPanel();
}
// don't use Magpie > Reset unless you want to clear the
// database and start over
function reset() {
magpie.reset();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment