todoist_rest_client 0.2.1 → 0.2.2
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 +4 -4
- data/lib/todoist_rest_client/version.rb +1 -1
- data/lib/todoist_rest_client.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bf6f9f0f918829a4b56652c094a5078bbf4d0f367ed3af28357464b86d52f703
|
|
4
|
+
data.tar.gz: 4a06239713577d2557ae69b4633d91c1f78cadd7782fc1ea990fb944e039b848
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6f3a77e67a42c9e9365760b98160c0ffb913774845a4caf7cffd891f9e03b74e20d3d4e8f8ad00e89213e7575eab2d7013d8c9dd1035dadb39e74a33bc62800b
|
|
7
|
+
data.tar.gz: 0cf26cd957c00d2ce0494df907fe64349318e46540aba251ab09a329f5ba12ee02349c1084d2fa8d97fca6c252ce902c0deeef732c54ef211a9f251ff569611d
|
data/lib/todoist_rest_client.rb
CHANGED
|
@@ -33,7 +33,9 @@ class TodoistRestClient
|
|
|
33
33
|
attr_writer :logger
|
|
34
34
|
|
|
35
35
|
def logger
|
|
36
|
-
|
|
36
|
+
# info, not Logger's default debug: a library shouldn't chatter on stdout (callers
|
|
37
|
+
# running from cron get every line mailed to them).
|
|
38
|
+
@logger ||= Logger.new($stdout, level: :info)
|
|
37
39
|
end
|
|
38
40
|
end
|
|
39
41
|
|
|
@@ -62,7 +64,7 @@ class TodoistRestClient
|
|
|
62
64
|
req = api_rest_request(path, verb, q_params:, j_params:, retries:, version: :v1, **kwparams)
|
|
63
65
|
q_params[:cursor] = req["next_cursor"]
|
|
64
66
|
@paged_reqs << req
|
|
65
|
-
|
|
67
|
+
self.class.logger.debug { "Path: #{path}, (#{results.count} + #{req["results"].count}), Next Cursor: [#{req["next_cursor"]}]" }
|
|
66
68
|
results += req["results"]
|
|
67
69
|
@stats_paginated << {path:, count: results.count, cursor: req["next_cursor"], last_id: results.last&.dig("id")}
|
|
68
70
|
break if req["next_cursor"].blank?
|