ruby-todoist-api-v7 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/todoist/command.rb +4 -4
- data/lib/todoist/request.rb +1 -2
- data/lib/todoist/service/item.rb +4 -4
- data/lib/todoist/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: df19e65ed5e5d8219709deb6ada10a2e52089449f83d84d840174ccd2d65ee06
|
4
|
+
data.tar.gz: 6fb988cf0bf314284854d496150729045c0b4156b10c77252a55c64f7de51acb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03a93424bafb16a76eab65bd7d2bf5f337c1bbb02e06e12420ab5fb37a1a27a5e5d33ebc885cc05a176e80fcddad60b6733f6eeecf2943fe7859054c30247798
|
7
|
+
data.tar.gz: d25232ea6aaeed8cce29d47bcec77e8c79e16109ccb168acdb03efaca6a33a1cd1a2eccff9a81280ed18cd7ecdc9dc1adf497648aad2a2af15d086ac47ff89a5
|
data/lib/todoist/command.rb
CHANGED
@@ -5,20 +5,20 @@ module Todoist
|
|
5
5
|
def initialize(type, object, temp_id = nil, uuid = nil)
|
6
6
|
@type = type
|
7
7
|
@object = object
|
8
|
-
@temp_id = object.temp_id
|
8
|
+
@temp_id = object.is_a?(Todoist::Resource) ? object.temp_id : temp_id
|
9
9
|
@uuid = uuid || SecureRandom.uuid
|
10
10
|
end
|
11
11
|
|
12
12
|
def arguments
|
13
|
-
object.to_submittable_hash
|
13
|
+
object.is_a?(Todoist::Resource) ? object.to_submittable_hash : object
|
14
14
|
end
|
15
15
|
|
16
16
|
def to_hash
|
17
17
|
{
|
18
18
|
type: type,
|
19
19
|
uuid: uuid,
|
20
|
-
args:
|
20
|
+
args: arguments
|
21
21
|
}.merge(temp_id ? { temp_id: temp_id} : {})
|
22
22
|
end
|
23
23
|
end
|
24
|
-
end
|
24
|
+
end
|
data/lib/todoist/request.rb
CHANGED
data/lib/todoist/service/item.rb
CHANGED
@@ -2,18 +2,18 @@ module Todoist
|
|
2
2
|
module Service
|
3
3
|
class Item < BaseService
|
4
4
|
def update(id, arguments)
|
5
|
-
@client.
|
5
|
+
@client.queue.add(create_command('item_update', arguments.merge({id: id})))
|
6
6
|
end
|
7
7
|
|
8
8
|
def delete(ids)
|
9
9
|
if ids.is_a?(FixNum)
|
10
10
|
ids = [ids]
|
11
11
|
end
|
12
|
-
|
12
|
+
@client.queue.add(create_command('item_delete', {ids: ids}))
|
13
13
|
end
|
14
14
|
|
15
15
|
def close(id)
|
16
|
-
@client.
|
16
|
+
@client.queue.add(create_command('item_close', {id: id}))
|
17
17
|
end
|
18
18
|
|
19
19
|
def collection_class
|
@@ -21,4 +21,4 @@ module Todoist
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
24
|
-
end
|
24
|
+
end
|
data/lib/todoist/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-todoist-api-v7
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maarten van Vliet
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.
|
126
|
+
rubygems_version: 2.7.6
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Wrapper for todoist api.
|