basecamp-sdk 0.18.0 → 0.19.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/README.md +1 -1
- data/lib/basecamp/api_error.rb +5 -3
- data/lib/basecamp/bucket_mismatch_error.rb +41 -0
- data/lib/basecamp/campfire_discovery_incomplete_error.rb +57 -0
- data/lib/basecamp/campfire_index.rb +398 -0
- data/lib/basecamp/client.rb +47 -4
- data/lib/basecamp/generated/metadata.json +728 -1
- data/lib/basecamp/generated/services/account_service.rb +2 -2
- data/lib/basecamp/generated/services/attachments_service.rb +1 -1
- data/lib/basecamp/generated/services/automation_service.rb +1 -1
- data/lib/basecamp/generated/services/bookmarks_service.rb +2 -2
- data/lib/basecamp/generated/services/boosts_service.rb +3 -3
- data/lib/basecamp/generated/services/calendars_service.rb +2 -2
- data/lib/basecamp/generated/services/campfires_service.rb +7 -7
- data/lib/basecamp/generated/services/card_columns_service.rb +6 -6
- data/lib/basecamp/generated/services/card_steps_service.rb +4 -4
- data/lib/basecamp/generated/services/card_tables_service.rb +1 -1
- data/lib/basecamp/generated/services/cards_service.rb +3 -3
- data/lib/basecamp/generated/services/checkins_service.rb +9 -9
- data/lib/basecamp/generated/services/client_approvals_service.rb +1 -1
- data/lib/basecamp/generated/services/client_correspondences_service.rb +1 -1
- data/lib/basecamp/generated/services/client_replies_service.rb +1 -1
- data/lib/basecamp/generated/services/client_visibility_service.rb +1 -1
- data/lib/basecamp/generated/services/cloud_files_service.rb +3 -3
- data/lib/basecamp/generated/services/comments_service.rb +3 -3
- data/lib/basecamp/generated/services/documents_service.rb +3 -3
- data/lib/basecamp/generated/services/event_feed_service.rb +58 -0
- data/lib/basecamp/generated/services/everything_service.rb +2 -2
- data/lib/basecamp/generated/services/folders_service.rb +4 -4
- data/lib/basecamp/generated/services/forwards_service.rb +3 -3
- data/lib/basecamp/generated/services/gauges_service.rb +10 -6
- data/lib/basecamp/generated/services/google_documents_service.rb +3 -3
- data/lib/basecamp/generated/services/hill_charts_service.rb +2 -2
- data/lib/basecamp/generated/services/message_boards_service.rb +1 -1
- data/lib/basecamp/generated/services/message_types_service.rb +3 -3
- data/lib/basecamp/generated/services/messages_service.rb +3 -3
- data/lib/basecamp/generated/services/my_assignments_service.rb +3 -3
- data/lib/basecamp/generated/services/my_notes_service.rb +2 -2
- data/lib/basecamp/generated/services/my_notifications_service.rb +1 -1
- data/lib/basecamp/generated/services/people_service.rb +11 -11
- data/lib/basecamp/generated/services/projects_service.rb +4 -4
- data/lib/basecamp/generated/services/recordings_service.rb +1 -1
- data/lib/basecamp/generated/services/reports_service.rb +3 -3
- data/lib/basecamp/generated/services/schedules_service.rb +6 -6
- data/lib/basecamp/generated/services/search_service.rb +1 -1
- data/lib/basecamp/generated/services/subscriptions_service.rb +3 -3
- data/lib/basecamp/generated/services/templates_service.rb +8 -8
- data/lib/basecamp/generated/services/timesheets_service.rb +4 -4
- data/lib/basecamp/generated/services/todolist_groups_service.rb +1 -1
- data/lib/basecamp/generated/services/todolists_service.rb +3 -3
- data/lib/basecamp/generated/services/todos_service.rb +4 -4
- data/lib/basecamp/generated/services/todosets_service.rb +1 -1
- data/lib/basecamp/generated/services/tools_service.rb +3 -3
- data/lib/basecamp/generated/services/uploads_service.rb +4 -4
- data/lib/basecamp/generated/services/vaults_service.rb +3 -3
- data/lib/basecamp/generated/services/webhooks_service.rb +3 -3
- data/lib/basecamp/generated/services/wormholes_service.rb +2 -2
- data/lib/basecamp/generated/types.rb +108 -6
- data/lib/basecamp/http.rb +383 -60
- data/lib/basecamp/ids.rb +277 -0
- data/lib/basecamp/mentions.rb +1119 -0
- data/lib/basecamp/person_id_sites.rb +184 -0
- data/lib/basecamp/recording_routing_error.rb +50 -0
- data/lib/basecamp/recording_summary_error.rb +33 -0
- data/lib/basecamp/services/comments_extensions.rb +121 -0
- data/lib/basecamp/services/merge_safe.rb +37 -13
- data/lib/basecamp/services/recordings_extensions.rb +1305 -0
- data/lib/basecamp/services/todolists_extensions.rb +4 -3
- data/lib/basecamp/text.rb +94 -0
- data/lib/basecamp/unresolved_recording_error.rb +68 -0
- data/lib/basecamp/version.rb +1 -1
- data/lib/basecamp/webhooks/event.rb +4 -1
- data/lib/basecamp.rb +22 -4
- data/scripts/generate-metadata.rb +75 -2
- data/scripts/generate-services.rb +35 -8
- data/scripts/generate-types.rb +19 -0
- metadata +15 -2
|
@@ -11,7 +11,7 @@ module Basecamp
|
|
|
11
11
|
# @return [Hash] response data
|
|
12
12
|
def get_account()
|
|
13
13
|
with_operation(service: "account", operation: "get_account", is_mutation: false) do
|
|
14
|
-
http_get("/account.json", operation: "GetAccount").json
|
|
14
|
+
http_get("/account.json", operation: "GetAccount").json(operation: "GetAccount")
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -41,7 +41,7 @@ module Basecamp
|
|
|
41
41
|
# @return [Hash] response data
|
|
42
42
|
def update_account_name(name:)
|
|
43
43
|
with_operation(service: "account", operation: "update_account_name", is_mutation: true) do
|
|
44
|
-
http_put("/account/name.json", body: compact_params(name: name)).json
|
|
44
|
+
http_put("/account/name.json", body: compact_params(name: name)).json(operation: "UpdateAccountName")
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
end
|
|
@@ -16,7 +16,7 @@ module Basecamp
|
|
|
16
16
|
# @return [Hash] response data
|
|
17
17
|
def create(data:, content_type:, name:)
|
|
18
18
|
with_operation(service: "attachments", operation: "create", is_mutation: true) do
|
|
19
|
-
http_post_raw("/attachments.json?name=#{URI.encode_www_form_component(name.to_s)}", body: data, content_type: content_type).json
|
|
19
|
+
http_post_raw("/attachments.json?name=#{URI.encode_www_form_component(name.to_s)}", body: data, content_type: content_type).json(operation: "CreateAttachment")
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
end
|
|
@@ -11,7 +11,7 @@ module Basecamp
|
|
|
11
11
|
# @return [Array<Hash>] response data
|
|
12
12
|
def list_lineup_markers()
|
|
13
13
|
with_operation(service: "automation", operation: "list_lineup_markers", is_mutation: false) do
|
|
14
|
-
http_get("/lineup/markers.json", operation: "ListLineupMarkers").json
|
|
14
|
+
http_get("/lineup/markers.json", operation: "ListLineupMarkers").json(operation: "ListLineupMarkers")
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
end
|
|
@@ -23,7 +23,7 @@ module Basecamp
|
|
|
23
23
|
# @return [Hash] response data
|
|
24
24
|
def get_bookmark(recording_id:)
|
|
25
25
|
with_operation(service: "bookmarks", operation: "get_bookmark", is_mutation: false, resource_id: recording_id) do
|
|
26
|
-
http_get("/recordings/#{recording_id}/bookmark.json", operation: "GetBookmark").json
|
|
26
|
+
http_get("/recordings/#{recording_id}/bookmark.json", operation: "GetBookmark").json(operation: "GetBookmark")
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -32,7 +32,7 @@ module Basecamp
|
|
|
32
32
|
# @return [Hash] response data
|
|
33
33
|
def create_bookmark(recording_id:)
|
|
34
34
|
with_operation(service: "bookmarks", operation: "create_bookmark", is_mutation: true, resource_id: recording_id) do
|
|
35
|
-
http_post("/recordings/#{recording_id}/bookmark.json").json
|
|
35
|
+
http_post("/recordings/#{recording_id}/bookmark.json").json(operation: "CreateBookmark")
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get_boost(boost_id:)
|
|
14
14
|
with_operation(service: "boosts", operation: "get_boost", is_mutation: false, resource_id: boost_id) do
|
|
15
|
-
http_get("/boosts/#{boost_id}", operation: "GetBoost").json
|
|
15
|
+
http_get("/boosts/#{boost_id}", operation: "GetBoost").json(operation: "GetBoost")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -44,7 +44,7 @@ module Basecamp
|
|
|
44
44
|
# @return [Hash] response data
|
|
45
45
|
def create_recording_boost(recording_id:, content:)
|
|
46
46
|
with_operation(service: "boosts", operation: "create_recording_boost", is_mutation: true, resource_id: recording_id) do
|
|
47
|
-
http_post("/recordings/#{recording_id}/boosts.json", body: compact_params(content: content)).json
|
|
47
|
+
http_post("/recordings/#{recording_id}/boosts.json", body: compact_params(content: content)).json(operation: "CreateRecordingBoost")
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
|
|
@@ -68,7 +68,7 @@ module Basecamp
|
|
|
68
68
|
# @return [Hash] response data
|
|
69
69
|
def create_event_boost(recording_id:, event_id:, content:)
|
|
70
70
|
with_operation(service: "boosts", operation: "create_event_boost", is_mutation: true, resource_id: event_id) do
|
|
71
|
-
http_post("/recordings/#{recording_id}/events/#{event_id}/boosts.json", body: compact_params(content: content)).json
|
|
71
|
+
http_post("/recordings/#{recording_id}/events/#{event_id}/boosts.json", body: compact_params(content: content)).json(operation: "CreateEventBoost")
|
|
72
72
|
end
|
|
73
73
|
end
|
|
74
74
|
end
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get_calendar(calendar_id:)
|
|
14
14
|
with_operation(service: "calendars", operation: "get_calendar", is_mutation: false, resource_id: calendar_id) do
|
|
15
|
-
http_get("/calendars/#{calendar_id}", operation: "GetCalendar").json
|
|
15
|
+
http_get("/calendars/#{calendar_id}", operation: "GetCalendar").json(operation: "GetCalendar")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ module Basecamp
|
|
|
22
22
|
# @return [Hash] response data
|
|
23
23
|
def update_calendar(calendar_id:, calendar:)
|
|
24
24
|
with_operation(service: "calendars", operation: "update_calendar", is_mutation: true, resource_id: calendar_id) do
|
|
25
|
-
http_put("/calendars/#{calendar_id}", body: compact_params(calendar: calendar)).json
|
|
25
|
+
http_put("/calendars/#{calendar_id}", body: compact_params(calendar: calendar)).json(operation: "UpdateCalendar")
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
end
|
|
@@ -28,7 +28,7 @@ module Basecamp
|
|
|
28
28
|
# @return [Hash] response data
|
|
29
29
|
def create_chatbot(bucket_id:, campfire_id:, service_name:, command_url: nil)
|
|
30
30
|
with_operation(service: "campfires", operation: "create_chatbot", is_mutation: true, project_id: bucket_id, resource_id: campfire_id) do
|
|
31
|
-
http_post("/buckets/#{bucket_id}/chats/#{campfire_id}/integrations.json", body: compact_params(service_name: service_name, command_url: command_url)).json
|
|
31
|
+
http_post("/buckets/#{bucket_id}/chats/#{campfire_id}/integrations.json", body: compact_params(service_name: service_name, command_url: command_url)).json(operation: "CreateChatbot")
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
@@ -39,7 +39,7 @@ module Basecamp
|
|
|
39
39
|
# @return [Hash] response data
|
|
40
40
|
def get_chatbot(bucket_id:, campfire_id:, chatbot_id:)
|
|
41
41
|
with_operation(service: "campfires", operation: "get_chatbot", is_mutation: false, project_id: bucket_id, resource_id: chatbot_id) do
|
|
42
|
-
http_get("/buckets/#{bucket_id}/chats/#{campfire_id}/integrations/#{chatbot_id}", operation: "GetChatbot").json
|
|
42
|
+
http_get("/buckets/#{bucket_id}/chats/#{campfire_id}/integrations/#{chatbot_id}", operation: "GetChatbot").json(operation: "GetChatbot")
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
|
|
@@ -52,7 +52,7 @@ module Basecamp
|
|
|
52
52
|
# @return [Hash] response data
|
|
53
53
|
def update_chatbot(bucket_id:, campfire_id:, chatbot_id:, service_name:, command_url: nil)
|
|
54
54
|
with_operation(service: "campfires", operation: "update_chatbot", is_mutation: true, project_id: bucket_id, resource_id: chatbot_id) do
|
|
55
|
-
http_put("/buckets/#{bucket_id}/chats/#{campfire_id}/integrations/#{chatbot_id}", body: compact_params(service_name: service_name, command_url: command_url)).json
|
|
55
|
+
http_put("/buckets/#{bucket_id}/chats/#{campfire_id}/integrations/#{chatbot_id}", body: compact_params(service_name: service_name, command_url: command_url)).json(operation: "UpdateChatbot")
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
58
|
|
|
@@ -84,7 +84,7 @@ module Basecamp
|
|
|
84
84
|
# @return [Hash] response data
|
|
85
85
|
def get(campfire_id:)
|
|
86
86
|
with_operation(service: "campfires", operation: "get", is_mutation: false, resource_id: campfire_id) do
|
|
87
|
-
http_get("/chats/#{campfire_id}", operation: "GetCampfire").json
|
|
87
|
+
http_get("/chats/#{campfire_id}", operation: "GetCampfire").json(operation: "GetCampfire")
|
|
88
88
|
end
|
|
89
89
|
end
|
|
90
90
|
|
|
@@ -109,7 +109,7 @@ module Basecamp
|
|
|
109
109
|
# @return [Hash] response data
|
|
110
110
|
def create_line(campfire_id:, content:, content_type: nil)
|
|
111
111
|
with_operation(service: "campfires", operation: "create_line", is_mutation: true, resource_id: campfire_id) do
|
|
112
|
-
http_post("/chats/#{campfire_id}/lines.json", body: compact_params(content: content, content_type: content_type)).json
|
|
112
|
+
http_post("/chats/#{campfire_id}/lines.json", body: compact_params(content: content, content_type: content_type)).json(operation: "CreateCampfireLine")
|
|
113
113
|
end
|
|
114
114
|
end
|
|
115
115
|
|
|
@@ -119,7 +119,7 @@ module Basecamp
|
|
|
119
119
|
# @return [Hash] response data
|
|
120
120
|
def get_line(campfire_id:, line_id:)
|
|
121
121
|
with_operation(service: "campfires", operation: "get_line", is_mutation: false, resource_id: line_id) do
|
|
122
|
-
http_get("/chats/#{campfire_id}/lines/#{line_id}", operation: "GetCampfireLine").json
|
|
122
|
+
http_get("/chats/#{campfire_id}/lines/#{line_id}", operation: "GetCampfireLine").json(operation: "GetCampfireLine")
|
|
123
123
|
end
|
|
124
124
|
end
|
|
125
125
|
|
|
@@ -168,7 +168,7 @@ module Basecamp
|
|
|
168
168
|
# @return [Hash] response data
|
|
169
169
|
def create_upload(campfire_id:, data:, content_type:, name:)
|
|
170
170
|
with_operation(service: "campfires", operation: "create_upload", is_mutation: true, resource_id: campfire_id) do
|
|
171
|
-
http_post_raw("/chats/#{campfire_id}/uploads.json?name=#{URI.encode_www_form_component(name.to_s)}", body: data, content_type: content_type).json
|
|
171
|
+
http_post_raw("/chats/#{campfire_id}/uploads.json?name=#{URI.encode_www_form_component(name.to_s)}", body: data, content_type: content_type).json(operation: "CreateCampfireUpload")
|
|
172
172
|
end
|
|
173
173
|
end
|
|
174
174
|
end
|
|
@@ -14,7 +14,7 @@ module Basecamp
|
|
|
14
14
|
# @return [Hash] response data
|
|
15
15
|
def set_color(bucket_id:, column_id:, color:)
|
|
16
16
|
with_operation(service: "cardcolumns", operation: "set_color", is_mutation: true, project_id: bucket_id, resource_id: column_id) do
|
|
17
|
-
http_put("/buckets/#{bucket_id}/card_tables/columns/#{column_id}/color.json", body: compact_params(color: color)).json
|
|
17
|
+
http_put("/buckets/#{bucket_id}/card_tables/columns/#{column_id}/color.json", body: compact_params(color: color)).json(operation: "SetCardColumnColor")
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
|
|
@@ -24,7 +24,7 @@ module Basecamp
|
|
|
24
24
|
# @return [Hash] response data
|
|
25
25
|
def enable_on_hold(bucket_id:, column_id:)
|
|
26
26
|
with_operation(service: "cardcolumns", operation: "enable_on_hold", is_mutation: true, project_id: bucket_id, resource_id: column_id) do
|
|
27
|
-
http_post("/buckets/#{bucket_id}/card_tables/columns/#{column_id}/on_hold.json").json
|
|
27
|
+
http_post("/buckets/#{bucket_id}/card_tables/columns/#{column_id}/on_hold.json").json(operation: "EnableCardColumnOnHold")
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
|
|
@@ -34,7 +34,7 @@ module Basecamp
|
|
|
34
34
|
# @return [Hash] response data
|
|
35
35
|
def disable_on_hold(bucket_id:, column_id:)
|
|
36
36
|
with_operation(service: "cardcolumns", operation: "disable_on_hold", is_mutation: true, project_id: bucket_id, resource_id: column_id) do
|
|
37
|
-
http_delete("/buckets/#{bucket_id}/card_tables/columns/#{column_id}/on_hold.json").json
|
|
37
|
+
http_delete("/buckets/#{bucket_id}/card_tables/columns/#{column_id}/on_hold.json").json(operation: "DisableCardColumnOnHold")
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
@@ -43,7 +43,7 @@ module Basecamp
|
|
|
43
43
|
# @return [Hash] response data
|
|
44
44
|
def get(column_id:)
|
|
45
45
|
with_operation(service: "cardcolumns", operation: "get", is_mutation: false, resource_id: column_id) do
|
|
46
|
-
http_get("/card_tables/columns/#{column_id}", operation: "GetCardColumn").json
|
|
46
|
+
http_get("/card_tables/columns/#{column_id}", operation: "GetCardColumn").json(operation: "GetCardColumn")
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -54,7 +54,7 @@ module Basecamp
|
|
|
54
54
|
# @return [Hash] response data
|
|
55
55
|
def update(column_id:, title: nil, description: nil)
|
|
56
56
|
with_operation(service: "cardcolumns", operation: "update", is_mutation: true, resource_id: column_id) do
|
|
57
|
-
http_put("/card_tables/columns/#{column_id}", body: compact_params(title: title, description: description)).json
|
|
57
|
+
http_put("/card_tables/columns/#{column_id}", body: compact_params(title: title, description: description)).json(operation: "UpdateCardColumn")
|
|
58
58
|
end
|
|
59
59
|
end
|
|
60
60
|
|
|
@@ -85,7 +85,7 @@ module Basecamp
|
|
|
85
85
|
# @return [Hash] response data
|
|
86
86
|
def create(card_table_id:, title:, description: nil)
|
|
87
87
|
with_operation(service: "cardcolumns", operation: "create", is_mutation: true, resource_id: card_table_id) do
|
|
88
|
-
http_post("/card_tables/#{card_table_id}/columns.json", body: compact_params(title: title, description: description)).json
|
|
88
|
+
http_post("/card_tables/#{card_table_id}/columns.json", body: compact_params(title: title, description: description)).json(operation: "CreateCardColumn")
|
|
89
89
|
end
|
|
90
90
|
end
|
|
91
91
|
|
|
@@ -27,7 +27,7 @@ module Basecamp
|
|
|
27
27
|
# @return [Hash] response data
|
|
28
28
|
def create(card_id:, title:, due_on: nil, assignee_ids: nil)
|
|
29
29
|
with_operation(service: "cardsteps", operation: "create", is_mutation: true, resource_id: card_id) do
|
|
30
|
-
http_post("/card_tables/cards/#{card_id}/steps.json", body: compact_params(title: title, due_on: due_on, assignee_ids: assignee_ids)).json
|
|
30
|
+
http_post("/card_tables/cards/#{card_id}/steps.json", body: compact_params(title: title, due_on: due_on, assignee_ids: assignee_ids)).json(operation: "CreateCardStep")
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
|
|
@@ -36,7 +36,7 @@ module Basecamp
|
|
|
36
36
|
# @return [Hash] response data
|
|
37
37
|
def get(step_id:)
|
|
38
38
|
with_operation(service: "cardsteps", operation: "get", is_mutation: false, resource_id: step_id) do
|
|
39
|
-
http_get("/card_tables/steps/#{step_id}", operation: "GetCardStep").json
|
|
39
|
+
http_get("/card_tables/steps/#{step_id}", operation: "GetCardStep").json(operation: "GetCardStep")
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
|
|
@@ -48,7 +48,7 @@ module Basecamp
|
|
|
48
48
|
# @return [Hash] response data
|
|
49
49
|
def update(step_id:, title: nil, due_on: nil, assignee_ids: nil)
|
|
50
50
|
with_operation(service: "cardsteps", operation: "update", is_mutation: true, resource_id: step_id) do
|
|
51
|
-
http_put("/card_tables/steps/#{step_id}", body: compact_params(title: title, due_on: due_on, assignee_ids: assignee_ids)).json
|
|
51
|
+
http_put("/card_tables/steps/#{step_id}", body: compact_params(title: title, due_on: due_on, assignee_ids: assignee_ids)).json(operation: "UpdateCardStep")
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
54
|
|
|
@@ -58,7 +58,7 @@ module Basecamp
|
|
|
58
58
|
# @return [Hash] response data
|
|
59
59
|
def set_completion(step_id:, completion:)
|
|
60
60
|
with_operation(service: "cardsteps", operation: "set_completion", is_mutation: true, resource_id: step_id) do
|
|
61
|
-
http_put("/card_tables/steps/#{step_id}/completions.json", body: compact_params(completion: completion)).json
|
|
61
|
+
http_put("/card_tables/steps/#{step_id}/completions.json", body: compact_params(completion: completion)).json(operation: "SetCardStepCompletion")
|
|
62
62
|
end
|
|
63
63
|
end
|
|
64
64
|
end
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(card_table_id:)
|
|
14
14
|
with_operation(service: "cardtables", operation: "get", is_mutation: false, resource_id: card_table_id) do
|
|
15
|
-
http_get("/card_tables/#{card_table_id}", operation: "GetCardTable").json
|
|
15
|
+
http_get("/card_tables/#{card_table_id}", operation: "GetCardTable").json(operation: "GetCardTable")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
end
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(card_id:)
|
|
14
14
|
with_operation(service: "cards", operation: "get", is_mutation: false, resource_id: card_id) do
|
|
15
|
-
http_get("/card_tables/cards/#{card_id}", operation: "GetCard").json
|
|
15
|
+
http_get("/card_tables/cards/#{card_id}", operation: "GetCard").json(operation: "GetCard")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -25,7 +25,7 @@ module Basecamp
|
|
|
25
25
|
# @return [Hash] response data
|
|
26
26
|
def update_verbatim(card_id:, title: nil, content: nil, due_on: nil, assignee_ids: nil)
|
|
27
27
|
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
|
|
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")
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
@@ -62,7 +62,7 @@ module Basecamp
|
|
|
62
62
|
# @return [Hash] response data
|
|
63
63
|
def create(column_id:, title:, content: nil, due_on: nil, notify: nil)
|
|
64
64
|
with_operation(service: "cards", operation: "create", is_mutation: true, resource_id: column_id) do
|
|
65
|
-
http_post("/card_tables/lists/#{column_id}/cards.json", body: compact_params(title: title, content: content, due_on: due_on, notify: notify)).json
|
|
65
|
+
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")
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
68
|
end
|
|
@@ -23,7 +23,7 @@ module Basecamp
|
|
|
23
23
|
# @return [Hash] response data
|
|
24
24
|
def get_answer(answer_id:)
|
|
25
25
|
with_operation(service: "checkins", operation: "get_answer", is_mutation: false, resource_id: answer_id) do
|
|
26
|
-
http_get("/question_answers/#{answer_id}", operation: "GetAnswer").json
|
|
26
|
+
http_get("/question_answers/#{answer_id}", operation: "GetAnswer").json(operation: "GetAnswer")
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -44,7 +44,7 @@ module Basecamp
|
|
|
44
44
|
# @return [Hash] response data
|
|
45
45
|
def get_questionnaire(questionnaire_id:)
|
|
46
46
|
with_operation(service: "checkins", operation: "get_questionnaire", is_mutation: false, resource_id: questionnaire_id) do
|
|
47
|
-
http_get("/questionnaires/#{questionnaire_id}", operation: "GetQuestionnaire").json
|
|
47
|
+
http_get("/questionnaires/#{questionnaire_id}", operation: "GetQuestionnaire").json(operation: "GetQuestionnaire")
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
|
|
@@ -68,7 +68,7 @@ module Basecamp
|
|
|
68
68
|
# @return [Hash] response data
|
|
69
69
|
def create_question(questionnaire_id:, title:, schedule:, visible_to_clients: nil)
|
|
70
70
|
with_operation(service: "checkins", operation: "create_question", is_mutation: true, resource_id: questionnaire_id) do
|
|
71
|
-
http_post("/questionnaires/#{questionnaire_id}/questions.json", body: compact_params(title: title, schedule: schedule, visible_to_clients: visible_to_clients)).json
|
|
71
|
+
http_post("/questionnaires/#{questionnaire_id}/questions.json", body: compact_params(title: title, schedule: schedule, visible_to_clients: visible_to_clients)).json(operation: "CreateQuestion")
|
|
72
72
|
end
|
|
73
73
|
end
|
|
74
74
|
|
|
@@ -77,7 +77,7 @@ module Basecamp
|
|
|
77
77
|
# @return [Hash] response data
|
|
78
78
|
def get_question(question_id:)
|
|
79
79
|
with_operation(service: "checkins", operation: "get_question", is_mutation: false, resource_id: question_id) do
|
|
80
|
-
http_get("/questions/#{question_id}", operation: "GetQuestion").json
|
|
80
|
+
http_get("/questions/#{question_id}", operation: "GetQuestion").json(operation: "GetQuestion")
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
|
|
@@ -89,7 +89,7 @@ module Basecamp
|
|
|
89
89
|
# @return [Hash] response data
|
|
90
90
|
def update_question(question_id:, title: nil, schedule: nil, paused: nil)
|
|
91
91
|
with_operation(service: "checkins", operation: "update_question", is_mutation: true, resource_id: question_id) do
|
|
92
|
-
http_put("/questions/#{question_id}", body: compact_params(title: title, schedule: schedule, paused: paused)).json
|
|
92
|
+
http_put("/questions/#{question_id}", body: compact_params(title: title, schedule: schedule, paused: paused)).json(operation: "UpdateQuestion")
|
|
93
93
|
end
|
|
94
94
|
end
|
|
95
95
|
|
|
@@ -112,7 +112,7 @@ module Basecamp
|
|
|
112
112
|
# @return [Hash] response data
|
|
113
113
|
def create_answer(question_id:, content:, group_on: nil)
|
|
114
114
|
with_operation(service: "checkins", operation: "create_answer", is_mutation: true, resource_id: question_id) do
|
|
115
|
-
http_post("/questions/#{question_id}/answers.json", body: compact_params(content: content, group_on: group_on)).json
|
|
115
|
+
http_post("/questions/#{question_id}/answers.json", body: compact_params(content: content, group_on: group_on)).json(operation: "CreateAnswer")
|
|
116
116
|
end
|
|
117
117
|
end
|
|
118
118
|
|
|
@@ -146,7 +146,7 @@ module Basecamp
|
|
|
146
146
|
# @return [Hash] response data
|
|
147
147
|
def update_notification_settings(question_id:, notify_on_answer: nil, digest_include_unanswered: nil)
|
|
148
148
|
with_operation(service: "checkins", operation: "update_notification_settings", is_mutation: true, resource_id: question_id) do
|
|
149
|
-
http_put("/questions/#{question_id}/notification_settings.json", body: compact_params(notify_on_answer: notify_on_answer, digest_include_unanswered: digest_include_unanswered)).json
|
|
149
|
+
http_put("/questions/#{question_id}/notification_settings.json", body: compact_params(notify_on_answer: notify_on_answer, digest_include_unanswered: digest_include_unanswered)).json(operation: "UpdateQuestionNotificationSettings")
|
|
150
150
|
end
|
|
151
151
|
end
|
|
152
152
|
|
|
@@ -155,7 +155,7 @@ module Basecamp
|
|
|
155
155
|
# @return [Hash] response data
|
|
156
156
|
def pause(question_id:)
|
|
157
157
|
with_operation(service: "checkins", operation: "pause", is_mutation: true, resource_id: question_id) do
|
|
158
|
-
http_post("/questions/#{question_id}/pause.json").json
|
|
158
|
+
http_post("/questions/#{question_id}/pause.json").json(operation: "PauseQuestion")
|
|
159
159
|
end
|
|
160
160
|
end
|
|
161
161
|
|
|
@@ -164,7 +164,7 @@ module Basecamp
|
|
|
164
164
|
# @return [Hash] response data
|
|
165
165
|
def resume(question_id:)
|
|
166
166
|
with_operation(service: "checkins", operation: "resume", is_mutation: true, resource_id: question_id) do
|
|
167
|
-
http_delete("/questions/#{question_id}/pause.json").json
|
|
167
|
+
http_delete("/questions/#{question_id}/pause.json").json(operation: "ResumeQuestion")
|
|
168
168
|
end
|
|
169
169
|
end
|
|
170
170
|
end
|
|
@@ -26,7 +26,7 @@ module Basecamp
|
|
|
26
26
|
# @return [Hash] response data
|
|
27
27
|
def get(approval_id:)
|
|
28
28
|
with_operation(service: "clientapprovals", operation: "get", is_mutation: false, resource_id: approval_id) do
|
|
29
|
-
http_get("/client/approvals/#{approval_id}", operation: "GetClientApproval").json
|
|
29
|
+
http_get("/client/approvals/#{approval_id}", operation: "GetClientApproval").json(operation: "GetClientApproval")
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
end
|
|
@@ -26,7 +26,7 @@ module Basecamp
|
|
|
26
26
|
# @return [Hash] response data
|
|
27
27
|
def get(correspondence_id:)
|
|
28
28
|
with_operation(service: "clientcorrespondences", operation: "get", is_mutation: false, resource_id: correspondence_id) do
|
|
29
|
-
http_get("/client/correspondences/#{correspondence_id}", operation: "GetClientCorrespondence").json
|
|
29
|
+
http_get("/client/correspondences/#{correspondence_id}", operation: "GetClientCorrespondence").json(operation: "GetClientCorrespondence")
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
end
|
|
@@ -27,7 +27,7 @@ module Basecamp
|
|
|
27
27
|
# @return [Hash] response data
|
|
28
28
|
def get(bucket_id:, recording_id:, reply_id:)
|
|
29
29
|
with_operation(service: "clientreplies", operation: "get", is_mutation: false, project_id: bucket_id, resource_id: reply_id) do
|
|
30
|
-
http_get("/buckets/#{bucket_id}/client/recordings/#{recording_id}/replies/#{reply_id}", operation: "GetClientReply").json
|
|
30
|
+
http_get("/buckets/#{bucket_id}/client/recordings/#{recording_id}/replies/#{reply_id}", operation: "GetClientReply").json(operation: "GetClientReply")
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
end
|
|
@@ -13,7 +13,7 @@ module Basecamp
|
|
|
13
13
|
# @return [Hash] response data
|
|
14
14
|
def set_visibility(recording_id:, visible_to_clients:)
|
|
15
15
|
with_operation(service: "clientvisibility", operation: "set_visibility", is_mutation: true, resource_id: recording_id) do
|
|
16
|
-
http_put("/recordings/#{recording_id}/client_visibility.json", body: compact_params(visible_to_clients: visible_to_clients)).json
|
|
16
|
+
http_put("/recordings/#{recording_id}/client_visibility.json", body: compact_params(visible_to_clients: visible_to_clients)).json(operation: "SetClientVisibility")
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
end
|
|
@@ -24,7 +24,7 @@ module Basecamp
|
|
|
24
24
|
# @return [Hash] response data
|
|
25
25
|
def create_cloud_file(bucket_id:, vault_id:, url:, service:, title: nil, description: nil, subscriptions: nil, visible_to_clients: nil)
|
|
26
26
|
with_operation(service: "cloudfiles", operation: "create_cloud_file", is_mutation: true, project_id: bucket_id, resource_id: vault_id) do
|
|
27
|
-
http_post("/buckets/#{bucket_id}/vaults/#{vault_id}/cloud_files.json", body: compact_params(url: url, service: service, title: title, description: description, subscriptions: subscriptions, visible_to_clients: visible_to_clients)).json
|
|
27
|
+
http_post("/buckets/#{bucket_id}/vaults/#{vault_id}/cloud_files.json", body: compact_params(url: url, service: service, title: title, description: description, subscriptions: subscriptions, visible_to_clients: visible_to_clients)).json(operation: "CreateCloudFile")
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
|
|
@@ -33,7 +33,7 @@ module Basecamp
|
|
|
33
33
|
# @return [Hash] response data
|
|
34
34
|
def get_cloud_file(cloud_file_id:)
|
|
35
35
|
with_operation(service: "cloudfiles", operation: "get_cloud_file", is_mutation: false, resource_id: cloud_file_id) do
|
|
36
|
-
http_get("/cloud_files/#{cloud_file_id}", operation: "GetCloudFile").json
|
|
36
|
+
http_get("/cloud_files/#{cloud_file_id}", operation: "GetCloudFile").json(operation: "GetCloudFile")
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
@@ -49,7 +49,7 @@ module Basecamp
|
|
|
49
49
|
# @return [Hash] response data
|
|
50
50
|
def update_cloud_file(cloud_file_id:, url:, service:, title: nil, description: nil, subscriptions: nil)
|
|
51
51
|
with_operation(service: "cloudfiles", operation: "update_cloud_file", is_mutation: true, resource_id: cloud_file_id) do
|
|
52
|
-
http_put("/cloud_files/#{cloud_file_id}", body: compact_params(url: url, service: service, title: title, description: description, subscriptions: subscriptions)).json
|
|
52
|
+
http_put("/cloud_files/#{cloud_file_id}", body: compact_params(url: url, service: service, title: title, description: description, subscriptions: subscriptions)).json(operation: "UpdateCloudFile")
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
end
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(comment_id:)
|
|
14
14
|
with_operation(service: "comments", operation: "get", is_mutation: false, resource_id: comment_id) do
|
|
15
|
-
http_get("/comments/#{comment_id}", operation: "GetComment").json
|
|
15
|
+
http_get("/comments/#{comment_id}", operation: "GetComment").json(operation: "GetComment")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ module Basecamp
|
|
|
22
22
|
# @return [Hash] response data
|
|
23
23
|
def update(comment_id:, content:)
|
|
24
24
|
with_operation(service: "comments", operation: "update", is_mutation: true, resource_id: comment_id) do
|
|
25
|
-
http_put("/comments/#{comment_id}", body: compact_params(content: content)).json
|
|
25
|
+
http_put("/comments/#{comment_id}", body: compact_params(content: content)).json(operation: "UpdateComment")
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
|
|
@@ -44,7 +44,7 @@ module Basecamp
|
|
|
44
44
|
# @return [Hash] response data
|
|
45
45
|
def create(recording_id:, content:)
|
|
46
46
|
with_operation(service: "comments", operation: "create", is_mutation: true, resource_id: recording_id) do
|
|
47
|
-
http_post("/recordings/#{recording_id}/comments.json", body: compact_params(content: content)).json
|
|
47
|
+
http_post("/recordings/#{recording_id}/comments.json", body: compact_params(content: content)).json(operation: "CreateComment")
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
end
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(document_id:)
|
|
14
14
|
with_operation(service: "documents", operation: "get", is_mutation: false, resource_id: document_id) do
|
|
15
|
-
http_get("/documents/#{document_id}", operation: "GetDocument").json
|
|
15
|
+
http_get("/documents/#{document_id}", operation: "GetDocument").json(operation: "GetDocument")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -23,7 +23,7 @@ module Basecamp
|
|
|
23
23
|
# @return [Hash] response data
|
|
24
24
|
def replace(document_id:, title: nil, content: nil)
|
|
25
25
|
with_operation(service: "documents", operation: "replace", is_mutation: true, resource_id: document_id) do
|
|
26
|
-
http_put("/documents/#{document_id}", body: compact_params(title: title, content: content)).json
|
|
26
|
+
http_put("/documents/#{document_id}", body: compact_params(title: title, content: content)).json(operation: "ReplaceDocument")
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -49,7 +49,7 @@ module Basecamp
|
|
|
49
49
|
# @return [Hash] response data
|
|
50
50
|
def create(vault_id:, title:, content: nil, status: nil, subscriptions: nil, visible_to_clients: nil)
|
|
51
51
|
with_operation(service: "documents", operation: "create", is_mutation: true, resource_id: vault_id) do
|
|
52
|
-
http_post("/vaults/#{vault_id}/documents.json", body: compact_params(title: title, content: content, status: status, subscriptions: subscriptions, visible_to_clients: visible_to_clients)).json
|
|
52
|
+
http_post("/vaults/#{vault_id}/documents.json", body: compact_params(title: title, content: content, status: status, subscriptions: subscriptions, visible_to_clients: visible_to_clients)).json(operation: "CreateDocument")
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Basecamp
|
|
4
|
+
module Services
|
|
5
|
+
# Service for EventFeed operations
|
|
6
|
+
#
|
|
7
|
+
# @generated from OpenAPI spec
|
|
8
|
+
class EventFeedService < BaseService
|
|
9
|
+
|
|
10
|
+
# Poll the account event feed for events after a position (oldest first, strict event-id order, up to 100 per page).
|
|
11
|
+
# @param since [String, nil] Entry point: a decimal event id (start after it; `0` replays served
|
|
12
|
+
# history back to the epoch), or the literal `now` (skip history). Mutually
|
|
13
|
+
# exclusive with `position` in practice; omit both to enter at the present.
|
|
14
|
+
# @param position [String, nil] Resume token from a previous page's `position`. Opaque and signed; never
|
|
15
|
+
# constructed or parsed client-side.
|
|
16
|
+
# @param types [String, nil] Comma-separated event types from the catalog (e.g. `message.created,comment.created`).
|
|
17
|
+
# @param buckets [String, nil] Comma-separated bucket (project) ids, at most 100.
|
|
18
|
+
# @param creators [String, nil] Comma-separated creator person ids, at most 100.
|
|
19
|
+
# @param performers [String, nil] Comma-separated effective-performer ids (the agent on a delegated action,
|
|
20
|
+
# else the creator), at most 100. The literal `self` means the request's own
|
|
21
|
+
# effective actor and is resolved server-side before filtering.
|
|
22
|
+
# @param exclude_performers [String, nil] Comma-separated effective-performer ids to exclude, at most 100; `self`
|
|
23
|
+
# as on `performers`. `exclude_performers=self` is the loop guard for an
|
|
24
|
+
# agent that acts on what it hears.
|
|
25
|
+
# @param actor_types [String, nil] Comma-separated actor kinds: `agent`, `person`, or both. A filter, not a
|
|
26
|
+
# default — agent activity is real account activity.
|
|
27
|
+
# @return [Hash] response data
|
|
28
|
+
def poll_events(since: nil, position: nil, types: nil, buckets: nil, creators: nil, performers: nil, exclude_performers: nil, actor_types: nil)
|
|
29
|
+
with_operation(service: "eventfeed", operation: "poll_events", is_mutation: false) do
|
|
30
|
+
http_get("/events.json", params: compact_query_params(since: since, position: position, types: types, buckets: buckets, creators: creators, performers: performers, exclude_performers: exclude_performers, actor_types: actor_types), operation: "PollEvents").json(operation: "PollEvents")
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Mint a short-lived stream ticket and the exact WebSocket URL to open a live event stream with.
|
|
35
|
+
# @return [Hash] response data
|
|
36
|
+
def create_stream_ticket()
|
|
37
|
+
with_operation(service: "eventfeed", operation: "create_stream_ticket", is_mutation: true) do
|
|
38
|
+
http_post("/events/stream_ticket.json").json(operation: "CreateStreamTicket")
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Poll the authenticated agent's inbox for the items that addressed it (oldest first, strict item-id order); people receive 403.
|
|
43
|
+
# @param since [String, nil] Entry point: `0` (earliest retained), `now` (present), or a decimal item
|
|
44
|
+
# id to start after.
|
|
45
|
+
# @param position [String, nil] Resume token from a previous inbox page's `position`.
|
|
46
|
+
# @param reasons [String, nil] Comma-separated addressing reasons: `mentioned`, `assigned`, `subscribed`,
|
|
47
|
+
# `watched`, `pinged`, `boosted`.
|
|
48
|
+
# @param types [String, nil] Comma-separated event types, as a narrowing filter.
|
|
49
|
+
# @param buckets [String, nil] Comma-separated bucket ids, as a narrowing filter (at most 100).
|
|
50
|
+
# @return [Hash] response data
|
|
51
|
+
def poll_inbox(since: nil, position: nil, reasons: nil, types: nil, buckets: nil)
|
|
52
|
+
with_operation(service: "eventfeed", operation: "poll_inbox", is_mutation: false) do
|
|
53
|
+
http_get("/inbox.json", params: compact_query_params(since: since, position: position, reasons: reasons, types: types, buckets: buckets), operation: "PollInbox").json(operation: "PollInbox")
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -70,7 +70,7 @@ module Basecamp
|
|
|
70
70
|
# @return [Array<Hash>] response data
|
|
71
71
|
def get_everything_overdue_cards(assignee_ids: nil, due: nil)
|
|
72
72
|
with_operation(service: "everything", operation: "get_everything_overdue_cards", is_mutation: false) do
|
|
73
|
-
http_get("/cards/overdue.json", params: compact_query_params(assignee_ids: assignee_ids, due: due), operation: "GetEverythingOverdueCards").json
|
|
73
|
+
http_get("/cards/overdue.json", params: compact_query_params(assignee_ids: assignee_ids, due: due), operation: "GetEverythingOverdueCards").json(operation: "GetEverythingOverdueCards")
|
|
74
74
|
end
|
|
75
75
|
end
|
|
76
76
|
|
|
@@ -194,7 +194,7 @@ module Basecamp
|
|
|
194
194
|
# @return [Array<Hash>] response data
|
|
195
195
|
def get_everything_overdue_todos(assignee_ids: nil, due: nil)
|
|
196
196
|
with_operation(service: "everything", operation: "get_everything_overdue_todos", is_mutation: false) do
|
|
197
|
-
http_get("/todos/overdue.json", params: compact_query_params(assignee_ids: assignee_ids, due: due), operation: "GetEverythingOverdueTodos").json
|
|
197
|
+
http_get("/todos/overdue.json", params: compact_query_params(assignee_ids: assignee_ids, due: due), operation: "GetEverythingOverdueTodos").json(operation: "GetEverythingOverdueTodos")
|
|
198
198
|
end
|
|
199
199
|
end
|
|
200
200
|
|
|
@@ -11,7 +11,7 @@ module Basecamp
|
|
|
11
11
|
# @return [Array<Hash>] response data
|
|
12
12
|
def list_folders()
|
|
13
13
|
with_operation(service: "folders", operation: "list_folders", is_mutation: false) do
|
|
14
|
-
http_get("/stacks.json", operation: "ListFolders").json
|
|
14
|
+
http_get("/stacks.json", operation: "ListFolders").json(operation: "ListFolders")
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -24,7 +24,7 @@ module Basecamp
|
|
|
24
24
|
# @return [Hash] response data
|
|
25
25
|
def create_folder(name: nil, project_ids: nil)
|
|
26
26
|
with_operation(service: "folders", operation: "create_folder", is_mutation: true) do
|
|
27
|
-
http_post("/stacks.json", body: compact_params(name: name, project_ids: project_ids)).json
|
|
27
|
+
http_post("/stacks.json", body: compact_params(name: name, project_ids: project_ids)).json(operation: "CreateFolder")
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
|
|
@@ -33,7 +33,7 @@ module Basecamp
|
|
|
33
33
|
# @return [Hash] response data
|
|
34
34
|
def get_folder(folder_id:)
|
|
35
35
|
with_operation(service: "folders", operation: "get_folder", is_mutation: false, resource_id: folder_id) do
|
|
36
|
-
http_get("/stacks/#{folder_id}", operation: "GetFolder").json
|
|
36
|
+
http_get("/stacks/#{folder_id}", operation: "GetFolder").json(operation: "GetFolder")
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
@@ -44,7 +44,7 @@ module Basecamp
|
|
|
44
44
|
# @return [Hash] response data
|
|
45
45
|
def update_folder(folder_id:, name:)
|
|
46
46
|
with_operation(service: "folders", operation: "update_folder", is_mutation: true, resource_id: folder_id) do
|
|
47
|
-
http_put("/stacks/#{folder_id}", body: compact_params(name: name)).json
|
|
47
|
+
http_put("/stacks/#{folder_id}", body: compact_params(name: name)).json(operation: "UpdateFolder")
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
|