basecamp-sdk 0.35.0 → 0.36.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 +4 -4
- data/lib/basecamp/generated/metadata.json +1 -1
- data/lib/basecamp/generated/services/cards_service.rb +10 -5
- data/lib/basecamp/generated/types.rb +1 -1
- data/lib/basecamp/services/cards_extensions.rb +9 -3
- data/lib/basecamp/services/recordings_extensions.rb +6 -5
- data/lib/basecamp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 314401afda5770702cd72089245fa79d2c78a1eb408e378592172a9d5ff92386
|
|
4
|
+
data.tar.gz: ada4fb551b6f0959faf9a76af337faf9e4fd5af95623d173673a4f5265ae94ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 81fd8c83a6cb047592d3e8121caf250c21d30936f2efbec5e70e5d61ecba673afc70ae6c3a62bbfe0661b7998f7ef6384fbc8e6b3bba74c60b5eaee5718da12c
|
|
7
|
+
data.tar.gz: e7901c3bac9dc9d12336106e6d2894d4663d2b078d587fce2258dcd445fd1a66659a895c005c9944c52487e52d47ed2b8f188438cc8d97c36a69211f114a57be
|
|
@@ -22,10 +22,13 @@ module Basecamp
|
|
|
22
22
|
# @param content [String, nil] content
|
|
23
23
|
# @param due_on [String, nil] due on (YYYY-MM-DD)
|
|
24
24
|
# @param assignee_ids [Array, nil] assignee ids
|
|
25
|
+
# @param notify [Boolean, nil] Notify people newly assigned through assignee_ids in this same request.
|
|
26
|
+
# Off unless true, and has no effect without assignee_ids: people already
|
|
27
|
+
# assigned are not notified again.
|
|
25
28
|
# @return [Hash] response data
|
|
26
|
-
def update_verbatim(card_id:, title: nil, content: nil, due_on: nil, assignee_ids: nil)
|
|
29
|
+
def update_verbatim(card_id:, title: nil, content: nil, due_on: nil, assignee_ids: nil, notify: nil)
|
|
27
30
|
with_operation(service: "cards", operation: "update_verbatim", is_mutation: true, resource_id: card_id) do
|
|
28
|
-
http_put("/card_tables/cards/#{card_id}", body: compact_params(title: title, content: content, due_on: due_on, assignee_ids: assignee_ids)).json(operation: "UpdateCard")
|
|
31
|
+
http_put("/card_tables/cards/#{card_id}", body: compact_params(title: title, content: content, due_on: due_on, assignee_ids: assignee_ids, notify: notify)).json(operation: "UpdateCard")
|
|
29
32
|
end
|
|
30
33
|
end
|
|
31
34
|
|
|
@@ -59,11 +62,13 @@ module Basecamp
|
|
|
59
62
|
# @param title [String] title
|
|
60
63
|
# @param content [String, nil] content
|
|
61
64
|
# @param due_on [String, nil] due on (YYYY-MM-DD)
|
|
62
|
-
# @param
|
|
65
|
+
# @param assignee_ids [Array, nil] People to assign to the new card. BC3 keeps only the ids it finds among
|
|
66
|
+
# the card table's reachable people and silently drops the rest.
|
|
67
|
+
# @param notify [Boolean, nil] Notify the people assigned through assignee_ids. Off unless true.
|
|
63
68
|
# @return [Hash] response data
|
|
64
|
-
def create(column_id:, title:, content: nil, due_on: nil, notify: nil)
|
|
69
|
+
def create(column_id:, title:, content: nil, due_on: nil, assignee_ids: nil, notify: nil)
|
|
65
70
|
with_operation(service: "cards", operation: "create", is_mutation: true, resource_id: column_id) do
|
|
66
|
-
http_post("/card_tables/lists/#{column_id}/cards.json", body: compact_params(title: title, content: content, due_on: due_on, notify: notify)).json(operation: "CreateCard")
|
|
71
|
+
http_post("/card_tables/lists/#{column_id}/cards.json", body: compact_params(title: title, content: content, due_on: due_on, assignee_ids: assignee_ids, notify: notify)).json(operation: "CreateCard")
|
|
67
72
|
end
|
|
68
73
|
end
|
|
69
74
|
end
|
|
@@ -36,7 +36,9 @@ module Basecamp
|
|
|
36
36
|
# * a date — the due date is set
|
|
37
37
|
#
|
|
38
38
|
# Every other argument is plain send-when-set: +nil+ leaves the field off
|
|
39
|
-
# the body, and BC3 leaves the stored value untouched.
|
|
39
|
+
# the body, and BC3 leaves the stored value untouched. The exception is
|
|
40
|
+
# +notify+, a send directive rather than card state, which goes on the
|
|
41
|
+
# wire only when true (as on the todo writes).
|
|
40
42
|
#
|
|
41
43
|
# This is the same single PUT as {#update_verbatim}, which stays as the
|
|
42
44
|
# unnormalised path; +update+ differs only in mapping an empty +due_on+ to
|
|
@@ -47,8 +49,11 @@ module Basecamp
|
|
|
47
49
|
# @param content [String, nil] new content (nil = keep current, "" clears)
|
|
48
50
|
# @param due_on [String, nil] new due date (nil = keep current, "" clears)
|
|
49
51
|
# @param assignee_ids [Array, nil] new assignees (nil = keep current, [] clears)
|
|
52
|
+
# @param notify [Boolean, nil] notify the people this request newly assigns
|
|
53
|
+
# through +assignee_ids+; sent only when true, and without effect unless
|
|
54
|
+
# +assignee_ids+ is sent too
|
|
50
55
|
# @return [Hash] the updated card
|
|
51
|
-
def update(card_id:, title: nil, content: nil, due_on: nil, assignee_ids: nil)
|
|
56
|
+
def update(card_id:, title: nil, content: nil, due_on: nil, assignee_ids: nil, notify: nil)
|
|
52
57
|
resolved_due_on =
|
|
53
58
|
if due_on.nil?
|
|
54
59
|
# Unaddressed. +compact_params+ drops the nil, so no key is sent and
|
|
@@ -67,7 +72,8 @@ module Basecamp
|
|
|
67
72
|
title: title,
|
|
68
73
|
content: content,
|
|
69
74
|
due_on: resolved_due_on,
|
|
70
|
-
assignee_ids: assignee_ids
|
|
75
|
+
assignee_ids: assignee_ids,
|
|
76
|
+
notify: notify ? true : nil
|
|
71
77
|
)
|
|
72
78
|
end
|
|
73
79
|
end
|
|
@@ -645,17 +645,18 @@ module Basecamp
|
|
|
645
645
|
# member was kept where the reference reads 0 and drops it.
|
|
646
646
|
creator_member = read_member(summary["creator"], "name", "creator", kind: :person)
|
|
647
647
|
creator_member.nil? ? summary.delete("creator") : summary["creator"] = creator_member
|
|
648
|
-
# Absent or
|
|
649
|
-
#
|
|
650
|
-
#
|
|
651
|
-
#
|
|
648
|
+
# Absent (or null) is nothing to report, so the key goes. A list the
|
|
649
|
+
# server sent stays, empty or not: the reference's +omitzero+ keeps a
|
|
650
|
+
# server-sent [] as [], so a to-do with no assignees reads
|
|
651
|
+
# "assignees" => [] in every SDK. Anything else that is not an array of
|
|
652
|
+
# objects is a decode failure there and fails the read here.
|
|
652
653
|
#
|
|
653
654
|
# This comment used to say a malformed "assignees" was read as absent
|
|
654
655
|
# "for the same reason a malformed bucket is". That reason stopped being
|
|
655
656
|
# true when the bucket started raising, and the sentence survived the
|
|
656
657
|
# change it contradicted — which is the whole hazard of writing an
|
|
657
658
|
# invariant down next to the code instead of into a test.
|
|
658
|
-
if assignees.nil?
|
|
659
|
+
if assignees.nil?
|
|
659
660
|
summary.delete("assignees")
|
|
660
661
|
else
|
|
661
662
|
summary["assignees"] = read_assignees(assignees)
|
data/lib/basecamp/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: basecamp-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.36.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Basecamp
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|