wunderlist-api 0.5.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad23c38f5b8957451a87a042b1834581e47bcb7f
4
- data.tar.gz: 892a07fe5d880e8c3bf08a6eb1f8e4c616f856ea
3
+ metadata.gz: 0c26db7da6589e921fe1dbc7def50bc92f93cfee
4
+ data.tar.gz: b59d118c742ca4d997fb45e512b53eb50d35fe89
5
5
  SHA512:
6
- metadata.gz: a6555fb6cc44b9c9b20ba7b1f226dcc4a5ef54456e677089ed82712eba0a11ad4b896ef5f18e4cfcb99208a3878ca0b80896f0afa2b8a6656bfc39ed410aa145
7
- data.tar.gz: 6e6afa1f665573b3e57f08daa9bedd84eaa8e3cea57cd0873c57a4c3cb6fc11b575d9b0dfe1878310787a99b03222167b831ed3e7d867d684310ffff36b88ff7
6
+ metadata.gz: c21c6bea0604af47403244e0c4f1550a8db56ab0373b0ade5d66aed31576c932ba93e3dff4f0f180b0e1d1f9c39453d74376a14db6573523aa46f7228a502f02
7
+ data.tar.gz: 6b22b5b5d618198ce9b83b861050523867a4e377283b216785f8f4dd462f76100d64a01738410625efb815652833a09f8c08962cd0857b45698d02b5c2ca00f1
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Wunderlist::Api
2
2
 
3
- TODO: Write a gem description
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
@@ -15,11 +15,11 @@ module Wunderlist
15
15
  @revision = attrs['revision']
16
16
  end
17
17
 
18
- def new_task(list_name, attrs = {})
19
- self.api.new_task(list_name, attrs)
18
+ def new_task(attrs = {})
19
+ self.api.new_task(self.title, attrs)
20
20
  end
21
21
 
22
- def tasks(completed = false)
22
+ def tasks(completed: false)
23
23
  self.api.tasks([self.title], completed)
24
24
  end
25
25
 
@@ -1,4 +1,5 @@
1
1
  require 'wunderlist/helper'
2
+ require 'time'
2
3
 
3
4
  module Wunderlist
4
5
  class Reminder
@@ -1,3 +1,3 @@
1
1
  module Wunderlist
2
- VERSION = "0.5.2"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wunderlist-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - shun3475