Repository URL to install this package:
|
Version:
0.3.1custom ▾
|
<!DOCTYPE html>
<html>
<head>
<title>todo.rb</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="../../../docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To …</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page">
<a class="source" href="../../bcx.html">
lib/bcx.rb
</a>
<a class="source" href="../client/http.html">
lib/bcx/client/http.rb
</a>
<a class="source" href="../client/oauth.html">
lib/bcx/client/oauth.rb
</a>
<a class="source" href="../configuration.html">
lib/bcx/configuration.rb
</a>
<a class="source" href="../launchpad/oauth.html">
lib/bcx/launchpad/oauth.rb
</a>
<a class="source" href="access.html">
lib/bcx/resources/access.rb
</a>
<a class="source" href="authorization.html">
lib/bcx/resources/authorization.rb
</a>
<a class="source" href="person.html">
lib/bcx/resources/person.rb
</a>
<a class="source" href="project.html">
lib/bcx/resources/project.rb
</a>
<a class="source" href="todo.html">
lib/bcx/resources/todo.rb
</a>
<a class="source" href="todolist.html">
lib/bcx/resources/todolist.rb
</a>
<a class="source" href="../response_error.html">
lib/bcx/response_error.rb
</a>
<a class="source" href="../version.html">
lib/bcx/version.rb
</a>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>todo.rb</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap for-h2">
<a class="pilcrow" href="#section-1">¶</a>
</div>
<h2>Todo</h2>
<p>Provides access to todolist resoource both at the client level and per-project</p>
<h4>Get todos for a todolist</h4>
<p><code>GET /todolists/1.json</code></p>
<pre><code>todolist = client.todolists!(<span class="number">1</span>)
todolist.todos.remaining
todolist.todos.completed</code></pre>
<h4>Get a specific todo</h4>
<p><code>GET /projects/1/todos/2.json</code></p>
<pre><code>client.projects(<span class="number">1</span>).todos!(<span class="number">2</span>)</code></pre>
<h4>Create a todo</h4>
<p><code>POST /projects/1/todolists/2/todos.json</code></p>
<pre><code>client.projects(<span class="number">1</span>).todolists(<span class="number">2</span>).todos.create!(<span class="symbol">content:</span> <span class="string">'Update copy text'</span>)</code></pre>
<h4>Update a todo</h4>
<p><code>PUT /projects/1/todos/2.json</code></p>
<pre><code>client.projects(<span class="number">1</span>).todos(<span class="number">2</span>).update!(<span class="symbol">completed:</span> <span class="keyword">true</span>)</code></pre>
<h4>Delete a todo</h4>
<p><code>DELETE /projects/1/todos/2.json</code></p>
<pre><code>client.projects(<span class="number">1</span>).todos(<span class="number">2</span>).delete!</code></pre>
</div>
<div class="content"><div class='highlight'><pre><span class="class"><span class="keyword">module</span> <span class="title">Bcx</span></span>
<span class="class"><span class="keyword">module</span> <span class="title">Resources</span></span>
<span class="class"><span class="keyword">class</span> <span class="title">Todo</span> <span class="inheritance">< <span class="parent">Rapidash::Base</span></span></span>
<span class="keyword">end</span>
<span class="keyword">end</span>
<span class="keyword">end</span></pre></div></div>
</li>
</ul>
</div>
</body>
</html>