rtodoist 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/classes/Todoist.html +323 -0
- data/doc/classes/Todoist.src/M000001.html +22 -0
- data/doc/classes/Todoist.src/M000002.html +27 -0
- data/doc/classes/Todoist.src/M000003.html +20 -0
- data/doc/classes/Todoist.src/M000004.html +20 -0
- data/doc/classes/Todoist.src/M000005.html +20 -0
- data/doc/classes/Todoist.src/M000006.html +20 -0
- data/doc/classes/Todoist.src/M000007.html +20 -0
- data/doc/classes/Todoist.src/M000008.html +20 -0
- data/doc/classes/Todoist.src/M000009.html +22 -0
- data/doc/classes/Todoist.src/M000010.html +22 -0
- data/doc/created.rid +1 -0
- data/doc/files/rtodoist_rb.html +112 -0
- data/doc/fr_class_index.html +27 -0
- data/doc/fr_file_index.html +27 -0
- data/doc/fr_method_index.html +36 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/rtodoist.rb +18 -2
- data/rtodoist-0.0.1.gem +0 -0
- data/rtodoist-0.0.2.gem +0 -0
- data/rtodoist.gemspec +2 -2
- metadata +24 -2
@@ -0,0 +1,323 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Todoist</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Todoist</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/rtodoist_rb.html">
|
59
|
+
rtodoist.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
This class holds information about one connection to <a
|
84
|
+
href="Todoist.html">Todoist</a>. It stores the <a
|
85
|
+
href="Todoist.html">Todoist</a> token, and allows access to data from <a
|
86
|
+
href="Todoist.html">Todoist</a>.
|
87
|
+
</p>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
|
92
|
+
</div>
|
93
|
+
|
94
|
+
<div id="method-list">
|
95
|
+
<h3 class="section-bar">Methods</h3>
|
96
|
+
|
97
|
+
<div class="name-list">
|
98
|
+
<a href="#M000009">add_item</a>
|
99
|
+
<a href="#M000003">get_all_projects</a>
|
100
|
+
<a href="#M000007">get_completed_items</a>
|
101
|
+
<a href="#M000005">get_labels</a>
|
102
|
+
<a href="#M000004">get_project</a>
|
103
|
+
<a href="#M000006">get_uncompleted_items</a>
|
104
|
+
<a href="#M000001">new</a>
|
105
|
+
<a href="#M000002">pretty_print_json</a>
|
106
|
+
<a href="#M000008">query</a>
|
107
|
+
<a href="#M000010">update_item</a>
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
|
111
|
+
</div>
|
112
|
+
|
113
|
+
|
114
|
+
<!-- if includes -->
|
115
|
+
|
116
|
+
<div id="section">
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
<!-- if method_list -->
|
126
|
+
<div id="methods">
|
127
|
+
<h3 class="section-bar">Public Class methods</h3>
|
128
|
+
|
129
|
+
<div id="method-M000001" class="method-detail">
|
130
|
+
<a name="M000001"></a>
|
131
|
+
|
132
|
+
<div class="method-heading">
|
133
|
+
<a href="Todoist.src/M000001.html" target="Code" class="method-signature"
|
134
|
+
onclick="popupCode('Todoist.src/M000001.html');return false;">
|
135
|
+
<span class="method-name">new</span><span class="method-args">(token)</span>
|
136
|
+
</a>
|
137
|
+
</div>
|
138
|
+
|
139
|
+
<div class="method-description">
|
140
|
+
<p>
|
141
|
+
Create the <a href="Todoist.html">Todoist</a> object and store the <a
|
142
|
+
href="Todoist.html">Todoist</a> token. Will raise an error if <a
|
143
|
+
href="http://todoist.com">todoist.com</a> is not available
|
144
|
+
</p>
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
|
148
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
149
|
+
|
150
|
+
<div id="method-M000009" class="method-detail">
|
151
|
+
<a name="M000009"></a>
|
152
|
+
|
153
|
+
<div class="method-heading">
|
154
|
+
<a href="Todoist.src/M000009.html" target="Code" class="method-signature"
|
155
|
+
onclick="popupCode('Todoist.src/M000009.html');return false;">
|
156
|
+
<span class="method-name">add_item</span><span class="method-args">(project_id, content, due_date, priority)</span>
|
157
|
+
</a>
|
158
|
+
</div>
|
159
|
+
|
160
|
+
<div class="method-description">
|
161
|
+
<p>
|
162
|
+
Adds an item to the project with the specified project_id.
|
163
|
+
<tt>due_date</tt> and <tt>priority</tt> are optional
|
164
|
+
</p>
|
165
|
+
</div>
|
166
|
+
</div>
|
167
|
+
|
168
|
+
<div id="method-M000003" class="method-detail">
|
169
|
+
<a name="M000003"></a>
|
170
|
+
|
171
|
+
<div class="method-heading">
|
172
|
+
<a href="Todoist.src/M000003.html" target="Code" class="method-signature"
|
173
|
+
onclick="popupCode('Todoist.src/M000003.html');return false;">
|
174
|
+
<span class="method-name">get_all_projects</span><span class="method-args">()</span>
|
175
|
+
</a>
|
176
|
+
</div>
|
177
|
+
|
178
|
+
<div class="method-description">
|
179
|
+
<p>
|
180
|
+
Returns a list of all the projects in the <a
|
181
|
+
href="Todoist.html">Todoist</a> account linked to this instance of the
|
182
|
+
class
|
183
|
+
</p>
|
184
|
+
</div>
|
185
|
+
</div>
|
186
|
+
|
187
|
+
<div id="method-M000007" class="method-detail">
|
188
|
+
<a name="M000007"></a>
|
189
|
+
|
190
|
+
<div class="method-heading">
|
191
|
+
<a href="Todoist.src/M000007.html" target="Code" class="method-signature"
|
192
|
+
onclick="popupCode('Todoist.src/M000007.html');return false;">
|
193
|
+
<span class="method-name">get_completed_items</span><span class="method-args">(project_id)</span>
|
194
|
+
</a>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
<div class="method-description">
|
198
|
+
<p>
|
199
|
+
Returns all the completed items in the project with the given
|
200
|
+
<tt>project_id</tt>
|
201
|
+
</p>
|
202
|
+
</div>
|
203
|
+
</div>
|
204
|
+
|
205
|
+
<div id="method-M000005" class="method-detail">
|
206
|
+
<a name="M000005"></a>
|
207
|
+
|
208
|
+
<div class="method-heading">
|
209
|
+
<a href="Todoist.src/M000005.html" target="Code" class="method-signature"
|
210
|
+
onclick="popupCode('Todoist.src/M000005.html');return false;">
|
211
|
+
<span class="method-name">get_labels</span><span class="method-args">()</span>
|
212
|
+
</a>
|
213
|
+
</div>
|
214
|
+
|
215
|
+
<div class="method-description">
|
216
|
+
<p>
|
217
|
+
Returns a list of all the labels in the <a href="Todoist.html">Todoist</a>
|
218
|
+
account linked to this instance of the class
|
219
|
+
</p>
|
220
|
+
</div>
|
221
|
+
</div>
|
222
|
+
|
223
|
+
<div id="method-M000004" class="method-detail">
|
224
|
+
<a name="M000004"></a>
|
225
|
+
|
226
|
+
<div class="method-heading">
|
227
|
+
<a href="Todoist.src/M000004.html" target="Code" class="method-signature"
|
228
|
+
onclick="popupCode('Todoist.src/M000004.html');return false;">
|
229
|
+
<span class="method-name">get_project</span><span class="method-args">(project_id)</span>
|
230
|
+
</a>
|
231
|
+
</div>
|
232
|
+
|
233
|
+
<div class="method-description">
|
234
|
+
<p>
|
235
|
+
Returns the information about a specific project with the given
|
236
|
+
<tt>project_id</tt>
|
237
|
+
</p>
|
238
|
+
</div>
|
239
|
+
</div>
|
240
|
+
|
241
|
+
<div id="method-M000006" class="method-detail">
|
242
|
+
<a name="M000006"></a>
|
243
|
+
|
244
|
+
<div class="method-heading">
|
245
|
+
<a href="Todoist.src/M000006.html" target="Code" class="method-signature"
|
246
|
+
onclick="popupCode('Todoist.src/M000006.html');return false;">
|
247
|
+
<span class="method-name">get_uncompleted_items</span><span class="method-args">(project_id)</span>
|
248
|
+
</a>
|
249
|
+
</div>
|
250
|
+
|
251
|
+
<div class="method-description">
|
252
|
+
<p>
|
253
|
+
Returns all the uncompleted items in the project with the given
|
254
|
+
<tt>project_id</tt>
|
255
|
+
</p>
|
256
|
+
</div>
|
257
|
+
</div>
|
258
|
+
|
259
|
+
<div id="method-M000002" class="method-detail">
|
260
|
+
<a name="M000002"></a>
|
261
|
+
|
262
|
+
<div class="method-heading">
|
263
|
+
<a href="Todoist.src/M000002.html" target="Code" class="method-signature"
|
264
|
+
onclick="popupCode('Todoist.src/M000002.html');return false;">
|
265
|
+
<span class="method-name">pretty_print_json</span><span class="method-args">(data)</span>
|
266
|
+
</a>
|
267
|
+
</div>
|
268
|
+
|
269
|
+
<div class="method-description">
|
270
|
+
<p>
|
271
|
+
Prints the given data in a handy key = value format. Useful for debugging.
|
272
|
+
</p>
|
273
|
+
</div>
|
274
|
+
</div>
|
275
|
+
|
276
|
+
<div id="method-M000008" class="method-detail">
|
277
|
+
<a name="M000008"></a>
|
278
|
+
|
279
|
+
<div class="method-heading">
|
280
|
+
<a href="Todoist.src/M000008.html" target="Code" class="method-signature"
|
281
|
+
onclick="popupCode('Todoist.src/M000008.html');return false;">
|
282
|
+
<span class="method-name">query</span><span class="method-args">(query)</span>
|
283
|
+
</a>
|
284
|
+
</div>
|
285
|
+
|
286
|
+
<div class="method-description">
|
287
|
+
<p>
|
288
|
+
Returns the result of a todoist <a href="Todoist.html#M000008">query</a>
|
289
|
+
</p>
|
290
|
+
</div>
|
291
|
+
</div>
|
292
|
+
|
293
|
+
<div id="method-M000010" class="method-detail">
|
294
|
+
<a name="M000010"></a>
|
295
|
+
|
296
|
+
<div class="method-heading">
|
297
|
+
<a href="Todoist.src/M000010.html" target="Code" class="method-signature"
|
298
|
+
onclick="popupCode('Todoist.src/M000010.html');return false;">
|
299
|
+
<span class="method-name">update_item</span><span class="method-args">(item_id, content, due_date, priority)</span>
|
300
|
+
</a>
|
301
|
+
</div>
|
302
|
+
|
303
|
+
<div class="method-description">
|
304
|
+
<p>
|
305
|
+
Updates the item with the specified item_id <tt>due_date</tt> and
|
306
|
+
<tt>priority</tt> are optional
|
307
|
+
</p>
|
308
|
+
</div>
|
309
|
+
</div>
|
310
|
+
|
311
|
+
|
312
|
+
</div>
|
313
|
+
|
314
|
+
|
315
|
+
</div>
|
316
|
+
|
317
|
+
|
318
|
+
<div id="validator-badges">
|
319
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
320
|
+
</div>
|
321
|
+
|
322
|
+
</body>
|
323
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (Todoist)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File rtodoist.rb, line 12</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">token</span>)
|
15
|
+
<span class="ruby-ivar">@token</span> = <span class="ruby-identifier">token</span>
|
16
|
+
|
17
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">check_connection</span>(<span class="ruby-value">2</span>, <span class="ruby-value str">'http://todoist.com'</span>) <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>)
|
18
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-value str">'http://todoist.com not accessible. Program will now exit.'</span>
|
19
|
+
<span class="ruby-keyword kw">end</span>
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>pretty_print_json (Todoist)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File rtodoist.rb, line 21</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pretty_print_json</span>(<span class="ruby-identifier">data</span>)
|
15
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">data</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>)
|
16
|
+
<span class="ruby-identifier">data</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">result</span><span class="ruby-operator">|</span>
|
17
|
+
<span class="ruby-identifier">result</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
18
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{key} = #{value}"</span>
|
19
|
+
}
|
20
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"--------"</span>
|
21
|
+
}
|
22
|
+
<span class="ruby-keyword kw">else</span>
|
23
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"No data returned - cannot print"</span>
|
24
|
+
<span class="ruby-keyword kw">end</span>
|
25
|
+
<span class="ruby-keyword kw">end</span></pre>
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>get_all_projects (Todoist)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File rtodoist.rb, line 36</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_all_projects</span>()
|
15
|
+
<span class="ruby-identifier">base_url</span> = <span class="ruby-value str">"http://todoist.com/API/getProjects"</span>
|
16
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">%<#{base_url}?token=#{@token}></span>
|
17
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_json_data</span>(<span class="ruby-identifier">url</span>)
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>get_project (Todoist)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File rtodoist.rb, line 43</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_project</span>(<span class="ruby-identifier">project_id</span>)
|
15
|
+
<span class="ruby-identifier">base_url</span> = <span class="ruby-value str">"http://todoist.com/API/getProject"</span>
|
16
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">%<#{base_url}?project_id=#{project_id}&token=#{@token}></span>
|
17
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_json_data</span>(<span class="ruby-identifier">url</span>)
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>get_labels (Todoist)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File rtodoist.rb, line 51</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_labels</span>()
|
15
|
+
<span class="ruby-identifier">base_url</span> = <span class="ruby-value str">"http://todoist.com/API/getLabels"</span>
|
16
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">%<#{base_url}?token=#{@token}></span>
|
17
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_json_data</span>(<span class="ruby-identifier">url</span>)
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>get_uncompleted_items (Todoist)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File rtodoist.rb, line 58</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_uncompleted_items</span>(<span class="ruby-identifier">project_id</span>)
|
15
|
+
<span class="ruby-identifier">base_url</span> = <span class="ruby-value str">"http://todoist.com/API/getUncompletedItems"</span>
|
16
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">%<#{base_url}?project_id=#{project_id}&token=#{@token}></span>
|
17
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_json_data</span>(<span class="ruby-identifier">url</span>)
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>get_completed_items (Todoist)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File rtodoist.rb, line 65</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_completed_items</span>(<span class="ruby-identifier">project_id</span>)
|
15
|
+
<span class="ruby-identifier">base_url</span> = <span class="ruby-value str">"http://todoist.com/API/getCompletedItems"</span>
|
16
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">%<#{base_url}?project_id=#{project_id}&token=#{@token}></span>
|
17
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_json_data</span>(<span class="ruby-identifier">url</span>)
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>query (Todoist)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File rtodoist.rb, line 72</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query</span>(<span class="ruby-identifier">query</span>)
|
15
|
+
<span class="ruby-identifier">base_url</span> = <span class="ruby-value str">"http://todoist.com/API/query"</span>
|
16
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">%<#{base_url}?queries=#{query}&token=#{@token}></span>
|
17
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_json_data</span>(<span class="ruby-identifier">url</span>)
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>add_item (Todoist)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File rtodoist.rb, line 80</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_item</span>(<span class="ruby-identifier">project_id</span>, <span class="ruby-identifier">content</span>, <span class="ruby-identifier">due_date</span>, <span class="ruby-identifier">priority</span>)
|
15
|
+
<span class="ruby-identifier">base_url</span> = <span class="ruby-value str">"http://todoist.com/API/addItem"</span>
|
16
|
+
<span class="ruby-comment cmt"># URL encode the content to deal with spaces and special characters</span>
|
17
|
+
<span class="ruby-identifier">content</span> = <span class="ruby-constant">CGI</span>.<span class="ruby-identifier">escape</span>(<span class="ruby-identifier">content</span>)
|
18
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">%<#{base_url}?content=#{content}&project_id=#{project_id}&priority=#{priority}token=#{@token}></span>
|
19
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_json_data</span>(<span class="ruby-identifier">url</span>)
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>update_item (Todoist)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File rtodoist.rb, line 90</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_item</span>(<span class="ruby-identifier">item_id</span>, <span class="ruby-identifier">content</span>, <span class="ruby-identifier">due_date</span>, <span class="ruby-identifier">priority</span>)
|
15
|
+
<span class="ruby-identifier">base_url</span> = <span class="ruby-value str">"http://todoist.com/API/updateItem"</span>
|
16
|
+
<span class="ruby-comment cmt"># URL encode the content to deal with spaces and special characters</span>
|
17
|
+
<span class="ruby-identifier">content</span> = <span class="ruby-constant">CGI</span>.<span class="ruby-identifier">escape</span>(<span class="ruby-identifier">content</span>)
|
18
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-node">%<#{base_url}?content=#{content}&id=#{id}&priority=#{priority}token=#{@token}></span>
|
19
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_json_data</span>(<span class="ruby-identifier">url</span>)
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|
data/doc/created.rid
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Sat, 07 Jun 2008 16:54:11 +0100
|
@@ -0,0 +1,112 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>File: rtodoist.rb</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="fileHeader">
|
50
|
+
<h1>rtodoist.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>rtodoist.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Sat Jun 07 16:52:33 +0100 2008</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
|
72
|
+
<div id="requires-list">
|
73
|
+
<h3 class="section-bar">Required files</h3>
|
74
|
+
|
75
|
+
<div class="name-list">
|
76
|
+
json
|
77
|
+
open-uri
|
78
|
+
net/http
|
79
|
+
cgi
|
80
|
+
pp
|
81
|
+
</div>
|
82
|
+
</div>
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
<!-- if includes -->
|
91
|
+
|
92
|
+
<div id="section">
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
<!-- if method_list -->
|
102
|
+
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
<div id="validator-badges">
|
108
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
109
|
+
</div>
|
110
|
+
|
111
|
+
</body>
|
112
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
3
|
+
<!DOCTYPE html
|
4
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
5
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
6
|
+
|
7
|
+
<!--
|
8
|
+
|
9
|
+
Classes
|
10
|
+
|
11
|
+
-->
|
12
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
13
|
+
<head>
|
14
|
+
<title>Classes</title>
|
15
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
16
|
+
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
|
17
|
+
<base target="docwin" />
|
18
|
+
</head>
|
19
|
+
<body>
|
20
|
+
<div id="index">
|
21
|
+
<h1 class="section-bar">Classes</h1>
|
22
|
+
<div id="index-entries">
|
23
|
+
<a href="classes/Todoist.html">Todoist</a><br />
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
3
|
+
<!DOCTYPE html
|
4
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
5
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
6
|
+
|
7
|
+
<!--
|
8
|
+
|
9
|
+
Files
|
10
|
+
|
11
|
+
-->
|
12
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
13
|
+
<head>
|
14
|
+
<title>Files</title>
|
15
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
16
|
+
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
|
17
|
+
<base target="docwin" />
|
18
|
+
</head>
|
19
|
+
<body>
|
20
|
+
<div id="index">
|
21
|
+
<h1 class="section-bar">Files</h1>
|
22
|
+
<div id="index-entries">
|
23
|
+
<a href="files/rtodoist_rb.html">rtodoist.rb</a><br />
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
|
2
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
3
|
+
<!DOCTYPE html
|
4
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
5
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
6
|
+
|
7
|
+
<!--
|
8
|
+
|
9
|
+
Methods
|
10
|
+
|
11
|
+
-->
|
12
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
13
|
+
<head>
|
14
|
+
<title>Methods</title>
|
15
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
16
|
+
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
|
17
|
+
<base target="docwin" />
|
18
|
+
</head>
|
19
|
+
<body>
|
20
|
+
<div id="index">
|
21
|
+
<h1 class="section-bar">Methods</h1>
|
22
|
+
<div id="index-entries">
|
23
|
+
<a href="classes/Todoist.html#M000009">add_item (Todoist)</a><br />
|
24
|
+
<a href="classes/Todoist.html#M000003">get_all_projects (Todoist)</a><br />
|
25
|
+
<a href="classes/Todoist.html#M000007">get_completed_items (Todoist)</a><br />
|
26
|
+
<a href="classes/Todoist.html#M000005">get_labels (Todoist)</a><br />
|
27
|
+
<a href="classes/Todoist.html#M000004">get_project (Todoist)</a><br />
|
28
|
+
<a href="classes/Todoist.html#M000006">get_uncompleted_items (Todoist)</a><br />
|
29
|
+
<a href="classes/Todoist.html#M000001">new (Todoist)</a><br />
|
30
|
+
<a href="classes/Todoist.html#M000002">pretty_print_json (Todoist)</a><br />
|
31
|
+
<a href="classes/Todoist.html#M000008">query (Todoist)</a><br />
|
32
|
+
<a href="classes/Todoist.html#M000010">update_item (Todoist)</a><br />
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</body>
|
36
|
+
</html>
|
data/doc/index.html
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
5
|
+
|
6
|
+
<!--
|
7
|
+
|
8
|
+
RDoc Documentation
|
9
|
+
|
10
|
+
-->
|
11
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
12
|
+
<head>
|
13
|
+
<title>RDoc Documentation</title>
|
14
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
15
|
+
</head>
|
16
|
+
<frameset rows="20%, 80%">
|
17
|
+
<frameset cols="25%,35%,45%">
|
18
|
+
<frame src="fr_file_index.html" title="Files" name="Files" />
|
19
|
+
<frame src="fr_class_index.html" name="Classes" />
|
20
|
+
<frame src="fr_method_index.html" name="Methods" />
|
21
|
+
</frameset>
|
22
|
+
<frame src="classes/Todoist.html" name="docwin" />
|
23
|
+
</frameset>
|
24
|
+
</html>
|
data/doc/rdoc-style.css
ADDED
@@ -0,0 +1,208 @@
|
|
1
|
+
|
2
|
+
body {
|
3
|
+
font-family: Verdana,Arial,Helvetica,sans-serif;
|
4
|
+
font-size: 90%;
|
5
|
+
margin: 0;
|
6
|
+
margin-left: 40px;
|
7
|
+
padding: 0;
|
8
|
+
background: white;
|
9
|
+
}
|
10
|
+
|
11
|
+
h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
|
12
|
+
h1 { font-size: 150%; }
|
13
|
+
h2,h3,h4 { margin-top: 1em; }
|
14
|
+
|
15
|
+
a { background: #eef; color: #039; text-decoration: none; }
|
16
|
+
a:hover { background: #039; color: #eef; }
|
17
|
+
|
18
|
+
/* Override the base stylesheet's Anchor inside a table cell */
|
19
|
+
td > a {
|
20
|
+
background: transparent;
|
21
|
+
color: #039;
|
22
|
+
text-decoration: none;
|
23
|
+
}
|
24
|
+
|
25
|
+
/* and inside a section title */
|
26
|
+
.section-title > a {
|
27
|
+
background: transparent;
|
28
|
+
color: #eee;
|
29
|
+
text-decoration: none;
|
30
|
+
}
|
31
|
+
|
32
|
+
/* === Structural elements =================================== */
|
33
|
+
|
34
|
+
div#index {
|
35
|
+
margin: 0;
|
36
|
+
margin-left: -40px;
|
37
|
+
padding: 0;
|
38
|
+
font-size: 90%;
|
39
|
+
}
|
40
|
+
|
41
|
+
|
42
|
+
div#index a {
|
43
|
+
margin-left: 0.7em;
|
44
|
+
}
|
45
|
+
|
46
|
+
div#index .section-bar {
|
47
|
+
margin-left: 0px;
|
48
|
+
padding-left: 0.7em;
|
49
|
+
background: #ccc;
|
50
|
+
font-size: small;
|
51
|
+
}
|
52
|
+
|
53
|
+
|
54
|
+
div#classHeader, div#fileHeader {
|
55
|
+
width: auto;
|
56
|
+
color: white;
|
57
|
+
padding: 0.5em 1.5em 0.5em 1.5em;
|
58
|
+
margin: 0;
|
59
|
+
margin-left: -40px;
|
60
|
+
border-bottom: 3px solid #006;
|
61
|
+
}
|
62
|
+
|
63
|
+
div#classHeader a, div#fileHeader a {
|
64
|
+
background: inherit;
|
65
|
+
color: white;
|
66
|
+
}
|
67
|
+
|
68
|
+
div#classHeader td, div#fileHeader td {
|
69
|
+
background: inherit;
|
70
|
+
color: white;
|
71
|
+
}
|
72
|
+
|
73
|
+
|
74
|
+
div#fileHeader {
|
75
|
+
background: #057;
|
76
|
+
}
|
77
|
+
|
78
|
+
div#classHeader {
|
79
|
+
background: #048;
|
80
|
+
}
|
81
|
+
|
82
|
+
|
83
|
+
.class-name-in-header {
|
84
|
+
font-size: 180%;
|
85
|
+
font-weight: bold;
|
86
|
+
}
|
87
|
+
|
88
|
+
|
89
|
+
div#bodyContent {
|
90
|
+
padding: 0 1.5em 0 1.5em;
|
91
|
+
}
|
92
|
+
|
93
|
+
div#description {
|
94
|
+
padding: 0.5em 1.5em;
|
95
|
+
background: #efefef;
|
96
|
+
border: 1px dotted #999;
|
97
|
+
}
|
98
|
+
|
99
|
+
div#description h1,h2,h3,h4,h5,h6 {
|
100
|
+
color: #125;;
|
101
|
+
background: transparent;
|
102
|
+
}
|
103
|
+
|
104
|
+
div#validator-badges {
|
105
|
+
text-align: center;
|
106
|
+
}
|
107
|
+
div#validator-badges img { border: 0; }
|
108
|
+
|
109
|
+
div#copyright {
|
110
|
+
color: #333;
|
111
|
+
background: #efefef;
|
112
|
+
font: 0.75em sans-serif;
|
113
|
+
margin-top: 5em;
|
114
|
+
margin-bottom: 0;
|
115
|
+
padding: 0.5em 2em;
|
116
|
+
}
|
117
|
+
|
118
|
+
|
119
|
+
/* === Classes =================================== */
|
120
|
+
|
121
|
+
table.header-table {
|
122
|
+
color: white;
|
123
|
+
font-size: small;
|
124
|
+
}
|
125
|
+
|
126
|
+
.type-note {
|
127
|
+
font-size: small;
|
128
|
+
color: #DEDEDE;
|
129
|
+
}
|
130
|
+
|
131
|
+
.xxsection-bar {
|
132
|
+
background: #eee;
|
133
|
+
color: #333;
|
134
|
+
padding: 3px;
|
135
|
+
}
|
136
|
+
|
137
|
+
.section-bar {
|
138
|
+
color: #333;
|
139
|
+
border-bottom: 1px solid #999;
|
140
|
+
margin-left: -20px;
|
141
|
+
}
|
142
|
+
|
143
|
+
|
144
|
+
.section-title {
|
145
|
+
background: #79a;
|
146
|
+
color: #eee;
|
147
|
+
padding: 3px;
|
148
|
+
margin-top: 2em;
|
149
|
+
margin-left: -30px;
|
150
|
+
border: 1px solid #999;
|
151
|
+
}
|
152
|
+
|
153
|
+
.top-aligned-row { vertical-align: top }
|
154
|
+
.bottom-aligned-row { vertical-align: bottom }
|
155
|
+
|
156
|
+
/* --- Context section classes ----------------------- */
|
157
|
+
|
158
|
+
.context-row { }
|
159
|
+
.context-item-name { font-family: monospace; font-weight: bold; color: black; }
|
160
|
+
.context-item-value { font-size: small; color: #448; }
|
161
|
+
.context-item-desc { color: #333; padding-left: 2em; }
|
162
|
+
|
163
|
+
/* --- Method classes -------------------------- */
|
164
|
+
.method-detail {
|
165
|
+
background: #efefef;
|
166
|
+
padding: 0;
|
167
|
+
margin-top: 0.5em;
|
168
|
+
margin-bottom: 1em;
|
169
|
+
border: 1px dotted #ccc;
|
170
|
+
}
|
171
|
+
.method-heading {
|
172
|
+
color: black;
|
173
|
+
background: #ccc;
|
174
|
+
border-bottom: 1px solid #666;
|
175
|
+
padding: 0.2em 0.5em 0 0.5em;
|
176
|
+
}
|
177
|
+
.method-signature { color: black; background: inherit; }
|
178
|
+
.method-name { font-weight: bold; }
|
179
|
+
.method-args { font-style: italic; }
|
180
|
+
.method-description { padding: 0 0.5em 0 0.5em; }
|
181
|
+
|
182
|
+
/* --- Source code sections -------------------- */
|
183
|
+
|
184
|
+
a.source-toggle { font-size: 90%; }
|
185
|
+
div.method-source-code {
|
186
|
+
background: #262626;
|
187
|
+
color: #ffdead;
|
188
|
+
margin: 1em;
|
189
|
+
padding: 0.5em;
|
190
|
+
border: 1px dashed #999;
|
191
|
+
overflow: hidden;
|
192
|
+
}
|
193
|
+
|
194
|
+
div.method-source-code pre { color: #ffdead; overflow: hidden; }
|
195
|
+
|
196
|
+
/* --- Ruby keyword styles --------------------- */
|
197
|
+
|
198
|
+
.standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
|
199
|
+
|
200
|
+
.ruby-constant { color: #7fffd4; background: transparent; }
|
201
|
+
.ruby-keyword { color: #00ffff; background: transparent; }
|
202
|
+
.ruby-ivar { color: #eedd82; background: transparent; }
|
203
|
+
.ruby-operator { color: #00ffee; background: transparent; }
|
204
|
+
.ruby-identifier { color: #ffdead; background: transparent; }
|
205
|
+
.ruby-node { color: #ffa07a; background: transparent; }
|
206
|
+
.ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
|
207
|
+
.ruby-regexp { color: #ffa07a; background: transparent; }
|
208
|
+
.ruby-value { color: #7fffd4; background: transparent; }
|
data/lib/rtodoist.rb
CHANGED
@@ -4,8 +4,11 @@ require 'net/http'
|
|
4
4
|
require 'cgi'
|
5
5
|
require 'pp'
|
6
6
|
|
7
|
+
# This class holds information about one connection to Todoist. It stores the
|
8
|
+
# Todoist token, and allows access to data from Todoist.
|
7
9
|
class Todoist
|
8
|
-
|
10
|
+
# Create the Todoist object and store the Todoist token.
|
11
|
+
# Will raise an error if http://todoist.com is not available
|
9
12
|
def initialize(token)
|
10
13
|
@token = token
|
11
14
|
|
@@ -14,6 +17,7 @@ class Todoist
|
|
14
17
|
end
|
15
18
|
end
|
16
19
|
|
20
|
+
# Prints the given data in a handy key = value format. Useful for debugging.
|
17
21
|
def pretty_print_json(data)
|
18
22
|
if (data.nil? == false)
|
19
23
|
data.each { |result|
|
@@ -23,46 +27,56 @@ class Todoist
|
|
23
27
|
puts "--------"
|
24
28
|
}
|
25
29
|
else
|
26
|
-
|
30
|
+
raise "No data returned - cannot print"
|
27
31
|
end
|
28
32
|
end
|
29
33
|
|
34
|
+
# Returns a list of all the projects in the Todoist account linked to
|
35
|
+
# this instance of the class
|
30
36
|
def get_all_projects()
|
31
37
|
base_url = "http://todoist.com/API/getProjects"
|
32
38
|
url = %<#{base_url}?token=#{@token}>
|
33
39
|
return get_json_data(url)
|
34
40
|
end
|
35
41
|
|
42
|
+
# Returns the information about a specific project with the given +project_id+
|
36
43
|
def get_project(project_id)
|
37
44
|
base_url = "http://todoist.com/API/getProject"
|
38
45
|
url = %<#{base_url}?project_id=#{project_id}&token=#{@token}>
|
39
46
|
return get_json_data(url)
|
40
47
|
end
|
41
48
|
|
49
|
+
# Returns a list of all the labels in the Todoist account linked to
|
50
|
+
# this instance of the class
|
42
51
|
def get_labels()
|
43
52
|
base_url = "http://todoist.com/API/getLabels"
|
44
53
|
url = %<#{base_url}?token=#{@token}>
|
45
54
|
return get_json_data(url)
|
46
55
|
end
|
47
56
|
|
57
|
+
# Returns all the uncompleted items in the project with the given +project_id+
|
48
58
|
def get_uncompleted_items(project_id)
|
49
59
|
base_url = "http://todoist.com/API/getUncompletedItems"
|
50
60
|
url = %<#{base_url}?project_id=#{project_id}&token=#{@token}>
|
51
61
|
return get_json_data(url)
|
52
62
|
end
|
53
63
|
|
64
|
+
# Returns all the completed items in the project with the given +project_id+
|
54
65
|
def get_completed_items(project_id)
|
55
66
|
base_url = "http://todoist.com/API/getCompletedItems"
|
56
67
|
url = %<#{base_url}?project_id=#{project_id}&token=#{@token}>
|
57
68
|
return get_json_data(url)
|
58
69
|
end
|
59
70
|
|
71
|
+
# Returns the result of a todoist query
|
60
72
|
def query(query)
|
61
73
|
base_url = "http://todoist.com/API/query"
|
62
74
|
url = %<#{base_url}?queries=#{query}&token=#{@token}>
|
63
75
|
return get_json_data(url)
|
64
76
|
end
|
65
77
|
|
78
|
+
# Adds an item to the project with the specified project_id.
|
79
|
+
# +due_date+ and +priority+ are optional
|
66
80
|
def add_item(project_id, content, due_date, priority)
|
67
81
|
base_url = "http://todoist.com/API/addItem"
|
68
82
|
# URL encode the content to deal with spaces and special characters
|
@@ -71,6 +85,8 @@ class Todoist
|
|
71
85
|
return get_json_data(url)
|
72
86
|
end
|
73
87
|
|
88
|
+
# Updates the item with the specified item_id
|
89
|
+
# +due_date+ and +priority+ are optional
|
74
90
|
def update_item(item_id, content, due_date, priority)
|
75
91
|
base_url = "http://todoist.com/API/updateItem"
|
76
92
|
# URL encode the content to deal with spaces and special characters
|
data/rtodoist-0.0.1.gem
CHANGED
Binary file
|
data/rtodoist-0.0.2.gem
ADDED
File without changes
|
data/rtodoist.gemspec
CHANGED
@@ -2,11 +2,11 @@ require 'rubygems'
|
|
2
2
|
|
3
3
|
spec = Gem::Specification.new do |s|
|
4
4
|
s.name = 'rtodoist'
|
5
|
-
s.version = '0.0.
|
5
|
+
s.version = '0.0.2'
|
6
6
|
s.summary = "RTodoist allows easy access to the Todoist todo list manager (http://todoist.com"
|
7
7
|
s.files = Dir.glob("**/**/**")
|
8
8
|
s.test_files = Dir.glob("test/*_test.rb")
|
9
9
|
s.author = "Robin Wilson"
|
10
10
|
s.email = "r.t.wilson@rmplc.co.uk"
|
11
|
-
s.has_rdoc =
|
11
|
+
s.has_rdoc = true
|
12
12
|
end
|
metadata
CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rtodoist
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
6
|
+
version: 0.0.2
|
7
7
|
date: 2008-06-07 00:00:00 +01:00
|
8
8
|
summary: RTodoist allows easy access to the Todoist todo list manager (http://todoist.com
|
9
9
|
require_paths:
|
@@ -15,7 +15,7 @@ description:
|
|
15
15
|
autorequire:
|
16
16
|
default_executable:
|
17
17
|
bindir: bin
|
18
|
-
has_rdoc:
|
18
|
+
has_rdoc: true
|
19
19
|
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
20
|
requirements:
|
21
21
|
- - ">"
|
@@ -30,10 +30,32 @@ authors:
|
|
30
30
|
- Robin Wilson
|
31
31
|
files:
|
32
32
|
- doc
|
33
|
+
- doc/classes
|
34
|
+
- doc/classes/Todoist.html
|
35
|
+
- doc/classes/Todoist.src
|
36
|
+
- doc/classes/Todoist.src/M000001.html
|
37
|
+
- doc/classes/Todoist.src/M000002.html
|
38
|
+
- doc/classes/Todoist.src/M000003.html
|
39
|
+
- doc/classes/Todoist.src/M000004.html
|
40
|
+
- doc/classes/Todoist.src/M000005.html
|
41
|
+
- doc/classes/Todoist.src/M000006.html
|
42
|
+
- doc/classes/Todoist.src/M000007.html
|
43
|
+
- doc/classes/Todoist.src/M000008.html
|
44
|
+
- doc/classes/Todoist.src/M000009.html
|
45
|
+
- doc/classes/Todoist.src/M000010.html
|
46
|
+
- doc/created.rid
|
47
|
+
- doc/files
|
48
|
+
- doc/files/rtodoist_rb.html
|
49
|
+
- doc/fr_class_index.html
|
50
|
+
- doc/fr_file_index.html
|
51
|
+
- doc/fr_method_index.html
|
52
|
+
- doc/index.html
|
53
|
+
- doc/rdoc-style.css
|
33
54
|
- lib
|
34
55
|
- lib/rtodoist.rb
|
35
56
|
- pkg
|
36
57
|
- rtodoist-0.0.1.gem
|
58
|
+
- rtodoist-0.0.2.gem
|
37
59
|
- rtodoist.gemspec
|
38
60
|
- test
|
39
61
|
test_files: []
|