API documentation

RSS format

JSON format

For JSONP format, append ?callback=yourcallback
/**
 * Sample javascript code for drawing a donation graph.
 *
 * @requires
 * - jquery.js
 * - jquery.jqplot.js
 * - jqplot.dateAxisRenderer.js
 * - excanvas.js for IE < 9
 */
jQuery(document).ready(function($) {
  $.jqplot.config.enablePlugins = true;
  $.ajax({
    url: 'http://cha-ching.noisebridge.net/v1/donations/list/1m/json/noisetor',
    data: { },
    dataType: 'jsonp',
    cache: true,
    jsonpCallback: '_jqjsp',
    success: function(data) {
      var points = [[data.start, 0]];
      var total = 0;
      $.each(data.donations, function(i, donation) {
        total = total + donation.payment_gross;
        points.push([donation.payment_date, total]);
      });
      points.push([data.end, total]);
      var plot = $.jqplot('my-graph', [points], {
        axes: {
          xaxis: { renderer: $.jqplot.DateAxisRenderer, tickOptions: { formatString: '%#m/%#d/%y' }, autoscale: true },
          yaxis: { tickOptions: { formatString: '$%d' }, autoscale: true }
        },
        series: [{ fill: true, fillToZero: true, showMarker: false }],
      });
    }
  });
});