<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,4 @@
-[% INCLUDE header.tt %]
+[% INCLUDE header.tt need_api=1 %]
 &lt;div class=&quot;event&quot;&gt;
   There is now an API available for EventBot.
   &lt;br/&gt;
@@ -8,5 +8,35 @@
     &lt;li&gt;/api/election_candidates&lt;/li&gt;
   &lt;/ul&gt;
   Both return data in JSON format.
+&lt;br/&gt;&lt;br/&gt;
+
+    Current events:&lt;br/&gt;
+    &lt;div id='events'&gt;
+    This is a demonstration of the AJAX API.&lt;br/&gt;
+    Press button to update..
+    &lt;/div&gt;
+    &lt;br/&gt;
+    &lt;input type='button' name='update' id='update_events' value=&quot;Update&quot; /&gt;
+
 &lt;/div&gt;
+
+&lt;script type='text/javascript'&gt;
+  $(function(){
+    $('#update_events').click(function(){
+        eventbot.current_events(
+          function(result) {
+            $('#events').text('');
+            $.each(result, function(i,item){
+                var event = $(&quot;&lt;a/&gt;&quot;);
+                event.attr('href', eventbot.event_url_from_id(item.id));
+                event.text(item.place);
+                event.appendTo('#events');
+                $(&quot;&lt;br/&gt;&quot;).appendTo('#events');
+            });
+          }
+        );
+    });
+  });
+&lt;/script&gt;
+
 [% INCLUDE footer.tt %]</diff>
      <filename>root/api/api_info.tt</filename>
    </modified>
    <modified>
      <diff>@@ -4,11 +4,14 @@
   &lt;head&gt;
     &lt;title&gt;[% title || 'EventBot' %]&lt;/title&gt;
     &lt;link href=&quot;[% base %]static/main.css&quot; type=&quot;text/css&quot; rel=&quot;stylesheet&quot; /&gt;
-    &lt;script type=&quot;text/javascript&quot; src=&quot;[% base %]static/jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
+    &lt;script type=&quot;text/javascript&quot; src=&quot;/static/jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
 [% IF need_datepicker %]
-    &lt;link type=&quot;text/css&quot; href=&quot;[% base %]static/ui/ui.all.css&quot; rel=&quot;stylesheet&quot; /&gt;
-    &lt;script type=&quot;text/javascript&quot; src=&quot;[% base %]static/ui/ui.core.js&quot;&gt;&lt;/script&gt;
-    &lt;script type=&quot;text/javascript&quot; src=&quot;[% base %]static/ui/ui.datepicker.js&quot;&gt;&lt;/script&gt;
+    &lt;link type=&quot;text/css&quot; href=&quot;/static/ui/ui.all.css&quot; rel=&quot;stylesheet&quot; /&gt;
+    &lt;script type=&quot;text/javascript&quot; src=&quot;/static/ui/ui.core.js&quot;&gt;&lt;/script&gt;
+    &lt;script type=&quot;text/javascript&quot; src=&quot;/static/ui/ui.datepicker.js&quot;&gt;&lt;/script&gt;
+[% END %]
+[% IF need_api %]
+    &lt;script type=&quot;text/javascript&quot; src=&quot;/static/eventbot-api.js&quot;&gt;&lt;/script&gt;
 [% END %]
   &lt;/head&gt;
   &lt;body&gt;</diff>
      <filename>root/header.tt</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8da54514fe3e19daca1120b60901bf4de565af97</id>
    </parent>
  </parents>
  <author>
    <name>Toby Corkindale</name>
    <email>tjc@wintrmute.net</email>
  </author>
  <url>http://github.com/TJC/EventBot/commit/f962d0025ec637384d9ddab485af7d4bb564c702</url>
  <id>f962d0025ec637384d9ddab485af7d4bb564c702</id>
  <committed-date>2009-10-21T20:08:12-07:00</committed-date>
  <authored-date>2009-10-21T20:08:12-07:00</authored-date>
  <message>Improve API info to include live demo.</message>
  <tree>8e649c6794a0cfc839a9af80ebc06ee3db911bab</tree>
  <committer>
    <name>Toby Corkindale</name>
    <email>tjc@wintrmute.net</email>
  </committer>
</commit>
