basecamp-sdk 0.17.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 +111 -7
- 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
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(forward_id:)
|
|
14
14
|
with_operation(service: "forwards", operation: "get", is_mutation: false, resource_id: forward_id) do
|
|
15
|
-
http_get("/inbox_forwards/#{forward_id}", operation: "GetForward").json
|
|
15
|
+
http_get("/inbox_forwards/#{forward_id}", operation: "GetForward").json(operation: "GetForward")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -34,7 +34,7 @@ module Basecamp
|
|
|
34
34
|
# @return [Hash] response data
|
|
35
35
|
def get_reply(forward_id:, reply_id:)
|
|
36
36
|
with_operation(service: "forwards", operation: "get_reply", is_mutation: false, resource_id: reply_id) do
|
|
37
|
-
http_get("/inbox_forwards/#{forward_id}/replies/#{reply_id}", operation: "GetForwardReply").json
|
|
37
|
+
http_get("/inbox_forwards/#{forward_id}/replies/#{reply_id}", operation: "GetForwardReply").json(operation: "GetForwardReply")
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
@@ -43,7 +43,7 @@ module Basecamp
|
|
|
43
43
|
# @return [Hash] response data
|
|
44
44
|
def get_inbox(inbox_id:)
|
|
45
45
|
with_operation(service: "forwards", operation: "get_inbox", is_mutation: false, resource_id: inbox_id) do
|
|
46
|
-
http_get("/inboxes/#{inbox_id}", operation: "GetInbox").json
|
|
46
|
+
http_get("/inboxes/#{inbox_id}", operation: "GetInbox").json(operation: "GetInbox")
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -12,17 +12,17 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get_gauge_needle(needle_id:)
|
|
14
14
|
with_operation(service: "gauges", operation: "get_gauge_needle", is_mutation: false, resource_id: needle_id) do
|
|
15
|
-
http_get("/gauge_needles/#{needle_id}", operation: "GetGaugeNeedle").json
|
|
15
|
+
http_get("/gauge_needles/#{needle_id}", operation: "GetGaugeNeedle").json(operation: "GetGaugeNeedle")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
# Update a gauge needle's description. Position and color are immutable.
|
|
20
20
|
# @param needle_id [Integer] needle id ID
|
|
21
|
-
# @param gauge_needle [Hash
|
|
21
|
+
# @param gauge_needle [Hash] gauge needle
|
|
22
22
|
# @return [Hash] response data
|
|
23
|
-
def update_gauge_needle(needle_id:, gauge_needle:
|
|
23
|
+
def update_gauge_needle(needle_id:, gauge_needle:)
|
|
24
24
|
with_operation(service: "gauges", operation: "update_gauge_needle", is_mutation: true, resource_id: needle_id) do
|
|
25
|
-
http_put("/gauge_needles/#{needle_id}", body: compact_params(gauge_needle: gauge_needle)).json
|
|
25
|
+
http_put("/gauge_needles/#{needle_id}", body: compact_params(gauge_needle: gauge_needle)).json(operation: "UpdateGaugeNeedle")
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
|
|
@@ -62,12 +62,16 @@ module Basecamp
|
|
|
62
62
|
# Create a gauge needle (progress update) for a project
|
|
63
63
|
# @param project_id [Integer] project id ID
|
|
64
64
|
# @param gauge_needle [Hash] gauge needle
|
|
65
|
-
# @param notify [String, nil] Who to notify: "everyone", "
|
|
65
|
+
# @param notify [String, nil] Who to notify: "everyone", "default" (the project's existing
|
|
66
|
+
# subscribers), or "custom" (the people in `subscriptions`). Omit for
|
|
67
|
+
# nobody: bc3 defaults `notify` to "custom", which with no `subscriptions`
|
|
68
|
+
# notifies no one, and any unrecognized value (`Subscribers#find_subscribers`
|
|
69
|
+
# accepts exactly these three) falls through to nobody as well.
|
|
66
70
|
# @param subscriptions [Array, nil] Array of people IDs to notify (only used when notify is "custom")
|
|
67
71
|
# @return [Hash] response data
|
|
68
72
|
def create_gauge_needle(project_id:, gauge_needle:, notify: nil, subscriptions: nil)
|
|
69
73
|
with_operation(service: "gauges", operation: "create_gauge_needle", is_mutation: true, project_id: project_id) do
|
|
70
|
-
http_post("/projects/#{project_id}/gauge/needles.json", body: compact_params(gauge_needle: gauge_needle, notify: notify, subscriptions: subscriptions)).json
|
|
74
|
+
http_post("/projects/#{project_id}/gauge/needles.json", body: compact_params(gauge_needle: gauge_needle, notify: notify, subscriptions: subscriptions)).json(operation: "CreateGaugeNeedle")
|
|
71
75
|
end
|
|
72
76
|
end
|
|
73
77
|
|
|
@@ -26,7 +26,7 @@ module Basecamp
|
|
|
26
26
|
# @return [Hash] response data
|
|
27
27
|
def create_google_document(bucket_id:, vault_id:, url:, document_type:, title: nil, description: nil, status: nil, subscriptions: nil, visible_to_clients: nil)
|
|
28
28
|
with_operation(service: "googledocuments", operation: "create_google_document", is_mutation: true, project_id: bucket_id, resource_id: vault_id) do
|
|
29
|
-
http_post("/buckets/#{bucket_id}/vaults/#{vault_id}/google_documents.json", body: compact_params(url: url, document_type: document_type, title: title, description: description, status: status, subscriptions: subscriptions, visible_to_clients: visible_to_clients)).json
|
|
29
|
+
http_post("/buckets/#{bucket_id}/vaults/#{vault_id}/google_documents.json", body: compact_params(url: url, document_type: document_type, title: title, description: description, status: status, subscriptions: subscriptions, visible_to_clients: visible_to_clients)).json(operation: "CreateGoogleDocument")
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
|
|
@@ -35,7 +35,7 @@ module Basecamp
|
|
|
35
35
|
# @return [Hash] response data
|
|
36
36
|
def get_google_document(google_document_id:)
|
|
37
37
|
with_operation(service: "googledocuments", operation: "get_google_document", is_mutation: false, resource_id: google_document_id) do
|
|
38
|
-
http_get("/google_documents/#{google_document_id}", operation: "GetGoogleDocument").json
|
|
38
|
+
http_get("/google_documents/#{google_document_id}", operation: "GetGoogleDocument").json(operation: "GetGoogleDocument")
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
@@ -53,7 +53,7 @@ module Basecamp
|
|
|
53
53
|
# @return [Hash] response data
|
|
54
54
|
def update_google_document(google_document_id:, url:, document_type:, title: nil, description: nil, status: nil, subscriptions: nil)
|
|
55
55
|
with_operation(service: "googledocuments", operation: "update_google_document", is_mutation: true, resource_id: google_document_id) do
|
|
56
|
-
http_put("/google_documents/#{google_document_id}", body: compact_params(url: url, document_type: document_type, title: title, description: description, status: status, subscriptions: subscriptions)).json
|
|
56
|
+
http_put("/google_documents/#{google_document_id}", body: compact_params(url: url, document_type: document_type, title: title, description: description, status: status, subscriptions: subscriptions)).json(operation: "UpdateGoogleDocument")
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
end
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(todoset_id:)
|
|
14
14
|
with_operation(service: "hillcharts", operation: "get", is_mutation: false, resource_id: todoset_id) do
|
|
15
|
-
http_get("/todosets/#{todoset_id}/hill.json", operation: "GetHillChart").json
|
|
15
|
+
http_get("/todosets/#{todoset_id}/hill.json", operation: "GetHillChart").json(operation: "GetHillChart")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -23,7 +23,7 @@ module Basecamp
|
|
|
23
23
|
# @return [Hash] response data
|
|
24
24
|
def update_settings(todoset_id:, tracked: nil, untracked: nil)
|
|
25
25
|
with_operation(service: "hillcharts", operation: "update_settings", is_mutation: true, resource_id: todoset_id) do
|
|
26
|
-
http_put("/todosets/#{todoset_id}/hills/settings.json", body: compact_params(tracked: tracked, untracked: untracked)).json
|
|
26
|
+
http_put("/todosets/#{todoset_id}/hills/settings.json", body: compact_params(tracked: tracked, untracked: untracked)).json(operation: "UpdateHillChartSettings")
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
end
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(board_id:)
|
|
14
14
|
with_operation(service: "messageboards", operation: "get", is_mutation: false, resource_id: board_id) do
|
|
15
|
-
http_get("/message_boards/#{board_id}", operation: "GetMessageBoard").json
|
|
15
|
+
http_get("/message_boards/#{board_id}", operation: "GetMessageBoard").json(operation: "GetMessageBoard")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
end
|
|
@@ -24,7 +24,7 @@ module Basecamp
|
|
|
24
24
|
# @return [Hash] response data
|
|
25
25
|
def create(bucket_id:, name:, icon:)
|
|
26
26
|
with_operation(service: "messagetypes", operation: "create", is_mutation: true, project_id: bucket_id) do
|
|
27
|
-
http_post("/buckets/#{bucket_id}/categories.json", body: compact_params(name: name, icon: icon)).json
|
|
27
|
+
http_post("/buckets/#{bucket_id}/categories.json", body: compact_params(name: name, icon: icon)).json(operation: "CreateMessageType")
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
|
|
@@ -34,7 +34,7 @@ module Basecamp
|
|
|
34
34
|
# @return [Hash] response data
|
|
35
35
|
def get(bucket_id:, type_id:)
|
|
36
36
|
with_operation(service: "messagetypes", operation: "get", is_mutation: false, project_id: bucket_id, resource_id: type_id) do
|
|
37
|
-
http_get("/buckets/#{bucket_id}/categories/#{type_id}", operation: "GetMessageType").json
|
|
37
|
+
http_get("/buckets/#{bucket_id}/categories/#{type_id}", operation: "GetMessageType").json(operation: "GetMessageType")
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
@@ -46,7 +46,7 @@ module Basecamp
|
|
|
46
46
|
# @return [Hash] response data
|
|
47
47
|
def update(bucket_id:, type_id:, name: nil, icon: nil)
|
|
48
48
|
with_operation(service: "messagetypes", operation: "update", is_mutation: true, project_id: bucket_id, resource_id: type_id) do
|
|
49
|
-
http_put("/buckets/#{bucket_id}/categories/#{type_id}", body: compact_params(name: name, icon: icon)).json
|
|
49
|
+
http_put("/buckets/#{bucket_id}/categories/#{type_id}", body: compact_params(name: name, icon: icon)).json(operation: "UpdateMessageType")
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
52
|
|
|
@@ -32,7 +32,7 @@ module Basecamp
|
|
|
32
32
|
# @return [Hash] response data
|
|
33
33
|
def create(board_id:, subject:, content: nil, status: nil, category_id: nil, subscriptions: nil, visible_to_clients: nil)
|
|
34
34
|
with_operation(service: "messages", operation: "create", is_mutation: true, resource_id: board_id) do
|
|
35
|
-
http_post("/message_boards/#{board_id}/messages.json", body: compact_params(subject: subject, content: content, status: status, category_id: category_id, subscriptions: subscriptions, visible_to_clients: visible_to_clients)).json
|
|
35
|
+
http_post("/message_boards/#{board_id}/messages.json", body: compact_params(subject: subject, content: content, status: status, category_id: category_id, subscriptions: subscriptions, visible_to_clients: visible_to_clients)).json(operation: "CreateMessage")
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -41,7 +41,7 @@ module Basecamp
|
|
|
41
41
|
# @return [Hash] response data
|
|
42
42
|
def get(message_id:)
|
|
43
43
|
with_operation(service: "messages", operation: "get", is_mutation: false, resource_id: message_id) do
|
|
44
|
-
http_get("/messages/#{message_id}", operation: "GetMessage").json
|
|
44
|
+
http_get("/messages/#{message_id}", operation: "GetMessage").json(operation: "GetMessage")
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
|
|
@@ -54,7 +54,7 @@ module Basecamp
|
|
|
54
54
|
# @return [Hash] response data
|
|
55
55
|
def update(message_id:, subject: nil, content: nil, status: nil, category_id: nil)
|
|
56
56
|
with_operation(service: "messages", operation: "update", is_mutation: true, resource_id: message_id) do
|
|
57
|
-
http_put("/messages/#{message_id}", body: compact_params(subject: subject, content: content, status: status, category_id: category_id)).json
|
|
57
|
+
http_put("/messages/#{message_id}", body: compact_params(subject: subject, content: content, status: status, category_id: category_id)).json(operation: "UpdateMessage")
|
|
58
58
|
end
|
|
59
59
|
end
|
|
60
60
|
|
|
@@ -11,7 +11,7 @@ module Basecamp
|
|
|
11
11
|
# @return [Hash] response data
|
|
12
12
|
def get_my_assignments()
|
|
13
13
|
with_operation(service: "myassignments", operation: "get_my_assignments", is_mutation: false) do
|
|
14
|
-
http_get("/my/assignments.json", operation: "GetMyAssignments").json
|
|
14
|
+
http_get("/my/assignments.json", operation: "GetMyAssignments").json(operation: "GetMyAssignments")
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ module Basecamp
|
|
|
19
19
|
# @return [Array<Hash>] response data
|
|
20
20
|
def get_my_completed_assignments()
|
|
21
21
|
with_operation(service: "myassignments", operation: "get_my_completed_assignments", is_mutation: false) do
|
|
22
|
-
http_get("/my/assignments/completed.json", operation: "GetMyCompletedAssignments").json
|
|
22
|
+
http_get("/my/assignments/completed.json", operation: "GetMyCompletedAssignments").json(operation: "GetMyCompletedAssignments")
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
@@ -29,7 +29,7 @@ module Basecamp
|
|
|
29
29
|
# @return [Array<Hash>] response data
|
|
30
30
|
def get_my_due_assignments(scope: nil)
|
|
31
31
|
with_operation(service: "myassignments", operation: "get_my_due_assignments", is_mutation: false) do
|
|
32
|
-
http_get("/my/assignments/due.json", params: compact_query_params(scope: scope), operation: "GetMyDueAssignments").json
|
|
32
|
+
http_get("/my/assignments/due.json", params: compact_query_params(scope: scope), operation: "GetMyDueAssignments").json(operation: "GetMyDueAssignments")
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
@@ -11,7 +11,7 @@ module Basecamp
|
|
|
11
11
|
# @return [Hash] response data
|
|
12
12
|
def get_my_note()
|
|
13
13
|
with_operation(service: "mynotes", operation: "get_my_note", is_mutation: false) do
|
|
14
|
-
http_get("/my/notes.json", operation: "GetMyNote").json
|
|
14
|
+
http_get("/my/notes.json", operation: "GetMyNote").json(operation: "GetMyNote")
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -20,7 +20,7 @@ module Basecamp
|
|
|
20
20
|
# @return [Hash] response data
|
|
21
21
|
def update_my_note(note:)
|
|
22
22
|
with_operation(service: "mynotes", operation: "update_my_note", is_mutation: true) do
|
|
23
|
-
http_put("/my/notes.json", body: compact_params(note: note)).json
|
|
23
|
+
http_put("/my/notes.json", body: compact_params(note: note)).json(operation: "UpdateMyNote")
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
end
|
|
@@ -18,7 +18,7 @@ module Basecamp
|
|
|
18
18
|
# @return [Hash] response data
|
|
19
19
|
def get_my_notifications(page: nil, limit_bubble_ups: nil)
|
|
20
20
|
with_operation(service: "mynotifications", operation: "get_my_notifications", is_mutation: false) do
|
|
21
|
-
http_get("/my/readings.json", params: compact_query_params(page: page, limit_bubble_ups: limit_bubble_ups), operation: "GetMyNotifications").json
|
|
21
|
+
http_get("/my/readings.json", params: compact_query_params(page: page, limit_bubble_ups: limit_bubble_ups), operation: "GetMyNotifications").json(operation: "GetMyNotifications")
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
24
|
|
|
@@ -20,7 +20,7 @@ module Basecamp
|
|
|
20
20
|
# @return [Hash] response data
|
|
21
21
|
def get_my_preferences()
|
|
22
22
|
with_operation(service: "people", operation: "get_my_preferences", is_mutation: false) do
|
|
23
|
-
http_get("/my/preferences.json", operation: "GetMyPreferences").json
|
|
23
|
+
http_get("/my/preferences.json", operation: "GetMyPreferences").json(operation: "GetMyPreferences")
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
|
|
@@ -29,7 +29,7 @@ module Basecamp
|
|
|
29
29
|
# @return [Hash] response data
|
|
30
30
|
def update_my_preferences(person:)
|
|
31
31
|
with_operation(service: "people", operation: "update_my_preferences", is_mutation: true) do
|
|
32
|
-
http_put("/my/preferences.json", body: compact_params(person: person)).json
|
|
32
|
+
http_put("/my/preferences.json", body: compact_params(person: person)).json(operation: "UpdateMyPreferences")
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@ module Basecamp
|
|
|
37
37
|
# @return [Hash] response data
|
|
38
38
|
def my_profile()
|
|
39
39
|
with_operation(service: "people", operation: "my_profile", is_mutation: false) do
|
|
40
|
-
http_get("/my/profile.json", operation: "GetMyProfile").json
|
|
40
|
+
http_get("/my/profile.json", operation: "GetMyProfile").json(operation: "GetMyProfile")
|
|
41
41
|
end
|
|
42
42
|
end
|
|
43
43
|
|
|
@@ -74,7 +74,7 @@ module Basecamp
|
|
|
74
74
|
# @return [Hash] response data
|
|
75
75
|
def get(person_id:)
|
|
76
76
|
with_operation(service: "people", operation: "get", is_mutation: false, resource_id: person_id) do
|
|
77
|
-
http_get("/people/#{person_id}", operation: "GetPerson").json
|
|
77
|
+
http_get("/people/#{person_id}", operation: "GetPerson").json(operation: "GetPerson")
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
|
|
@@ -83,7 +83,7 @@ module Basecamp
|
|
|
83
83
|
# @return [Hash] response data
|
|
84
84
|
def get_out_of_office(person_id:)
|
|
85
85
|
with_operation(service: "people", operation: "get_out_of_office", is_mutation: false, resource_id: person_id) do
|
|
86
|
-
http_get("/people/#{person_id}/out_of_office.json", operation: "GetOutOfOffice").json
|
|
86
|
+
http_get("/people/#{person_id}/out_of_office.json", operation: "GetOutOfOffice").json(operation: "GetOutOfOffice")
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
|
|
@@ -93,7 +93,7 @@ module Basecamp
|
|
|
93
93
|
# @return [Hash] response data
|
|
94
94
|
def enable_out_of_office(person_id:, out_of_office:)
|
|
95
95
|
with_operation(service: "people", operation: "enable_out_of_office", is_mutation: true, resource_id: person_id) do
|
|
96
|
-
http_post("/people/#{person_id}/out_of_office.json", body: compact_params(out_of_office: out_of_office)).json
|
|
96
|
+
http_post("/people/#{person_id}/out_of_office.json", body: compact_params(out_of_office: out_of_office)).json(operation: "EnableOutOfOffice")
|
|
97
97
|
end
|
|
98
98
|
end
|
|
99
99
|
|
|
@@ -112,7 +112,7 @@ module Basecamp
|
|
|
112
112
|
# @return [Hash] response data
|
|
113
113
|
def enable_project_clients(project_id:)
|
|
114
114
|
with_operation(service: "people", operation: "enable_project_clients", is_mutation: true, project_id: project_id) do
|
|
115
|
-
http_post("/projects/#{project_id}/client_enablement.json").json
|
|
115
|
+
http_post("/projects/#{project_id}/client_enablement.json").json(operation: "EnableProjectClients")
|
|
116
116
|
end
|
|
117
117
|
end
|
|
118
118
|
|
|
@@ -121,7 +121,7 @@ module Basecamp
|
|
|
121
121
|
# @return [Hash] response data
|
|
122
122
|
def disable_project_clients(project_id:)
|
|
123
123
|
with_operation(service: "people", operation: "disable_project_clients", is_mutation: true, project_id: project_id) do
|
|
124
|
-
http_delete("/projects/#{project_id}/client_enablement.json").json
|
|
124
|
+
http_delete("/projects/#{project_id}/client_enablement.json").json(operation: "DisableProjectClients")
|
|
125
125
|
end
|
|
126
126
|
end
|
|
127
127
|
|
|
@@ -145,7 +145,7 @@ module Basecamp
|
|
|
145
145
|
# @return [Hash] response data
|
|
146
146
|
def update_project_client_access(project_id:, grant: nil, revoke: nil, create: nil)
|
|
147
147
|
with_operation(service: "people", operation: "update_project_client_access", is_mutation: true, project_id: project_id) do
|
|
148
|
-
http_put("/projects/#{project_id}/people/client_users.json", body: compact_params(grant: grant, revoke: revoke, create: create)).json
|
|
148
|
+
http_put("/projects/#{project_id}/people/client_users.json", body: compact_params(grant: grant, revoke: revoke, create: create)).json(operation: "UpdateProjectClientAccess")
|
|
149
149
|
end
|
|
150
150
|
end
|
|
151
151
|
|
|
@@ -157,7 +157,7 @@ module Basecamp
|
|
|
157
157
|
# @return [Hash] response data
|
|
158
158
|
def update_project_access(project_id:, grant: nil, revoke: nil, create: nil)
|
|
159
159
|
with_operation(service: "people", operation: "update_project_access", is_mutation: true, project_id: project_id) do
|
|
160
|
-
http_put("/projects/#{project_id}/people/users.json", body: compact_params(grant: grant, revoke: revoke, create: create)).json
|
|
160
|
+
http_put("/projects/#{project_id}/people/users.json", body: compact_params(grant: grant, revoke: revoke, create: create)).json(operation: "UpdateProjectAccess")
|
|
161
161
|
end
|
|
162
162
|
end
|
|
163
163
|
|
|
@@ -165,7 +165,7 @@ module Basecamp
|
|
|
165
165
|
# @return [Array<Hash>] response data
|
|
166
166
|
def list_assignable()
|
|
167
167
|
with_operation(service: "people", operation: "list_assignable", is_mutation: false) do
|
|
168
|
-
http_get("/reports/todos/assigned.json", operation: "ListAssignablePeople").json
|
|
168
|
+
http_get("/reports/todos/assigned.json", operation: "ListAssignablePeople").json(operation: "ListAssignablePeople")
|
|
169
169
|
end
|
|
170
170
|
end
|
|
171
171
|
end
|
|
@@ -11,7 +11,7 @@ module Basecamp
|
|
|
11
11
|
# @return [Array<Hash>] response data
|
|
12
12
|
def list_recent_projects()
|
|
13
13
|
with_operation(service: "projects", operation: "list_recent_projects", is_mutation: false) do
|
|
14
|
-
http_get("/my/recent_projects.json", operation: "ListRecentProjects").json
|
|
14
|
+
http_get("/my/recent_projects.json", operation: "ListRecentProjects").json(operation: "ListRecentProjects")
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -33,7 +33,7 @@ module Basecamp
|
|
|
33
33
|
# @return [Hash] response data
|
|
34
34
|
def create(name:, description: nil)
|
|
35
35
|
with_operation(service: "projects", operation: "create", is_mutation: true) do
|
|
36
|
-
http_post("/projects.json", body: compact_params(name: name, description: description)).json
|
|
36
|
+
http_post("/projects.json", body: compact_params(name: name, description: description)).json(operation: "CreateProject")
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
@@ -42,7 +42,7 @@ module Basecamp
|
|
|
42
42
|
# @return [Hash] response data
|
|
43
43
|
def get(project_id:)
|
|
44
44
|
with_operation(service: "projects", operation: "get", is_mutation: false, project_id: project_id) do
|
|
45
|
-
http_get("/projects/#{project_id}", operation: "GetProject").json
|
|
45
|
+
http_get("/projects/#{project_id}", operation: "GetProject").json(operation: "GetProject")
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
|
|
@@ -55,7 +55,7 @@ module Basecamp
|
|
|
55
55
|
# @return [Hash] response data
|
|
56
56
|
def update(project_id:, name:, description: nil, admissions: nil, schedule_attributes: nil)
|
|
57
57
|
with_operation(service: "projects", operation: "update", is_mutation: true, project_id: project_id) do
|
|
58
|
-
http_put("/projects/#{project_id}", body: compact_params(name: name, description: description, admissions: admissions, schedule_attributes: schedule_attributes)).json
|
|
58
|
+
http_put("/projects/#{project_id}", body: compact_params(name: name, description: description, admissions: admissions, schedule_attributes: schedule_attributes)).json(operation: "UpdateProject")
|
|
59
59
|
end
|
|
60
60
|
end
|
|
61
61
|
|
|
@@ -28,7 +28,7 @@ module Basecamp
|
|
|
28
28
|
# @return [Hash] response data
|
|
29
29
|
def spotlight(recording_id:)
|
|
30
30
|
with_operation(service: "recordings", operation: "spotlight", is_mutation: true, resource_id: recording_id) do
|
|
31
|
-
http_post("/recordings/#{recording_id}/spotlight.json").json
|
|
31
|
+
http_post("/recordings/#{recording_id}/spotlight.json").json(operation: "SpotlightRecording")
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
@@ -24,7 +24,7 @@ module Basecamp
|
|
|
24
24
|
# @return [Hash] response data
|
|
25
25
|
def upcoming(window_starts_on:, window_ends_on:)
|
|
26
26
|
with_operation(service: "reports", operation: "upcoming", is_mutation: false) do
|
|
27
|
-
http_get("/reports/schedules/upcoming.json", params: compact_query_params(window_starts_on: window_starts_on, window_ends_on: window_ends_on), operation: "GetUpcomingSchedule").json
|
|
27
|
+
http_get("/reports/schedules/upcoming.json", params: compact_query_params(window_starts_on: window_starts_on, window_ends_on: window_ends_on), operation: "GetUpcomingSchedule").json(operation: "GetUpcomingSchedule")
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
|
|
@@ -34,7 +34,7 @@ module Basecamp
|
|
|
34
34
|
# @return [Hash] response data
|
|
35
35
|
def assigned(person_id:, group_by: nil)
|
|
36
36
|
with_operation(service: "reports", operation: "assigned", is_mutation: false, resource_id: person_id) do
|
|
37
|
-
http_get("/reports/todos/assigned/#{person_id}", params: compact_query_params(group_by: group_by), operation: "GetAssignedTodos").json
|
|
37
|
+
http_get("/reports/todos/assigned/#{person_id}", params: compact_query_params(group_by: group_by), operation: "GetAssignedTodos").json(operation: "GetAssignedTodos")
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
@@ -42,7 +42,7 @@ module Basecamp
|
|
|
42
42
|
# @return [Hash] response data
|
|
43
43
|
def overdue()
|
|
44
44
|
with_operation(service: "reports", operation: "overdue", is_mutation: false) do
|
|
45
|
-
http_get("/reports/todos/overdue.json", operation: "GetOverdueTodos").json
|
|
45
|
+
http_get("/reports/todos/overdue.json", operation: "GetOverdueTodos").json(operation: "GetOverdueTodos")
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get_entry(entry_id:)
|
|
14
14
|
with_operation(service: "schedules", operation: "get_entry", is_mutation: false, resource_id: entry_id) do
|
|
15
|
-
http_get("/schedule_entries/#{entry_id}", operation: "GetScheduleEntry").json
|
|
15
|
+
http_get("/schedule_entries/#{entry_id}", operation: "GetScheduleEntry").json(operation: "GetScheduleEntry")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -62,7 +62,7 @@ module Basecamp
|
|
|
62
62
|
# @return [Hash] response data
|
|
63
63
|
def replace_entry(entry_id:, starts_at:, ends_at:, summary: nil, description: nil, participant_ids: nil, all_day: nil, notify: nil, url: nil, highlighted: nil)
|
|
64
64
|
with_operation(service: "schedules", operation: "replace_entry", is_mutation: true, resource_id: entry_id) do
|
|
65
|
-
http_put("/schedule_entries/#{entry_id}", body: compact_params(summary: summary, starts_at: starts_at, ends_at: ends_at, description: description, participant_ids: participant_ids, all_day: all_day, notify: notify, url: url, highlighted: highlighted)).json
|
|
65
|
+
http_put("/schedule_entries/#{entry_id}", body: compact_params(summary: summary, starts_at: starts_at, ends_at: ends_at, description: description, participant_ids: participant_ids, all_day: all_day, notify: notify, url: url, highlighted: highlighted)).json(operation: "ReplaceScheduleEntry")
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
68
|
|
|
@@ -72,7 +72,7 @@ module Basecamp
|
|
|
72
72
|
# @return [Hash] response data
|
|
73
73
|
def get_entry_occurrence(entry_id:, date:)
|
|
74
74
|
with_operation(service: "schedules", operation: "get_entry_occurrence", is_mutation: false, resource_id: entry_id) do
|
|
75
|
-
http_get("/schedule_entries/#{entry_id}/occurrences/#{date}", operation: "GetScheduleEntryOccurrence").json
|
|
75
|
+
http_get("/schedule_entries/#{entry_id}/occurrences/#{date}", operation: "GetScheduleEntryOccurrence").json(operation: "GetScheduleEntryOccurrence")
|
|
76
76
|
end
|
|
77
77
|
end
|
|
78
78
|
|
|
@@ -81,7 +81,7 @@ module Basecamp
|
|
|
81
81
|
# @return [Hash] response data
|
|
82
82
|
def get(schedule_id:)
|
|
83
83
|
with_operation(service: "schedules", operation: "get", is_mutation: false, resource_id: schedule_id) do
|
|
84
|
-
http_get("/schedules/#{schedule_id}", operation: "GetSchedule").json
|
|
84
|
+
http_get("/schedules/#{schedule_id}", operation: "GetSchedule").json(operation: "GetSchedule")
|
|
85
85
|
end
|
|
86
86
|
end
|
|
87
87
|
|
|
@@ -91,7 +91,7 @@ module Basecamp
|
|
|
91
91
|
# @return [Hash] response data
|
|
92
92
|
def update_settings(schedule_id:, include_due_assignments:)
|
|
93
93
|
with_operation(service: "schedules", operation: "update_settings", is_mutation: true, resource_id: schedule_id) do
|
|
94
|
-
http_put("/schedules/#{schedule_id}", body: compact_params(include_due_assignments: include_due_assignments)).json
|
|
94
|
+
http_put("/schedules/#{schedule_id}", body: compact_params(include_due_assignments: include_due_assignments)).json(operation: "UpdateScheduleSettings")
|
|
95
95
|
end
|
|
96
96
|
end
|
|
97
97
|
|
|
@@ -168,7 +168,7 @@ module Basecamp
|
|
|
168
168
|
# @return [Hash] response data
|
|
169
169
|
def create_entry(schedule_id:, summary:, starts_at:, ends_at:, description: nil, participant_ids: nil, all_day: nil, notify: nil, url: nil, highlighted: nil, status: nil, subscriptions: nil, visible_to_clients: nil)
|
|
170
170
|
with_operation(service: "schedules", operation: "create_entry", is_mutation: true, resource_id: schedule_id) do
|
|
171
|
-
http_post("/schedules/#{schedule_id}/entries.json", body: compact_params(summary: summary, starts_at: starts_at, ends_at: ends_at, description: description, participant_ids: participant_ids, all_day: all_day, notify: notify, url: url, highlighted: highlighted, status: status, subscriptions: subscriptions, visible_to_clients: visible_to_clients)).json
|
|
171
|
+
http_post("/schedules/#{schedule_id}/entries.json", body: compact_params(summary: summary, starts_at: starts_at, ends_at: ends_at, description: description, participant_ids: participant_ids, all_day: all_day, notify: notify, url: url, highlighted: highlighted, status: status, subscriptions: subscriptions, visible_to_clients: visible_to_clients)).json(operation: "CreateScheduleEntry")
|
|
172
172
|
end
|
|
173
173
|
end
|
|
174
174
|
end
|
|
@@ -35,7 +35,7 @@ module Basecamp
|
|
|
35
35
|
# @return [Hash] response data
|
|
36
36
|
def metadata()
|
|
37
37
|
with_operation(service: "search", operation: "metadata", is_mutation: false) do
|
|
38
|
-
http_get("/searches/metadata.json", operation: "GetSearchMetadata").json
|
|
38
|
+
http_get("/searches/metadata.json", operation: "GetSearchMetadata").json(operation: "GetSearchMetadata")
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
end
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(recording_id:)
|
|
14
14
|
with_operation(service: "subscriptions", operation: "get", is_mutation: false, resource_id: recording_id) do
|
|
15
|
-
http_get("/recordings/#{recording_id}/subscription.json", operation: "GetSubscription").json
|
|
15
|
+
http_get("/recordings/#{recording_id}/subscription.json", operation: "GetSubscription").json(operation: "GetSubscription")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -21,7 +21,7 @@ module Basecamp
|
|
|
21
21
|
# @return [Hash] response data
|
|
22
22
|
def subscribe(recording_id:)
|
|
23
23
|
with_operation(service: "subscriptions", operation: "subscribe", is_mutation: true, resource_id: recording_id) do
|
|
24
|
-
http_post("/recordings/#{recording_id}/subscription.json").json
|
|
24
|
+
http_post("/recordings/#{recording_id}/subscription.json").json(operation: "Subscribe")
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
|
|
@@ -32,7 +32,7 @@ module Basecamp
|
|
|
32
32
|
# @return [Hash] response data
|
|
33
33
|
def update(recording_id:, subscriptions: nil, unsubscriptions: nil)
|
|
34
34
|
with_operation(service: "subscriptions", operation: "update", is_mutation: true, resource_id: recording_id) do
|
|
35
|
-
http_put("/recordings/#{recording_id}/subscription.json", body: compact_params(subscriptions: subscriptions, unsubscriptions: unsubscriptions)).json
|
|
35
|
+
http_put("/recordings/#{recording_id}/subscription.json", body: compact_params(subscriptions: subscriptions, unsubscriptions: unsubscriptions)).json(operation: "UpdateSubscription")
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -11,7 +11,7 @@ module Basecamp
|
|
|
11
11
|
# @return [Hash] response data
|
|
12
12
|
def get_library()
|
|
13
13
|
with_operation(service: "templates", operation: "get_library", is_mutation: false) do
|
|
14
|
-
http_get("/template_library.json", operation: "GetTemplateLibrary").json
|
|
14
|
+
http_get("/template_library.json", operation: "GetTemplateLibrary").json(operation: "GetTemplateLibrary")
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -22,7 +22,7 @@ module Basecamp
|
|
|
22
22
|
# @return [Hash] response data
|
|
23
23
|
def create_library_copy(template_recording_id:, destination_parent_id:, adding_people_confirmed: nil)
|
|
24
24
|
with_operation(service: "templates", operation: "create_library_copy", is_mutation: true) do
|
|
25
|
-
http_post("/template_library/copies.json", body: compact_params(template_recording_id: template_recording_id, destination_parent_id: destination_parent_id, adding_people_confirmed: adding_people_confirmed)).json
|
|
25
|
+
http_post("/template_library/copies.json", body: compact_params(template_recording_id: template_recording_id, destination_parent_id: destination_parent_id, adding_people_confirmed: adding_people_confirmed)).json(operation: "CreateTemplateLibraryCopy")
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
|
|
@@ -31,7 +31,7 @@ module Basecamp
|
|
|
31
31
|
# @return [Hash] response data
|
|
32
32
|
def get_library_copy(copy_id:)
|
|
33
33
|
with_operation(service: "templates", operation: "get_library_copy", is_mutation: false, resource_id: copy_id) do
|
|
34
|
-
http_get("/template_library/copies/#{copy_id}", operation: "GetTemplateLibraryCopy").json
|
|
34
|
+
http_get("/template_library/copies/#{copy_id}", operation: "GetTemplateLibraryCopy").json(operation: "GetTemplateLibraryCopy")
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
@@ -53,7 +53,7 @@ module Basecamp
|
|
|
53
53
|
# @return [Hash] response data
|
|
54
54
|
def create(name:, description: nil)
|
|
55
55
|
with_operation(service: "templates", operation: "create", is_mutation: true) do
|
|
56
|
-
http_post("/templates.json", body: compact_params(name: name, description: description)).json
|
|
56
|
+
http_post("/templates.json", body: compact_params(name: name, description: description)).json(operation: "CreateTemplate")
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
|
|
@@ -62,7 +62,7 @@ module Basecamp
|
|
|
62
62
|
# @return [Hash] response data
|
|
63
63
|
def get(template_id:)
|
|
64
64
|
with_operation(service: "templates", operation: "get", is_mutation: false, resource_id: template_id) do
|
|
65
|
-
http_get("/templates/#{template_id}", operation: "GetTemplate").json
|
|
65
|
+
http_get("/templates/#{template_id}", operation: "GetTemplate").json(operation: "GetTemplate")
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
68
|
|
|
@@ -73,7 +73,7 @@ module Basecamp
|
|
|
73
73
|
# @return [Hash] response data
|
|
74
74
|
def update(template_id:, name: nil, description: nil)
|
|
75
75
|
with_operation(service: "templates", operation: "update", is_mutation: true, resource_id: template_id) do
|
|
76
|
-
http_put("/templates/#{template_id}", body: compact_params(name: name, description: description)).json
|
|
76
|
+
http_put("/templates/#{template_id}", body: compact_params(name: name, description: description)).json(operation: "UpdateTemplate")
|
|
77
77
|
end
|
|
78
78
|
end
|
|
79
79
|
|
|
@@ -93,7 +93,7 @@ module Basecamp
|
|
|
93
93
|
# @return [Hash] response data
|
|
94
94
|
def create_project(template_id:, project:)
|
|
95
95
|
with_operation(service: "templates", operation: "create_project", is_mutation: true, resource_id: template_id) do
|
|
96
|
-
http_post("/templates/#{template_id}/project_constructions.json", body: compact_params(project: project)).json
|
|
96
|
+
http_post("/templates/#{template_id}/project_constructions.json", body: compact_params(project: project)).json(operation: "CreateProjectFromTemplate")
|
|
97
97
|
end
|
|
98
98
|
end
|
|
99
99
|
|
|
@@ -103,7 +103,7 @@ module Basecamp
|
|
|
103
103
|
# @return [Hash] response data
|
|
104
104
|
def get_construction(template_id:, construction_id:)
|
|
105
105
|
with_operation(service: "templates", operation: "get_construction", is_mutation: false, resource_id: construction_id) do
|
|
106
|
-
http_get("/templates/#{template_id}/project_constructions/#{construction_id}", operation: "GetProjectConstruction").json
|
|
106
|
+
http_get("/templates/#{template_id}/project_constructions/#{construction_id}", operation: "GetProjectConstruction").json(operation: "GetProjectConstruction")
|
|
107
107
|
end
|
|
108
108
|
end
|
|
109
109
|
end
|
|
@@ -46,7 +46,7 @@ module Basecamp
|
|
|
46
46
|
# @return [Hash] response data
|
|
47
47
|
def create(recording_id:, date:, hours:, description: nil, person_id: nil)
|
|
48
48
|
with_operation(service: "timesheets", operation: "create", is_mutation: true, resource_id: recording_id) do
|
|
49
|
-
http_post("/recordings/#{recording_id}/timesheet/entries.json", body: compact_params(date: date, hours: hours, description: description, person_id: person_id)).json
|
|
49
|
+
http_post("/recordings/#{recording_id}/timesheet/entries.json", body: compact_params(date: date, hours: hours, description: description, person_id: person_id)).json(operation: "CreateTimesheetEntry")
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
52
|
|
|
@@ -57,7 +57,7 @@ module Basecamp
|
|
|
57
57
|
# @return [Array<Hash>] response data
|
|
58
58
|
def report(from: nil, to: nil, person_id: nil)
|
|
59
59
|
with_operation(service: "timesheets", operation: "report", is_mutation: false) do
|
|
60
|
-
http_get("/reports/timesheet.json", params: compact_query_params(from: from, to: to, person_id: person_id), operation: "GetTimesheetReport").json
|
|
60
|
+
http_get("/reports/timesheet.json", params: compact_query_params(from: from, to: to, person_id: person_id), operation: "GetTimesheetReport").json(operation: "GetTimesheetReport")
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
@@ -66,7 +66,7 @@ module Basecamp
|
|
|
66
66
|
# @return [Hash] response data
|
|
67
67
|
def get(entry_id:)
|
|
68
68
|
with_operation(service: "timesheets", operation: "get", is_mutation: false, resource_id: entry_id) do
|
|
69
|
-
http_get("/timesheet_entries/#{entry_id}", operation: "GetTimesheetEntry").json
|
|
69
|
+
http_get("/timesheet_entries/#{entry_id}", operation: "GetTimesheetEntry").json(operation: "GetTimesheetEntry")
|
|
70
70
|
end
|
|
71
71
|
end
|
|
72
72
|
|
|
@@ -79,7 +79,7 @@ module Basecamp
|
|
|
79
79
|
# @return [Hash] response data
|
|
80
80
|
def update(entry_id:, date: nil, hours: nil, description: nil, person_id: nil)
|
|
81
81
|
with_operation(service: "timesheets", operation: "update", is_mutation: true, resource_id: entry_id) do
|
|
82
|
-
http_put("/timesheet_entries/#{entry_id}", body: compact_params(date: date, hours: hours, description: description, person_id: person_id)).json
|
|
82
|
+
http_put("/timesheet_entries/#{entry_id}", body: compact_params(date: date, hours: hours, description: description, person_id: person_id)).json(operation: "UpdateTimesheetEntry")
|
|
83
83
|
end
|
|
84
84
|
end
|
|
85
85
|
|
|
@@ -36,7 +36,7 @@ module Basecamp
|
|
|
36
36
|
# @return [Hash] response data
|
|
37
37
|
def create(todolist_id:, name:)
|
|
38
38
|
with_operation(service: "todolistgroups", operation: "create", is_mutation: true, resource_id: todolist_id) do
|
|
39
|
-
http_post("/todolists/#{todolist_id}/groups.json", body: compact_params(name: name)).json
|
|
39
|
+
http_post("/todolists/#{todolist_id}/groups.json", body: compact_params(name: name)).json(operation: "CreateTodolistGroup")
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
end
|