basecamp-sdk 0.9.0 → 0.11.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 +106 -10
- data/lib/basecamp/client.rb +13 -8
- data/lib/basecamp/config.rb +4 -3
- data/lib/basecamp/generated/metadata.json +280 -12
- data/lib/basecamp/generated/services/account_service.rb +1 -1
- data/lib/basecamp/generated/services/automation_service.rb +2 -2
- data/lib/basecamp/generated/services/boosts_service.rb +3 -3
- data/lib/basecamp/generated/services/campfires_service.rb +7 -7
- data/lib/basecamp/generated/services/card_columns_service.rb +1 -1
- data/lib/basecamp/generated/services/card_steps_service.rb +1 -1
- data/lib/basecamp/generated/services/card_tables_service.rb +1 -1
- data/lib/basecamp/generated/services/cards_service.rb +4 -4
- data/lib/basecamp/generated/services/checkins_service.rb +8 -8
- data/lib/basecamp/generated/services/client_approvals_service.rb +2 -2
- data/lib/basecamp/generated/services/client_correspondences_service.rb +2 -2
- data/lib/basecamp/generated/services/client_replies_service.rb +2 -2
- data/lib/basecamp/generated/services/comments_service.rb +2 -2
- data/lib/basecamp/generated/services/documents_service.rb +2 -2
- data/lib/basecamp/generated/services/events_service.rb +1 -1
- data/lib/basecamp/generated/services/everything_service.rb +169 -0
- data/lib/basecamp/generated/services/forwards_service.rb +5 -5
- data/lib/basecamp/generated/services/gauges_service.rb +3 -3
- data/lib/basecamp/generated/services/hill_charts_service.rb +1 -1
- data/lib/basecamp/generated/services/message_boards_service.rb +1 -1
- data/lib/basecamp/generated/services/message_types_service.rb +20 -15
- data/lib/basecamp/generated/services/messages_service.rb +2 -2
- data/lib/basecamp/generated/services/my_assignments_service.rb +5 -5
- data/lib/basecamp/generated/services/my_notifications_service.rb +16 -2
- data/lib/basecamp/generated/services/people_service.rb +9 -9
- data/lib/basecamp/generated/services/projects_service.rb +2 -2
- data/lib/basecamp/generated/services/recordings_service.rb +3 -3
- data/lib/basecamp/generated/services/reports_service.rb +5 -5
- data/lib/basecamp/generated/services/schedules_service.rb +13 -5
- data/lib/basecamp/generated/services/search_service.rb +2 -2
- data/lib/basecamp/generated/services/subscriptions_service.rb +1 -1
- data/lib/basecamp/generated/services/templates_service.rb +3 -3
- data/lib/basecamp/generated/services/timeline_service.rb +1 -1
- data/lib/basecamp/generated/services/timesheets_service.rb +5 -5
- data/lib/basecamp/generated/services/todolist_groups_service.rb +1 -1
- data/lib/basecamp/generated/services/todolists_service.rb +2 -2
- data/lib/basecamp/generated/services/todos_service.rb +2 -2
- data/lib/basecamp/generated/services/todosets_service.rb +1 -1
- data/lib/basecamp/generated/services/tools_service.rb +4 -3
- data/lib/basecamp/generated/services/uploads_service.rb +3 -3
- data/lib/basecamp/generated/services/vaults_service.rb +2 -2
- data/lib/basecamp/generated/services/webhooks_service.rb +2 -2
- data/lib/basecamp/generated/types.rb +374 -18
- data/lib/basecamp/http.rb +47 -18
- data/lib/basecamp/oauth/device_authorization.rb +37 -0
- data/lib/basecamp/oauth/device_flow.rb +873 -0
- data/lib/basecamp/oauth/device_flow_error.rb +46 -0
- data/lib/basecamp/oauth/discovery.rb +13 -11
- data/lib/basecamp/oauth/exchange.rb +44 -5
- data/lib/basecamp/oauth/fetcher.rb +626 -56
- data/lib/basecamp/oauth/oauth_error.rb +3 -1
- data/lib/basecamp/oauth/refresh_request.rb +8 -2
- data/lib/basecamp/oauth/resource.rb +13 -10
- data/lib/basecamp/oauth/token.rb +10 -3
- data/lib/basecamp/oauth.rb +47 -2
- data/lib/basecamp/services/cards_extensions.rb +67 -0
- data/lib/basecamp/version.rb +2 -2
- data/lib/basecamp.rb +5 -0
- data/scripts/generate-services.rb +24 -6
- data/scripts/generate-types.rb +29 -2
- metadata +7 -2
|
@@ -8,49 +8,54 @@ module Basecamp
|
|
|
8
8
|
class MessageTypesService < BaseService
|
|
9
9
|
|
|
10
10
|
# List message types in a project
|
|
11
|
+
# @param bucket_id [Integer] bucket id ID
|
|
11
12
|
# @return [Enumerator<Hash>] paginated results
|
|
12
|
-
def list()
|
|
13
|
-
wrap_paginated(service: "messagetypes", operation: "list", is_mutation: false) do
|
|
14
|
-
paginate("/categories.json")
|
|
13
|
+
def list(bucket_id:)
|
|
14
|
+
wrap_paginated(service: "messagetypes", operation: "list", is_mutation: false, project_id: bucket_id) do
|
|
15
|
+
paginate("/buckets/#{bucket_id}/categories.json", operation: "ListMessageTypes")
|
|
15
16
|
end
|
|
16
17
|
end
|
|
17
18
|
|
|
18
19
|
# Create a new message type in a project
|
|
20
|
+
# @param bucket_id [Integer] bucket id ID
|
|
19
21
|
# @param name [String] name
|
|
20
22
|
# @param icon [String] icon
|
|
21
23
|
# @return [Hash] response data
|
|
22
|
-
def create(name:, icon:)
|
|
23
|
-
with_operation(service: "messagetypes", operation: "create", is_mutation: true) do
|
|
24
|
-
http_post("/categories.json", body: compact_params(name: name, icon: icon)).json
|
|
24
|
+
def create(bucket_id:, name:, icon:)
|
|
25
|
+
with_operation(service: "messagetypes", operation: "create", is_mutation: true, project_id: bucket_id) do
|
|
26
|
+
http_post("/buckets/#{bucket_id}/categories.json", body: compact_params(name: name, icon: icon)).json
|
|
25
27
|
end
|
|
26
28
|
end
|
|
27
29
|
|
|
28
30
|
# Get a single message type by id
|
|
31
|
+
# @param bucket_id [Integer] bucket id ID
|
|
29
32
|
# @param type_id [Integer] type id ID
|
|
30
33
|
# @return [Hash] response data
|
|
31
|
-
def get(type_id:)
|
|
32
|
-
with_operation(service: "messagetypes", operation: "get", is_mutation: false, resource_id: type_id) do
|
|
33
|
-
http_get("/categories/#{type_id}").json
|
|
34
|
+
def get(bucket_id:, type_id:)
|
|
35
|
+
with_operation(service: "messagetypes", operation: "get", is_mutation: false, project_id: bucket_id, resource_id: type_id) do
|
|
36
|
+
http_get("/buckets/#{bucket_id}/categories/#{type_id}", operation: "GetMessageType").json
|
|
34
37
|
end
|
|
35
38
|
end
|
|
36
39
|
|
|
37
40
|
# Update an existing message type
|
|
41
|
+
# @param bucket_id [Integer] bucket id ID
|
|
38
42
|
# @param type_id [Integer] type id ID
|
|
39
43
|
# @param name [String, nil] name
|
|
40
44
|
# @param icon [String, nil] icon
|
|
41
45
|
# @return [Hash] response data
|
|
42
|
-
def update(type_id:, name: nil, icon: nil)
|
|
43
|
-
with_operation(service: "messagetypes", operation: "update", is_mutation: true, resource_id: type_id) do
|
|
44
|
-
http_put("/categories/#{type_id}", body: compact_params(name: name, icon: icon)).json
|
|
46
|
+
def update(bucket_id:, type_id:, name: nil, icon: nil)
|
|
47
|
+
with_operation(service: "messagetypes", operation: "update", is_mutation: true, project_id: bucket_id, resource_id: type_id) do
|
|
48
|
+
http_put("/buckets/#{bucket_id}/categories/#{type_id}", body: compact_params(name: name, icon: icon)).json
|
|
45
49
|
end
|
|
46
50
|
end
|
|
47
51
|
|
|
48
52
|
# Delete a message type
|
|
53
|
+
# @param bucket_id [Integer] bucket id ID
|
|
49
54
|
# @param type_id [Integer] type id ID
|
|
50
55
|
# @return [void]
|
|
51
|
-
def delete(type_id:)
|
|
52
|
-
with_operation(service: "messagetypes", operation: "delete", is_mutation: true, resource_id: type_id) do
|
|
53
|
-
http_delete("/categories/#{type_id}")
|
|
56
|
+
def delete(bucket_id:, type_id:)
|
|
57
|
+
with_operation(service: "messagetypes", operation: "delete", is_mutation: true, project_id: bucket_id, resource_id: type_id) do
|
|
58
|
+
http_delete("/buckets/#{bucket_id}/categories/#{type_id}")
|
|
54
59
|
nil
|
|
55
60
|
end
|
|
56
61
|
end
|
|
@@ -15,7 +15,7 @@ module Basecamp
|
|
|
15
15
|
def list(board_id:, sort: nil, direction: nil)
|
|
16
16
|
wrap_paginated(service: "messages", operation: "list", is_mutation: false, resource_id: board_id) do
|
|
17
17
|
params = compact_query_params(sort: sort, direction: direction)
|
|
18
|
-
paginate("/message_boards/#{board_id}/messages.json", params: params)
|
|
18
|
+
paginate("/message_boards/#{board_id}/messages.json", params: params, operation: "ListMessages")
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
21
|
|
|
@@ -39,7 +39,7 @@ module Basecamp
|
|
|
39
39
|
# @return [Hash] response data
|
|
40
40
|
def get(message_id:)
|
|
41
41
|
with_operation(service: "messages", operation: "get", is_mutation: false, resource_id: message_id) do
|
|
42
|
-
http_get("/messages/#{message_id}").json
|
|
42
|
+
http_get("/messages/#{message_id}", operation: "GetMessage").json
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
|
|
@@ -11,25 +11,25 @@ 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").json
|
|
14
|
+
http_get("/my/assignments.json", operation: "GetMyAssignments").json
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
# Get the current user's completed assignments.
|
|
19
|
-
# @return [Hash] response data
|
|
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").json
|
|
22
|
+
http_get("/my/assignments/completed.json", operation: "GetMyCompletedAssignments").json
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
# Get the current user's assignments filtered by due date scope.
|
|
27
27
|
# @param scope [String, nil] Filter by due date range: overdue, due_today, due_tomorrow,
|
|
28
28
|
# due_later_this_week, due_next_week, due_later
|
|
29
|
-
# @return [Hash] response data
|
|
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)).json
|
|
32
|
+
http_get("/my/assignments/due.json", params: compact_query_params(scope: scope), operation: "GetMyDueAssignments").json
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
end
|
|
@@ -9,10 +9,24 @@ module Basecamp
|
|
|
9
9
|
|
|
10
10
|
# Get the current user's notification inbox (the "Hey!" menu).
|
|
11
11
|
# @param page [Integer, nil] Page number for paginating through read items. Defaults to 1.
|
|
12
|
+
# @param limit_bubble_ups [Boolean, nil] Set to true to cap `bubble_ups` at 2 current bubble-ups and omit the
|
|
13
|
+
# `scheduled_bubble_ups` key entirely. Defaults to false. Use the dedicated
|
|
14
|
+
# bubble-ups endpoint (GetBubbleUps) to page through all current and
|
|
15
|
+
# scheduled bubble-ups.
|
|
12
16
|
# @return [Hash] response data
|
|
13
|
-
def get_my_notifications(page: nil)
|
|
17
|
+
def get_my_notifications(page: nil, limit_bubble_ups: nil)
|
|
14
18
|
with_operation(service: "mynotifications", operation: "get_my_notifications", is_mutation: false) do
|
|
15
|
-
http_get("/my/readings.json", params: compact_query_params(page: page)).json
|
|
19
|
+
http_get("/my/readings.json", params: compact_query_params(page: page, limit_bubble_ups: limit_bubble_ups), operation: "GetMyNotifications").json
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Get the current user's current and scheduled bubble-ups (paginated, 50 per page).
|
|
24
|
+
# @param page [Integer, nil] Page number. Defaults to 1.
|
|
25
|
+
# @return [Enumerator<Hash>] paginated results
|
|
26
|
+
def get_bubble_ups(page: nil)
|
|
27
|
+
wrap_paginated(service: "mynotifications", operation: "get_bubble_ups", is_mutation: false) do
|
|
28
|
+
params = compact_query_params(page: page)
|
|
29
|
+
paginate("/my/readings/bubble_ups.json", params: params, operation: "GetBubbleUps")
|
|
16
30
|
end
|
|
17
31
|
end
|
|
18
32
|
|
|
@@ -11,7 +11,7 @@ module Basecamp
|
|
|
11
11
|
# @return [Enumerator<Hash>] paginated results
|
|
12
12
|
def list_pingable()
|
|
13
13
|
wrap_paginated(service: "people", operation: "list_pingable", is_mutation: false) do
|
|
14
|
-
paginate("/circles/people.json")
|
|
14
|
+
paginate("/circles/people.json", operation: "ListPingablePeople")
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ module Basecamp
|
|
|
19
19
|
# @return [Hash] response data
|
|
20
20
|
def get_my_preferences()
|
|
21
21
|
with_operation(service: "people", operation: "get_my_preferences", is_mutation: false) do
|
|
22
|
-
http_get("/my/preferences.json").json
|
|
22
|
+
http_get("/my/preferences.json", operation: "GetMyPreferences").json
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
@@ -36,7 +36,7 @@ module Basecamp
|
|
|
36
36
|
# @return [Hash] response data
|
|
37
37
|
def my_profile()
|
|
38
38
|
with_operation(service: "people", operation: "my_profile", is_mutation: false) do
|
|
39
|
-
http_get("/my/profile.json").json
|
|
39
|
+
http_get("/my/profile.json", operation: "GetMyProfile").json
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
|
|
@@ -61,7 +61,7 @@ module Basecamp
|
|
|
61
61
|
# @return [Enumerator<Hash>] paginated results
|
|
62
62
|
def list()
|
|
63
63
|
wrap_paginated(service: "people", operation: "list", is_mutation: false) do
|
|
64
|
-
paginate("/people.json")
|
|
64
|
+
paginate("/people.json", operation: "ListPeople")
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
67
|
|
|
@@ -70,7 +70,7 @@ module Basecamp
|
|
|
70
70
|
# @return [Hash] response data
|
|
71
71
|
def get(person_id:)
|
|
72
72
|
with_operation(service: "people", operation: "get", is_mutation: false, resource_id: person_id) do
|
|
73
|
-
http_get("/people/#{person_id}").json
|
|
73
|
+
http_get("/people/#{person_id}", operation: "GetPerson").json
|
|
74
74
|
end
|
|
75
75
|
end
|
|
76
76
|
|
|
@@ -79,7 +79,7 @@ module Basecamp
|
|
|
79
79
|
# @return [Hash] response data
|
|
80
80
|
def get_out_of_office(person_id:)
|
|
81
81
|
with_operation(service: "people", operation: "get_out_of_office", is_mutation: false, resource_id: person_id) do
|
|
82
|
-
http_get("/people/#{person_id}/out_of_office.json").json
|
|
82
|
+
http_get("/people/#{person_id}/out_of_office.json", operation: "GetOutOfOffice").json
|
|
83
83
|
end
|
|
84
84
|
end
|
|
85
85
|
|
|
@@ -108,7 +108,7 @@ module Basecamp
|
|
|
108
108
|
# @return [Enumerator<Hash>] paginated results
|
|
109
109
|
def list_for_project(project_id:)
|
|
110
110
|
wrap_paginated(service: "people", operation: "list_for_project", is_mutation: false, project_id: project_id) do
|
|
111
|
-
paginate("/projects/#{project_id}/people.json")
|
|
111
|
+
paginate("/projects/#{project_id}/people.json", operation: "ListProjectPeople")
|
|
112
112
|
end
|
|
113
113
|
end
|
|
114
114
|
|
|
@@ -125,10 +125,10 @@ module Basecamp
|
|
|
125
125
|
end
|
|
126
126
|
|
|
127
127
|
# List people who can be assigned todos
|
|
128
|
-
# @return [Hash] response data
|
|
128
|
+
# @return [Array<Hash>] response data
|
|
129
129
|
def list_assignable()
|
|
130
130
|
with_operation(service: "people", operation: "list_assignable", is_mutation: false) do
|
|
131
|
-
http_get("/reports/todos/assigned.json").json
|
|
131
|
+
http_get("/reports/todos/assigned.json", operation: "ListAssignablePeople").json
|
|
132
132
|
end
|
|
133
133
|
end
|
|
134
134
|
end
|
|
@@ -13,7 +13,7 @@ module Basecamp
|
|
|
13
13
|
def list(status: nil)
|
|
14
14
|
wrap_paginated(service: "projects", operation: "list", is_mutation: false) do
|
|
15
15
|
params = compact_query_params(status: status)
|
|
16
|
-
paginate("/projects.json", params: params)
|
|
16
|
+
paginate("/projects.json", params: params, operation: "ListProjects")
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
@@ -32,7 +32,7 @@ module Basecamp
|
|
|
32
32
|
# @return [Hash] response data
|
|
33
33
|
def get(project_id:)
|
|
34
34
|
with_operation(service: "projects", operation: "get", is_mutation: false, project_id: project_id) do
|
|
35
|
-
http_get("/projects/#{project_id}").json
|
|
35
|
+
http_get("/projects/#{project_id}", operation: "GetProject").json
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -8,7 +8,7 @@ module Basecamp
|
|
|
8
8
|
class RecordingsService < BaseService
|
|
9
9
|
|
|
10
10
|
# List recordings of a given type across projects
|
|
11
|
-
# @param type [String] Comment|Document|Kanban::Card|Kanban::Step|Message|Question::Answer|Schedule::Entry|Todo|Todolist|Upload|Vault
|
|
11
|
+
# @param type [String] Comment|Document|Door|Kanban::Card|Kanban::Step|Message|Question::Answer|Schedule::Entry|Todo|Todolist|Upload|Vault
|
|
12
12
|
# @param bucket [String, nil] bucket
|
|
13
13
|
# @param status [String, nil] active|archived|trashed
|
|
14
14
|
# @param sort [String, nil] created_at|updated_at
|
|
@@ -17,7 +17,7 @@ module Basecamp
|
|
|
17
17
|
def list(type:, bucket: nil, status: nil, sort: nil, direction: nil)
|
|
18
18
|
wrap_paginated(service: "recordings", operation: "list", is_mutation: false) do
|
|
19
19
|
params = compact_query_params(type: type, bucket: bucket, status: status, sort: sort, direction: direction)
|
|
20
|
-
paginate("/projects/recordings.json", params: params)
|
|
20
|
+
paginate("/projects/recordings.json", params: params, operation: "ListRecordings")
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
|
|
@@ -26,7 +26,7 @@ module Basecamp
|
|
|
26
26
|
# @return [Hash] response data
|
|
27
27
|
def get(recording_id:)
|
|
28
28
|
with_operation(service: "recordings", operation: "get", is_mutation: false, resource_id: recording_id) do
|
|
29
|
-
http_get("/recordings/#{recording_id}").json
|
|
29
|
+
http_get("/recordings/#{recording_id}", operation: "GetRecording").json
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
|
|
@@ -11,7 +11,7 @@ module Basecamp
|
|
|
11
11
|
# @return [Enumerator<Hash>] paginated results
|
|
12
12
|
def progress()
|
|
13
13
|
wrap_paginated(service: "reports", operation: "progress", is_mutation: false) do
|
|
14
|
-
paginate("/reports/progress.json")
|
|
14
|
+
paginate("/reports/progress.json", operation: "GetProgressReport")
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -21,7 +21,7 @@ module Basecamp
|
|
|
21
21
|
# @return [Hash] response data
|
|
22
22
|
def upcoming(window_starts_on: nil, window_ends_on: nil)
|
|
23
23
|
with_operation(service: "reports", operation: "upcoming", is_mutation: false) do
|
|
24
|
-
http_get("/reports/schedules/upcoming.json", params: compact_query_params(window_starts_on: window_starts_on, window_ends_on: window_ends_on)).json
|
|
24
|
+
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
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
|
|
@@ -31,7 +31,7 @@ module Basecamp
|
|
|
31
31
|
# @return [Hash] response data
|
|
32
32
|
def assigned(person_id:, group_by: nil)
|
|
33
33
|
with_operation(service: "reports", operation: "assigned", is_mutation: false, resource_id: person_id) do
|
|
34
|
-
http_get("/reports/todos/assigned/#{person_id}", params: compact_query_params(group_by: group_by)).json
|
|
34
|
+
http_get("/reports/todos/assigned/#{person_id}", params: compact_query_params(group_by: group_by), operation: "GetAssignedTodos").json
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
@@ -39,7 +39,7 @@ module Basecamp
|
|
|
39
39
|
# @return [Hash] response data
|
|
40
40
|
def overdue()
|
|
41
41
|
with_operation(service: "reports", operation: "overdue", is_mutation: false) do
|
|
42
|
-
http_get("/reports/todos/overdue.json").json
|
|
42
|
+
http_get("/reports/todos/overdue.json", operation: "GetOverdueTodos").json
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
|
|
@@ -48,7 +48,7 @@ module Basecamp
|
|
|
48
48
|
# @return [Hash] response data
|
|
49
49
|
def person_progress(person_id:)
|
|
50
50
|
wrap_paginated_wrapped(key: "events", service: "reports", operation: "person_progress", is_mutation: false, resource_id: person_id) do
|
|
51
|
-
paginate_wrapped("/reports/users/progress/#{person_id}.json", key: "events")
|
|
51
|
+
paginate_wrapped("/reports/users/progress/#{person_id}.json", key: "events", operation: "GetPersonProgress")
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
54
|
end
|
|
@@ -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}").json
|
|
15
|
+
http_get("/schedule_entries/#{entry_id}", operation: "GetScheduleEntry").json
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -22,7 +22,15 @@ module Basecamp
|
|
|
22
22
|
# @param starts_at [String, nil] starts at (RFC3339 (e.g., 2024-12-15T09:00:00Z))
|
|
23
23
|
# @param ends_at [String, nil] ends at (RFC3339 (e.g., 2024-12-15T09:00:00Z))
|
|
24
24
|
# @param description [String, nil] description
|
|
25
|
-
# @param participant_ids [Array, nil]
|
|
25
|
+
# @param participant_ids [Array, nil] Replaces the entry's participants.
|
|
26
|
+
#
|
|
27
|
+
# Omitting this member preserves the current participants; sending an empty
|
|
28
|
+
# array clears them. That guarantee is BC3-side and recent: until
|
|
29
|
+
# basecamp/bc3#12425, `Schedules::EntriesController#update` called
|
|
30
|
+
# `replace_participants` unconditionally, so any update omitting the key —
|
|
31
|
+
# including the shape in BC3's own "Update a schedule entry" doc example —
|
|
32
|
+
# silently removed every participant and notified each one. The controller
|
|
33
|
+
# now guards on the request actually addressing participants.
|
|
26
34
|
# @param all_day [Boolean, nil] all day
|
|
27
35
|
# @param notify [Boolean, nil] notify
|
|
28
36
|
# @return [Hash] response data
|
|
@@ -38,7 +46,7 @@ module Basecamp
|
|
|
38
46
|
# @return [Hash] response data
|
|
39
47
|
def get_entry_occurrence(entry_id:, date:)
|
|
40
48
|
with_operation(service: "schedules", operation: "get_entry_occurrence", is_mutation: false, resource_id: entry_id) do
|
|
41
|
-
http_get("/schedule_entries/#{entry_id}/occurrences/#{date}").json
|
|
49
|
+
http_get("/schedule_entries/#{entry_id}/occurrences/#{date}", operation: "GetScheduleEntryOccurrence").json
|
|
42
50
|
end
|
|
43
51
|
end
|
|
44
52
|
|
|
@@ -47,7 +55,7 @@ module Basecamp
|
|
|
47
55
|
# @return [Hash] response data
|
|
48
56
|
def get(schedule_id:)
|
|
49
57
|
with_operation(service: "schedules", operation: "get", is_mutation: false, resource_id: schedule_id) do
|
|
50
|
-
http_get("/schedules/#{schedule_id}").json
|
|
58
|
+
http_get("/schedules/#{schedule_id}", operation: "GetSchedule").json
|
|
51
59
|
end
|
|
52
60
|
end
|
|
53
61
|
|
|
@@ -68,7 +76,7 @@ module Basecamp
|
|
|
68
76
|
def list_entries(schedule_id:, status: nil)
|
|
69
77
|
wrap_paginated(service: "schedules", operation: "list_entries", is_mutation: false, resource_id: schedule_id) do
|
|
70
78
|
params = compact_query_params(status: status)
|
|
71
|
-
paginate("/schedules/#{schedule_id}/entries.json", params: params)
|
|
79
|
+
paginate("/schedules/#{schedule_id}/entries.json", params: params, operation: "ListScheduleEntries")
|
|
72
80
|
end
|
|
73
81
|
end
|
|
74
82
|
|
|
@@ -25,7 +25,7 @@ module Basecamp
|
|
|
25
25
|
def search(q:, type_names: nil, bucket_ids: nil, creator_ids: nil, file_type: nil, exclude_chat: nil, since: nil, sort: nil, type: nil, bucket_id: nil, creator_id: nil)
|
|
26
26
|
wrap_paginated(service: "search", operation: "search", is_mutation: false) do
|
|
27
27
|
params = compact_query_params(q: q, type_names: type_names, bucket_ids: bucket_ids, creator_ids: creator_ids, file_type: file_type, exclude_chat: exclude_chat, since: since, sort: sort, type: type, bucket_id: bucket_id, creator_id: creator_id)
|
|
28
|
-
paginate("/search.json", params: params)
|
|
28
|
+
paginate("/search.json", params: params, operation: "Search")
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
@@ -33,7 +33,7 @@ module Basecamp
|
|
|
33
33
|
# @return [Hash] response data
|
|
34
34
|
def metadata()
|
|
35
35
|
with_operation(service: "search", operation: "metadata", is_mutation: false) do
|
|
36
|
-
http_get("/searches/metadata.json").json
|
|
36
|
+
http_get("/searches/metadata.json", operation: "GetSearchMetadata").json
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
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").json
|
|
15
|
+
http_get("/recordings/#{recording_id}/subscription.json", operation: "GetSubscription").json
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -13,7 +13,7 @@ module Basecamp
|
|
|
13
13
|
def list(status: nil)
|
|
14
14
|
wrap_paginated(service: "templates", operation: "list", is_mutation: false) do
|
|
15
15
|
params = compact_query_params(status: status)
|
|
16
|
-
paginate("/templates.json", params: params)
|
|
16
|
+
paginate("/templates.json", params: params, operation: "ListTemplates")
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
@@ -32,7 +32,7 @@ module Basecamp
|
|
|
32
32
|
# @return [Hash] response data
|
|
33
33
|
def get(template_id:)
|
|
34
34
|
with_operation(service: "templates", operation: "get", is_mutation: false, resource_id: template_id) do
|
|
35
|
-
http_get("/templates/#{template_id}").json
|
|
35
|
+
http_get("/templates/#{template_id}", operation: "GetTemplate").json
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -73,7 +73,7 @@ module Basecamp
|
|
|
73
73
|
# @return [Hash] response data
|
|
74
74
|
def get_construction(template_id:, construction_id:)
|
|
75
75
|
with_operation(service: "templates", operation: "get_construction", is_mutation: false, resource_id: construction_id) do
|
|
76
|
-
http_get("/templates/#{template_id}/project_constructions/#{construction_id}").json
|
|
76
|
+
http_get("/templates/#{template_id}/project_constructions/#{construction_id}", operation: "GetProjectConstruction").json
|
|
77
77
|
end
|
|
78
78
|
end
|
|
79
79
|
end
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Enumerator<Hash>] paginated results
|
|
13
13
|
def get_project_timeline(project_id:)
|
|
14
14
|
wrap_paginated(service: "timeline", operation: "get_project_timeline", is_mutation: false, project_id: project_id) do
|
|
15
|
-
paginate("/projects/#{project_id}/timeline.json")
|
|
15
|
+
paginate("/projects/#{project_id}/timeline.json", operation: "GetProjectTimeline")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
end
|
|
@@ -16,7 +16,7 @@ module Basecamp
|
|
|
16
16
|
def for_project(project_id:, from: nil, to: nil, person_id: nil)
|
|
17
17
|
wrap_paginated(service: "timesheets", operation: "for_project", is_mutation: false, project_id: project_id) do
|
|
18
18
|
params = compact_query_params(from: from, to: to, person_id: person_id)
|
|
19
|
-
paginate("/projects/#{project_id}/timesheet.json", params: params)
|
|
19
|
+
paginate("/projects/#{project_id}/timesheet.json", params: params, operation: "GetProjectTimesheet")
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
|
|
@@ -29,7 +29,7 @@ module Basecamp
|
|
|
29
29
|
def for_recording(recording_id:, from: nil, to: nil, person_id: nil)
|
|
30
30
|
wrap_paginated(service: "timesheets", operation: "for_recording", is_mutation: false, resource_id: recording_id) do
|
|
31
31
|
params = compact_query_params(from: from, to: to, person_id: person_id)
|
|
32
|
-
paginate("/recordings/#{recording_id}/timesheet.json", params: params)
|
|
32
|
+
paginate("/recordings/#{recording_id}/timesheet.json", params: params, operation: "GetRecordingTimesheet")
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
@@ -50,10 +50,10 @@ module Basecamp
|
|
|
50
50
|
# @param from [String, nil] from
|
|
51
51
|
# @param to [String, nil] to
|
|
52
52
|
# @param person_id [Integer, nil] person id
|
|
53
|
-
# @return [Hash] response data
|
|
53
|
+
# @return [Array<Hash>] response data
|
|
54
54
|
def report(from: nil, to: nil, person_id: nil)
|
|
55
55
|
with_operation(service: "timesheets", operation: "report", is_mutation: false) do
|
|
56
|
-
http_get("/reports/timesheet.json", params: compact_query_params(from: from, to: to, person_id: person_id)).json
|
|
56
|
+
http_get("/reports/timesheet.json", params: compact_query_params(from: from, to: to, person_id: person_id), operation: "GetTimesheetReport").json
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
|
|
@@ -62,7 +62,7 @@ module Basecamp
|
|
|
62
62
|
# @return [Hash] response data
|
|
63
63
|
def get(entry_id:)
|
|
64
64
|
with_operation(service: "timesheets", operation: "get", is_mutation: false, resource_id: entry_id) do
|
|
65
|
-
http_get("/timesheet_entries/#{entry_id}").json
|
|
65
|
+
http_get("/timesheet_entries/#{entry_id}", operation: "GetTimesheetEntry").json
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
68
|
|
|
@@ -23,7 +23,7 @@ module Basecamp
|
|
|
23
23
|
# @return [Enumerator<Hash>] paginated results
|
|
24
24
|
def list(todolist_id:)
|
|
25
25
|
wrap_paginated(service: "todolistgroups", operation: "list", is_mutation: false, resource_id: todolist_id) do
|
|
26
|
-
paginate("/todolists/#{todolist_id}/groups.json")
|
|
26
|
+
paginate("/todolists/#{todolist_id}/groups.json", operation: "ListTodolistGroups")
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(id:)
|
|
14
14
|
with_operation(service: "todolists", operation: "get", is_mutation: false, resource_id: id) do
|
|
15
|
-
http_get("/todolists/#{id}").json
|
|
15
|
+
http_get("/todolists/#{id}", operation: "GetTodolistOrGroup").json
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -45,7 +45,7 @@ module Basecamp
|
|
|
45
45
|
def list(todoset_id:, status: nil)
|
|
46
46
|
wrap_paginated(service: "todolists", operation: "list", is_mutation: false, resource_id: todoset_id) do
|
|
47
47
|
params = compact_query_params(status: status)
|
|
48
|
-
paginate("/todosets/#{todoset_id}/todolists.json", params: params)
|
|
48
|
+
paginate("/todosets/#{todoset_id}/todolists.json", params: params, operation: "ListTodolists")
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
|
|
@@ -15,7 +15,7 @@ module Basecamp
|
|
|
15
15
|
def list(todolist_id:, status: nil, completed: nil)
|
|
16
16
|
wrap_paginated(service: "todos", operation: "list", is_mutation: false, resource_id: todolist_id) do
|
|
17
17
|
params = compact_query_params(status: status, completed: completed)
|
|
18
|
-
paginate("/todolists/#{todolist_id}/todos.json", params: params)
|
|
18
|
+
paginate("/todolists/#{todolist_id}/todos.json", params: params, operation: "ListTodos")
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
21
|
|
|
@@ -40,7 +40,7 @@ module Basecamp
|
|
|
40
40
|
# @return [Hash] response data
|
|
41
41
|
def get(todo_id:)
|
|
42
42
|
with_operation(service: "todos", operation: "get", is_mutation: false, resource_id: todo_id) do
|
|
43
|
-
http_get("/todos/#{todo_id}").json
|
|
43
|
+
http_get("/todos/#{todo_id}", operation: "GetTodo").json
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(todoset_id:)
|
|
14
14
|
with_operation(service: "todosets", operation: "get", is_mutation: false, resource_id: todoset_id) do
|
|
15
|
-
http_get("/todosets/#{todoset_id}").json
|
|
15
|
+
http_get("/todosets/#{todoset_id}", operation: "GetTodoset").json
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
end
|
|
@@ -11,10 +11,11 @@ module Basecamp
|
|
|
11
11
|
# @param bucket_id [Integer] bucket id ID
|
|
12
12
|
# @param tool_type [String] Tool type to add to the project dock. Values: Chat::Transcript|Inbox|Kanban::Board|Message::Board|Questionnaire|Schedule|Todoset|Vault.
|
|
13
13
|
# @param title [String, nil] Title for the new tool. When omitted, Basecamp assigns the next available default title for the tool type.
|
|
14
|
+
# @param visible_to_clients [Boolean, nil] Create the tool already visible to clients. Honored only for tool types that manage their own client visibility (Chat::Transcript, Kanban::Board), which otherwise start hidden; every other tool type ignores it and inherits the project default.
|
|
14
15
|
# @return [Hash] response data
|
|
15
|
-
def create(bucket_id:, tool_type:, title: nil)
|
|
16
|
+
def create(bucket_id:, tool_type:, title: nil, visible_to_clients: nil)
|
|
16
17
|
with_operation(service: "tools", operation: "create", is_mutation: true, project_id: bucket_id) do
|
|
17
|
-
http_post("/buckets/#{bucket_id}/dock/tools.json", body: compact_params(tool_type: tool_type, title: title)).json
|
|
18
|
+
http_post("/buckets/#{bucket_id}/dock/tools.json", body: compact_params(tool_type: tool_type, title: title, visible_to_clients: visible_to_clients)).json
|
|
18
19
|
end
|
|
19
20
|
end
|
|
20
21
|
|
|
@@ -23,7 +24,7 @@ module Basecamp
|
|
|
23
24
|
# @return [Hash] response data
|
|
24
25
|
def get(tool_id:)
|
|
25
26
|
with_operation(service: "tools", operation: "get", is_mutation: false, resource_id: tool_id) do
|
|
26
|
-
http_get("/dock/tools/#{tool_id}").json
|
|
27
|
+
http_get("/dock/tools/#{tool_id}", operation: "GetTool").json
|
|
27
28
|
end
|
|
28
29
|
end
|
|
29
30
|
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(upload_id:)
|
|
14
14
|
with_operation(service: "uploads", operation: "get", is_mutation: false, resource_id: upload_id) do
|
|
15
|
-
http_get("/uploads/#{upload_id}").json
|
|
15
|
+
http_get("/uploads/#{upload_id}", operation: "GetUpload").json
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -32,7 +32,7 @@ module Basecamp
|
|
|
32
32
|
# @return [Enumerator<Hash>] paginated results
|
|
33
33
|
def list_versions(upload_id:)
|
|
34
34
|
wrap_paginated(service: "uploads", operation: "list_versions", is_mutation: false, resource_id: upload_id) do
|
|
35
|
-
paginate("/uploads/#{upload_id}/versions.json")
|
|
35
|
+
paginate("/uploads/#{upload_id}/versions.json", operation: "ListUploadVersions")
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -41,7 +41,7 @@ module Basecamp
|
|
|
41
41
|
# @return [Enumerator<Hash>] paginated results
|
|
42
42
|
def list(vault_id:)
|
|
43
43
|
wrap_paginated(service: "uploads", operation: "list", is_mutation: false, resource_id: vault_id) do
|
|
44
|
-
paginate("/vaults/#{vault_id}/uploads.json")
|
|
44
|
+
paginate("/vaults/#{vault_id}/uploads.json", operation: "ListUploads")
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(vault_id:)
|
|
14
14
|
with_operation(service: "vaults", operation: "get", is_mutation: false, resource_id: vault_id) do
|
|
15
|
-
http_get("/vaults/#{vault_id}").json
|
|
15
|
+
http_get("/vaults/#{vault_id}", operation: "GetVault").json
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -31,7 +31,7 @@ module Basecamp
|
|
|
31
31
|
# @return [Enumerator<Hash>] paginated results
|
|
32
32
|
def list(vault_id:)
|
|
33
33
|
wrap_paginated(service: "vaults", operation: "list", is_mutation: false, resource_id: vault_id) do
|
|
34
|
-
paginate("/vaults/#{vault_id}/vaults.json")
|
|
34
|
+
paginate("/vaults/#{vault_id}/vaults.json", operation: "ListVaults")
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Enumerator<Hash>] paginated results
|
|
13
13
|
def list(bucket_id:)
|
|
14
14
|
wrap_paginated(service: "webhooks", operation: "list", is_mutation: false, project_id: bucket_id) do
|
|
15
|
-
paginate("/buckets/#{bucket_id}/webhooks.json")
|
|
15
|
+
paginate("/buckets/#{bucket_id}/webhooks.json", operation: "ListWebhooks")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -33,7 +33,7 @@ module Basecamp
|
|
|
33
33
|
# @return [Hash] response data
|
|
34
34
|
def get(webhook_id:)
|
|
35
35
|
with_operation(service: "webhooks", operation: "get", is_mutation: false, resource_id: webhook_id) do
|
|
36
|
-
http_get("/webhooks/#{webhook_id}").json
|
|
36
|
+
http_get("/webhooks/#{webhook_id}", operation: "GetWebhook").json
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|