wunderlist-api 0.5.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +29 -6
- data/lib/wunderlist/list.rb +3 -3
- data/lib/wunderlist/reminder.rb +1 -0
- data/lib/wunderlist/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c26db7da6589e921fe1dbc7def50bc92f93cfee
|
4
|
+
data.tar.gz: b59d118c742ca4d997fb45e512b53eb50d35fe89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c21c6bea0604af47403244e0c4f1550a8db56ab0373b0ade5d66aed31576c932ba93e3dff4f0f180b0e1d1f9c39453d74376a14db6573523aa46f7228a502f02
|
7
|
+
data.tar.gz: 6b22b5b5d618198ce9b83b861050523867a4e377283b216785f8f4dd462f76100d64a01738410625efb815652833a09f8c08962cd0857b45698d02b5c2ca00f1
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Wunderlist::Api
|
2
2
|
|
3
|
-
|
3
|
+
You can manage Your Wunderlist Data like ActiveRecord with Ruby
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -27,13 +27,12 @@ require 'wunderlist'
|
|
27
27
|
```
|
28
28
|
# You must create API CLIENT at first.
|
29
29
|
wl = Wunderlist::API.new({
|
30
|
-
:access_token => <your access token>,
|
31
|
-
:client_id => <your client id>
|
30
|
+
:access_token => <your access token>,
|
31
|
+
:client_id => <your client id>
|
32
32
|
})
|
33
33
|
|
34
|
-
|
35
34
|
# You can create Task
|
36
|
-
task = wl.new_task(LIST_NAME, {:title => 'Hello World', :completed => true, :due_date => '2015-03-25' })
|
35
|
+
task = wl.new_task(LIST_NAME, {:title => 'Hello World', :completed => true, :due_date => '2015-03-25', :due_date => '2015-07-22'})
|
37
36
|
=> #<Wunderlist::Task:0x00000000000>
|
38
37
|
task.save
|
39
38
|
|
@@ -51,7 +50,6 @@ list = wl.list(LIST_NAME)
|
|
51
50
|
list.title = "IMOKENPI"
|
52
51
|
list.save
|
53
52
|
|
54
|
-
|
55
53
|
# You can get Wunderlist::Task Object Wrapped by Array
|
56
54
|
tasks = list.tasks
|
57
55
|
=> [#<Wunderlist::Task:0x00000000000>, #<Wunderlist::Task:0x11111111111>, ...]
|
@@ -61,12 +59,37 @@ or
|
|
61
59
|
tasks = wl.tasks([LIST_NAME1, LIST_NAME2])
|
62
60
|
=> [#<Wunderlist::Task:0x00000000000>, #<Wunderlist::Task:0x11111111111>, ...]
|
63
61
|
|
62
|
+
# You can get already completed tasks
|
63
|
+
tasks = list.tasks(:completed => true)
|
64
|
+
=> [#<Wunderlist::Task:0x00000000000>, #<Wunderlist::Task:0x11111111111>, ...]
|
65
|
+
|
66
|
+
or
|
67
|
+
|
68
|
+
tasks = wl.tasks([LIST_NAME1, LIST_NAME2], completed => true)
|
69
|
+
=> [#<Wunderlist::Task:0x00000000000>, #<Wunderlist::Task:0x11111111111>, ...]
|
70
|
+
|
64
71
|
# You can create and update note.
|
65
72
|
note = task.note
|
66
73
|
=> #<Wunderlist::Note:0x00000000000>
|
67
74
|
note.content = "Hello World"
|
68
75
|
note.save
|
69
76
|
|
77
|
+
# You can create and update reminder.
|
78
|
+
note = task.reminder
|
79
|
+
=> #<Wunderlist::Reminder:0x00000000000>
|
80
|
+
reminder.date = "2015-07-22 17:00"
|
81
|
+
reminder.save
|
82
|
+
|
83
|
+
# You can create and update subtask.
|
84
|
+
subtask = task.new_subtask({:title => "Hello World"})
|
85
|
+
=> #<Wunderlist::Subtask:0x00000000000>
|
86
|
+
subtask.save
|
87
|
+
|
88
|
+
# You can get Wunderlist::Subtask Object Wrapped by Array
|
89
|
+
subtasks = taks.subtasks
|
90
|
+
=> [#<Wunderlist::Subtask:0x00000000000>, #<Wunderlist::Subtask:0x11111111111>, ...]
|
91
|
+
|
92
|
+
|
70
93
|
```
|
71
94
|
|
72
95
|
## Contributing
|
data/lib/wunderlist/list.rb
CHANGED
@@ -15,11 +15,11 @@ module Wunderlist
|
|
15
15
|
@revision = attrs['revision']
|
16
16
|
end
|
17
17
|
|
18
|
-
def new_task(
|
19
|
-
self.api.new_task(
|
18
|
+
def new_task(attrs = {})
|
19
|
+
self.api.new_task(self.title, attrs)
|
20
20
|
end
|
21
21
|
|
22
|
-
def tasks(completed
|
22
|
+
def tasks(completed: false)
|
23
23
|
self.api.tasks([self.title], completed)
|
24
24
|
end
|
25
25
|
|
data/lib/wunderlist/reminder.rb
CHANGED
data/lib/wunderlist/version.rb
CHANGED