todoly 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +27 -0
- data/VERSION +1 -1
- data/lib/todoly.rb +13 -1
- data/lib/todoly/filter.rb +4 -0
- data/lib/todoly/project.rb +4 -0
- data/lib/todoly/task.rb +4 -0
- data/todoly.gemspec +2 -2
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -2,6 +2,33 @@
|
|
2
2
|
|
3
3
|
todoly is REST API client library for Todo.ly (http://todo.ly)
|
4
4
|
|
5
|
+
== Usage
|
6
|
+
|
7
|
+
Login (create Todoly instance)
|
8
|
+
todoly = Todoly.new :email => "xxx@example.com", :password => "xxxxxx"
|
9
|
+
|
10
|
+
Get project list
|
11
|
+
todoly.projects
|
12
|
+
|
13
|
+
Get filter list
|
14
|
+
todoly.filters
|
15
|
+
|
16
|
+
Get all task list
|
17
|
+
todoly.tasks
|
18
|
+
|
19
|
+
Get task list of a project
|
20
|
+
study = todoly.find_project("Study")
|
21
|
+
study.tasks
|
22
|
+
|
23
|
+
Create new task
|
24
|
+
# create task on toplevel
|
25
|
+
todoly.new_task("buy milk")
|
26
|
+
# create task on study project
|
27
|
+
todoly.new_task("write Todoly document", study)
|
28
|
+
|
29
|
+
Check task as done
|
30
|
+
task.check
|
31
|
+
|
5
32
|
== Contributing to todoly
|
6
33
|
|
7
34
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/lib/todoly.rb
CHANGED
@@ -16,20 +16,32 @@ class Todoly
|
|
16
16
|
@projects ||= Project.list(@rest_if)
|
17
17
|
end
|
18
18
|
|
19
|
+
def find_project(name)
|
20
|
+
projects().find{|prj| name === prj.name }
|
21
|
+
end
|
22
|
+
|
19
23
|
def filters
|
20
24
|
@filters ||= Filter.list(@rest_if)
|
21
25
|
end
|
22
26
|
|
27
|
+
def find_filters(name)
|
28
|
+
filters().find{|f| name === f.name }
|
29
|
+
end
|
30
|
+
|
23
31
|
def tasks
|
24
32
|
@tasks ||= Task.list(@rest_if)
|
25
33
|
end
|
26
34
|
|
35
|
+
def find_task(name)
|
36
|
+
tasks().find{|t| name === t.name }
|
37
|
+
end
|
38
|
+
|
27
39
|
def new_task(str, project = nil)
|
28
40
|
obj = {}
|
29
41
|
if project
|
30
42
|
obj["ProjectId"] = project.id
|
31
43
|
end
|
32
|
-
t = Task.create(str, obj)
|
44
|
+
t = Task.create(@rest_if, str, obj)
|
33
45
|
@tasks << t if @tasks
|
34
46
|
t
|
35
47
|
end
|
data/lib/todoly/filter.rb
CHANGED
data/lib/todoly/project.rb
CHANGED
data/lib/todoly/task.rb
CHANGED
data/todoly.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{todoly}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["nagachika"]
|
12
|
-
s.date = %q{2010-12-
|
12
|
+
s.date = %q{2010-12-29}
|
13
13
|
s.description = %q{Todo.ly REST API Library}
|
14
14
|
s.email = %q{nagachika00@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- nagachika
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-12-
|
17
|
+
date: 2010-12-29 00:00:00 +09:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -128,7 +128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
hash:
|
131
|
+
hash: 1375453063901961028
|
132
132
|
segments:
|
133
133
|
- 0
|
134
134
|
version: "0"
|