<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;h1&gt;Intentions&lt;/h1&gt;
&lt;ul&gt;
	&lt;li&gt;Create a RESTful voting &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;The election results should be fully open and transparent&lt;/li&gt;
	&lt;li&gt;However, the &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; will not return actual results until the voting is finished &amp;#8211; the purpose being to prevent people from using current results to bias ongoing voting.&lt;/li&gt;
	&lt;li&gt;Client provides an identity string when a user votes&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; trusts the client&amp;#8217;s identity string&lt;/li&gt;
	&lt;li&gt;Client doesn&amp;#8217;t have to worry about details of how to count a ballot. It only passes it along.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To create an election, you must specify&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;a voting system&lt;/li&gt;
	&lt;li&gt;candidates for the election&lt;/li&gt;
	&lt;li&gt;when the voting starts&lt;/li&gt;
	&lt;li&gt;when the voting ends&lt;/li&gt;
	&lt;li&gt;some sort of credentials so that only the creator of the election can modify the election settings&lt;br /&gt;
Note: Once in progress, the creator of an election cannot shut it down.  It must run its course.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A voting system specifies:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The form of the ballot&lt;/li&gt;
	&lt;li&gt;The tallying method&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ballot forms:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Binary ballot (start here)&lt;/li&gt;
	&lt;li&gt;Ranked ballot&lt;/li&gt;
	&lt;li&gt;Range ballot&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Tallying methods:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Single winner
	&lt;ul&gt;
		&lt;li&gt;Plurality (start here)&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Multiple-winner
	&lt;ul&gt;
		&lt;li&gt;Proportional representation&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;RESTful &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;&lt;/h2&gt;
&lt;h3&gt;Elections&lt;/h3&gt;
&lt;h4&gt;List the elections&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;GET&lt;/span&gt; /elections&lt;/p&gt;
&lt;h4&gt;Create an election&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt; /elections&lt;/p&gt;
&lt;p&gt;Returns:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;owner token&lt;/li&gt;
	&lt;li&gt;polling place token&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;View an election&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;GET&lt;/span&gt; /elections/101&lt;/p&gt;
&lt;h4&gt;Modify an election&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;PUT&lt;/span&gt; /elections/101&lt;/p&gt;
&lt;h4&gt;Delete an election&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;DELETE&lt;/span&gt; /election/101&lt;/p&gt;
&lt;h3&gt;Candidates&lt;/h3&gt;
&lt;h4&gt;List the candidates&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;GET&lt;/span&gt; /elections/101/candidates&lt;/p&gt;
&lt;h4&gt;Create a candidate&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt; /elections/101/candidates&lt;/p&gt;
&lt;h4&gt;View a candidate&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;GET&lt;/span&gt; /elections/101/candidates&lt;/p&gt;
&lt;h4&gt;Modify a candidate&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;PUT&lt;/span&gt; /elections/101/candidates&lt;/p&gt;
&lt;h4&gt;Delete a candidate&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;DELETE&lt;/span&gt; /election/101/candidates&lt;/p&gt;
&lt;h3&gt;Votes&lt;/h3&gt;
&lt;h4&gt;List the votes&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;GET&lt;/span&gt; /elections/101/votes&lt;/p&gt;
&lt;h4&gt;Create a vote&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt; /elections/101/votes&lt;/p&gt;
&lt;h4&gt;View a vote&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;GET&lt;/span&gt; /elections/101/votes&lt;/p&gt;
&lt;h4&gt;Modify a vote&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;PUT&lt;/span&gt; /elections/101/votes&lt;/p&gt;
&lt;h4&gt;Delete a vote&lt;/h4&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;DELETE&lt;/span&gt; /election/101/votes&lt;/p&gt;
&lt;h1&gt;Misc&lt;/h1&gt;
&lt;h2&gt;Voting vs. rating systems&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;Voting systems are designed to transform a group&amp;#8217;s preferences into a N winners, where N is fixed in advance. There are many voting systems because there is no one transformation that is &amp;#8220;correct&amp;#8221; for all situations according to all reasonable criteria (see Arrow&amp;#8217;s Impossibility Theorem).&lt;/li&gt;
	&lt;li&gt;Rating system do not imply how many &amp;#8220;winners&amp;#8221; (i.e. 5 star ratings) will occur. They do not have to ensure that a predetermined number of rated items percolate to the top.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Future&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;Nick said that he social web could benefit from having API&amp;#8217;s to provide rating services.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;</body>
  <created-at type="datetime">2010-02-09T18:41:14-08:00</created-at>
  <id type="integer">130587</id>
  <permalink>api</permalink>
  <repository-id type="integer">114528</repository-id>
  <title>API</title>
  <updated-at type="datetime">2009-02-06T09:58:30-08:00</updated-at>
  <user-id type="integer">3094</user-id>
</wiki>
