todoist-ruby 0.2.5 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4bf078a206d6401d5e257058da4948f5c07eb4e811d1d5205a4d7d004ae6c8d
4
- data.tar.gz: e8658818f731cc58b4305eb5f891d6084d80a390d70a6011417f1eb8380ca600
3
+ metadata.gz: fac119f56ff88593c57666afa9d7f479f2f628ba240960a47476e21a7542a2aa
4
+ data.tar.gz: c8cf6695169679ddad272f5836b15f8e40b67ea3cf4502c9156a13f648658fd3
5
5
  SHA512:
6
- metadata.gz: 30b7c35ca9477698fec2b2f14e0d2e2a82f47e328aa0387b156c5edc4427136b12300043deccbf9ece739b8579016d10e1d430ba09f20b78f6480fc8917c036d
7
- data.tar.gz: a8639df99ff2e11c33744f1cb7f21a56a4e395d7997d9690fa1b4098529307d2bea491b9e04a7a9413dbc5c253fd7602ab8011302f3a0b0c1d923093c7dca38a
6
+ metadata.gz: cf989e7a5c79620c636393f8b8da0d8fa2ac56bb82eb1708d1c13b4f93328931526b87bfa7d264f70577d5b6df9b72ab4874bffbfc91879a1ff3265bd535b1b6
7
+ data.tar.gz: 5662e4de13fe2a8124f2aa90e433820a58abbe35b0d23f37a05541bd29ad8d735be823289ccc03dac3ddc02dbc27de56bd21e08f09ddc21d12ff8976466a4825
data/README.md CHANGED
@@ -232,6 +232,7 @@ Use:
232
232
 
233
233
 
234
234
  ## Version History
235
+ * 0.2.6: Fixed File.exists? to File.exist. Updated deletion API call for items and projects with updated tests. Special thank you to @mtantawy for the pull request and updates!
235
236
  * 0.2.5: Fix for Extra params aren't sent when creating a item when using the misc add_item method. (Thank you to @juliend2)
236
237
  * 0.2.4: Numerous bug fixes to address v7 to v8 changes that go beyond just an endpoint change. Passing all specs.
237
238
  * 0.2.3: Updated to v8 endpoints
data/bin/setup CHANGED
File without changes
@@ -1,6 +1,6 @@
1
1
  module Todoist
2
2
  class Config
3
- TODOIST_API_URL = "https://api.todoist.com/sync/v8"
3
+ TODOIST_API_URL = "https://api.todoist.com/sync/v9"
4
4
 
5
5
  # List of commands supported
6
6
  @@command_list = [
@@ -18,10 +18,9 @@ module Todoist
18
18
  return @client.api_helper.command(args, "item_update")
19
19
  end
20
20
 
21
- # Delete items given an array of items
22
- def delete(items)
23
- item_ids = items.collect { |item| item.id }
24
- args = {ids: item_ids.to_json}
21
+ # Delete an item given an item id
22
+ def delete(item_id)
23
+ args = {id: item_id}
25
24
  return @client.api_helper.command(args, "item_delete")
26
25
  end
27
26
 
@@ -15,10 +15,9 @@ module Todoist
15
15
  return @client.api_helper.add(args, "project_add")
16
16
  end
17
17
 
18
- # Delete projects given an array of projects
19
- def delete(projects)
20
- project_ids = projects.collect { |project| project.id }
21
- args = {ids: project_ids.to_json}
18
+ # Delete a project given a project id
19
+ def delete(project_id)
20
+ args = {id: project_id}
22
21
  return @client.api_helper.command(args, "project_delete")
23
22
  end
24
23
 
@@ -29,6 +29,7 @@ module Todoist
29
29
 
30
30
  def configure_request(command, params)
31
31
  request = Net::HTTP::Post.new(Config.getURI()[command].request_uri)
32
+ request['Authorization'] = 'Bearer ' + params[:token]
32
33
  request.set_form_data(params)
33
34
  return request
34
35
  end
@@ -1,3 +1,3 @@
1
1
  module Todoist
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: todoist-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Han Yuan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-16 00:00:00.000000000 Z
11
+ date: 2023-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
231
  - !ruby/object:Gem::Version
232
232
  version: '0'
233
233
  requirements: []
234
- rubygems_version: 3.0.3
234
+ rubygems_version: 3.4.10
235
235
  signing_key:
236
236
  specification_version: 4
237
237
  summary: This gem provides access to the latest Todoist API.