basecamp-sdk 0.10.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 +8 -8
- data/lib/basecamp/config.rb +4 -3
- data/lib/basecamp/generated/metadata.json +7 -17
- data/lib/basecamp/generated/services/account_service.rb +1 -1
- data/lib/basecamp/generated/services/automation_service.rb +1 -1
- 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 +2 -2
- 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 +16 -26
- 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 +2 -2
- data/lib/basecamp/generated/services/messages_service.rb +2 -2
- data/lib/basecamp/generated/services/my_assignments_service.rb +3 -3
- data/lib/basecamp/generated/services/my_notifications_service.rb +2 -2
- data/lib/basecamp/generated/services/people_service.rb +8 -8
- data/lib/basecamp/generated/services/projects_service.rb +2 -2
- data/lib/basecamp/generated/services/recordings_service.rb +2 -2
- data/lib/basecamp/generated/services/reports_service.rb +5 -5
- data/lib/basecamp/generated/services/schedules_service.rb +4 -4
- 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 +4 -4
- 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 +1 -1
- 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 +1 -34
- data/lib/basecamp/http.rb +47 -19
- 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/version.rb +2 -2
- data/scripts/generate-services.rb +9 -6
- metadata +5 -2
|
@@ -7,23 +7,13 @@ module Basecamp
|
|
|
7
7
|
# @generated from OpenAPI spec
|
|
8
8
|
class EverythingService < BaseService
|
|
9
9
|
|
|
10
|
-
# Get every boost across all accessible projects, newest-first (paginated).
|
|
11
|
-
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
12
|
-
# @return [Enumerator<Hash>] paginated results
|
|
13
|
-
def get_everything_boosts(page: nil)
|
|
14
|
-
wrap_paginated(service: "everything", operation: "get_everything_boosts", is_mutation: false) do
|
|
15
|
-
params = compact_query_params(page: page)
|
|
16
|
-
paginate("/boosts.json", params: params)
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
|
|
20
10
|
# Completed cards across all accessible projects, grouped by project (paginated).
|
|
21
11
|
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
22
12
|
# @return [Enumerator<Hash>] paginated results
|
|
23
13
|
def get_everything_completed_cards(page: nil)
|
|
24
14
|
wrap_paginated(service: "everything", operation: "get_everything_completed_cards", is_mutation: false) do
|
|
25
15
|
params = compact_query_params(page: page)
|
|
26
|
-
paginate("/cards/completed.json", params: params)
|
|
16
|
+
paginate("/cards/completed.json", params: params, operation: "GetEverythingCompletedCards")
|
|
27
17
|
end
|
|
28
18
|
end
|
|
29
19
|
|
|
@@ -33,7 +23,7 @@ module Basecamp
|
|
|
33
23
|
def get_everything_no_due_date_cards(page: nil)
|
|
34
24
|
wrap_paginated(service: "everything", operation: "get_everything_no_due_date_cards", is_mutation: false) do
|
|
35
25
|
params = compact_query_params(page: page)
|
|
36
|
-
paginate("/cards/no_due_date.json", params: params)
|
|
26
|
+
paginate("/cards/no_due_date.json", params: params, operation: "GetEverythingNoDueDateCards")
|
|
37
27
|
end
|
|
38
28
|
end
|
|
39
29
|
|
|
@@ -43,7 +33,7 @@ module Basecamp
|
|
|
43
33
|
def get_everything_not_now_cards(page: nil)
|
|
44
34
|
wrap_paginated(service: "everything", operation: "get_everything_not_now_cards", is_mutation: false) do
|
|
45
35
|
params = compact_query_params(page: page)
|
|
46
|
-
paginate("/cards/not_now.json", params: params)
|
|
36
|
+
paginate("/cards/not_now.json", params: params, operation: "GetEverythingNotNowCards")
|
|
47
37
|
end
|
|
48
38
|
end
|
|
49
39
|
|
|
@@ -53,7 +43,7 @@ module Basecamp
|
|
|
53
43
|
def get_everything_open_cards(page: nil)
|
|
54
44
|
wrap_paginated(service: "everything", operation: "get_everything_open_cards", is_mutation: false) do
|
|
55
45
|
params = compact_query_params(page: page)
|
|
56
|
-
paginate("/cards/open.json", params: params)
|
|
46
|
+
paginate("/cards/open.json", params: params, operation: "GetEverythingOpenCards")
|
|
57
47
|
end
|
|
58
48
|
end
|
|
59
49
|
|
|
@@ -61,7 +51,7 @@ module Basecamp
|
|
|
61
51
|
# @return [Array<Hash>] response data
|
|
62
52
|
def get_everything_overdue_cards()
|
|
63
53
|
with_operation(service: "everything", operation: "get_everything_overdue_cards", is_mutation: false) do
|
|
64
|
-
http_get("/cards/overdue.json").json
|
|
54
|
+
http_get("/cards/overdue.json", operation: "GetEverythingOverdueCards").json
|
|
65
55
|
end
|
|
66
56
|
end
|
|
67
57
|
|
|
@@ -71,7 +61,7 @@ module Basecamp
|
|
|
71
61
|
def get_everything_unassigned_cards(page: nil)
|
|
72
62
|
wrap_paginated(service: "everything", operation: "get_everything_unassigned_cards", is_mutation: false) do
|
|
73
63
|
params = compact_query_params(page: page)
|
|
74
|
-
paginate("/cards/unassigned.json", params: params)
|
|
64
|
+
paginate("/cards/unassigned.json", params: params, operation: "GetEverythingUnassignedCards")
|
|
75
65
|
end
|
|
76
66
|
end
|
|
77
67
|
|
|
@@ -81,7 +71,7 @@ module Basecamp
|
|
|
81
71
|
def get_everything_checkins(page: nil)
|
|
82
72
|
wrap_paginated(service: "everything", operation: "get_everything_checkins", is_mutation: false) do
|
|
83
73
|
params = compact_query_params(page: page)
|
|
84
|
-
paginate("/checkins.json", params: params)
|
|
74
|
+
paginate("/checkins.json", params: params, operation: "GetEverythingCheckins")
|
|
85
75
|
end
|
|
86
76
|
end
|
|
87
77
|
|
|
@@ -91,7 +81,7 @@ module Basecamp
|
|
|
91
81
|
def get_everything_comments(page: nil)
|
|
92
82
|
wrap_paginated(service: "everything", operation: "get_everything_comments", is_mutation: false) do
|
|
93
83
|
params = compact_query_params(page: page)
|
|
94
|
-
paginate("/comments.json", params: params)
|
|
84
|
+
paginate("/comments.json", params: params, operation: "GetEverythingComments")
|
|
95
85
|
end
|
|
96
86
|
end
|
|
97
87
|
|
|
@@ -103,7 +93,7 @@ module Basecamp
|
|
|
103
93
|
def get_everything_files(kind: nil, people_ids: nil, page: nil)
|
|
104
94
|
wrap_paginated(service: "everything", operation: "get_everything_files", is_mutation: false) do
|
|
105
95
|
params = compact_query_params(kind: kind, people_ids: people_ids, page: page)
|
|
106
|
-
paginate("/files.json", params: params)
|
|
96
|
+
paginate("/files.json", params: params, operation: "GetEverythingFiles")
|
|
107
97
|
end
|
|
108
98
|
end
|
|
109
99
|
|
|
@@ -113,7 +103,7 @@ module Basecamp
|
|
|
113
103
|
def get_everything_forwards(page: nil)
|
|
114
104
|
wrap_paginated(service: "everything", operation: "get_everything_forwards", is_mutation: false) do
|
|
115
105
|
params = compact_query_params(page: page)
|
|
116
|
-
paginate("/forwards.json", params: params)
|
|
106
|
+
paginate("/forwards.json", params: params, operation: "GetEverythingForwards")
|
|
117
107
|
end
|
|
118
108
|
end
|
|
119
109
|
|
|
@@ -123,7 +113,7 @@ module Basecamp
|
|
|
123
113
|
def get_everything_messages(page: nil)
|
|
124
114
|
wrap_paginated(service: "everything", operation: "get_everything_messages", is_mutation: false) do
|
|
125
115
|
params = compact_query_params(page: page)
|
|
126
|
-
paginate("/messages.json", params: params)
|
|
116
|
+
paginate("/messages.json", params: params, operation: "GetEverythingMessages")
|
|
127
117
|
end
|
|
128
118
|
end
|
|
129
119
|
|
|
@@ -133,7 +123,7 @@ module Basecamp
|
|
|
133
123
|
def get_everything_completed_todos(page: nil)
|
|
134
124
|
wrap_paginated(service: "everything", operation: "get_everything_completed_todos", is_mutation: false) do
|
|
135
125
|
params = compact_query_params(page: page)
|
|
136
|
-
paginate("/todos/completed.json", params: params)
|
|
126
|
+
paginate("/todos/completed.json", params: params, operation: "GetEverythingCompletedTodos")
|
|
137
127
|
end
|
|
138
128
|
end
|
|
139
129
|
|
|
@@ -143,7 +133,7 @@ module Basecamp
|
|
|
143
133
|
def get_everything_no_due_date_todos(page: nil)
|
|
144
134
|
wrap_paginated(service: "everything", operation: "get_everything_no_due_date_todos", is_mutation: false) do
|
|
145
135
|
params = compact_query_params(page: page)
|
|
146
|
-
paginate("/todos/no_due_date.json", params: params)
|
|
136
|
+
paginate("/todos/no_due_date.json", params: params, operation: "GetEverythingNoDueDateTodos")
|
|
147
137
|
end
|
|
148
138
|
end
|
|
149
139
|
|
|
@@ -153,7 +143,7 @@ module Basecamp
|
|
|
153
143
|
def get_everything_open_todos(page: nil)
|
|
154
144
|
wrap_paginated(service: "everything", operation: "get_everything_open_todos", is_mutation: false) do
|
|
155
145
|
params = compact_query_params(page: page)
|
|
156
|
-
paginate("/todos/open.json", params: params)
|
|
146
|
+
paginate("/todos/open.json", params: params, operation: "GetEverythingOpenTodos")
|
|
157
147
|
end
|
|
158
148
|
end
|
|
159
149
|
|
|
@@ -161,7 +151,7 @@ module Basecamp
|
|
|
161
151
|
# @return [Array<Hash>] response data
|
|
162
152
|
def get_everything_overdue_todos()
|
|
163
153
|
with_operation(service: "everything", operation: "get_everything_overdue_todos", is_mutation: false) do
|
|
164
|
-
http_get("/todos/overdue.json").json
|
|
154
|
+
http_get("/todos/overdue.json", operation: "GetEverythingOverdueTodos").json
|
|
165
155
|
end
|
|
166
156
|
end
|
|
167
157
|
|
|
@@ -171,7 +161,7 @@ module Basecamp
|
|
|
171
161
|
def get_everything_unassigned_todos(page: nil)
|
|
172
162
|
wrap_paginated(service: "everything", operation: "get_everything_unassigned_todos", is_mutation: false) do
|
|
173
163
|
params = compact_query_params(page: page)
|
|
174
|
-
paginate("/todos/unassigned.json", params: params)
|
|
164
|
+
paginate("/todos/unassigned.json", params: params, operation: "GetEverythingUnassignedTodos")
|
|
175
165
|
end
|
|
176
166
|
end
|
|
177
167
|
end
|
|
@@ -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}").json
|
|
15
|
+
http_get("/inbox_forwards/#{forward_id}", operation: "GetForward").json
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -21,7 +21,7 @@ module Basecamp
|
|
|
21
21
|
# @return [Enumerator<Hash>] paginated results
|
|
22
22
|
def list_replies(forward_id:)
|
|
23
23
|
wrap_paginated(service: "forwards", operation: "list_replies", is_mutation: false, resource_id: forward_id) do
|
|
24
|
-
paginate("/inbox_forwards/#{forward_id}/replies.json")
|
|
24
|
+
paginate("/inbox_forwards/#{forward_id}/replies.json", operation: "ListForwardReplies")
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
|
|
@@ -41,7 +41,7 @@ module Basecamp
|
|
|
41
41
|
# @return [Hash] response data
|
|
42
42
|
def get_reply(forward_id:, reply_id:)
|
|
43
43
|
with_operation(service: "forwards", operation: "get_reply", is_mutation: false, resource_id: reply_id) do
|
|
44
|
-
http_get("/inbox_forwards/#{forward_id}/replies/#{reply_id}").json
|
|
44
|
+
http_get("/inbox_forwards/#{forward_id}/replies/#{reply_id}", operation: "GetForwardReply").json
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
|
|
@@ -50,7 +50,7 @@ module Basecamp
|
|
|
50
50
|
# @return [Hash] response data
|
|
51
51
|
def get_inbox(inbox_id:)
|
|
52
52
|
with_operation(service: "forwards", operation: "get_inbox", is_mutation: false, resource_id: inbox_id) do
|
|
53
|
-
http_get("/inboxes/#{inbox_id}").json
|
|
53
|
+
http_get("/inboxes/#{inbox_id}", operation: "GetInbox").json
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
|
|
@@ -62,7 +62,7 @@ module Basecamp
|
|
|
62
62
|
def list(inbox_id:, sort: nil, direction: nil)
|
|
63
63
|
wrap_paginated(service: "forwards", operation: "list", is_mutation: false, resource_id: inbox_id) do
|
|
64
64
|
params = compact_query_params(sort: sort, direction: direction)
|
|
65
|
-
paginate("/inboxes/#{inbox_id}/forwards.json", params: params)
|
|
65
|
+
paginate("/inboxes/#{inbox_id}/forwards.json", params: params, operation: "ListForwards")
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
68
|
end
|
|
@@ -12,7 +12,7 @@ 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}").json
|
|
15
|
+
http_get("/gauge_needles/#{needle_id}", operation: "GetGaugeNeedle").json
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -52,7 +52,7 @@ module Basecamp
|
|
|
52
52
|
# @return [Enumerator<Hash>] paginated results
|
|
53
53
|
def list_gauge_needles(project_id:)
|
|
54
54
|
wrap_paginated(service: "gauges", operation: "list_gauge_needles", is_mutation: false, project_id: project_id) do
|
|
55
|
-
paginate("/projects/#{project_id}/gauge/needles.json")
|
|
55
|
+
paginate("/projects/#{project_id}/gauge/needles.json", operation: "ListGaugeNeedles")
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
58
|
|
|
@@ -75,7 +75,7 @@ module Basecamp
|
|
|
75
75
|
def list_gauges(bucket_ids: nil)
|
|
76
76
|
wrap_paginated(service: "gauges", operation: "list_gauges", is_mutation: false) do
|
|
77
77
|
params = compact_query_params(bucket_ids: bucket_ids)
|
|
78
|
-
paginate("/reports/gauges.json", params: params)
|
|
78
|
+
paginate("/reports/gauges.json", params: params, operation: "ListGauges")
|
|
79
79
|
end
|
|
80
80
|
end
|
|
81
81
|
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").json
|
|
15
|
+
http_get("/todosets/#{todoset_id}/hill.json", operation: "GetHillChart").json
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -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}").json
|
|
15
|
+
http_get("/message_boards/#{board_id}", operation: "GetMessageBoard").json
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
end
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Enumerator<Hash>] paginated results
|
|
13
13
|
def list(bucket_id:)
|
|
14
14
|
wrap_paginated(service: "messagetypes", operation: "list", is_mutation: false, project_id: bucket_id) do
|
|
15
|
-
paginate("/buckets/#{bucket_id}/categories.json")
|
|
15
|
+
paginate("/buckets/#{bucket_id}/categories.json", operation: "ListMessageTypes")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -33,7 +33,7 @@ module Basecamp
|
|
|
33
33
|
# @return [Hash] response data
|
|
34
34
|
def get(bucket_id:, type_id:)
|
|
35
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}").json
|
|
36
|
+
http_get("/buckets/#{bucket_id}/categories/#{type_id}", operation: "GetMessageType").json
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
@@ -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,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").json
|
|
14
|
+
http_get("/my/assignments.json", operation: "GetMyAssignments").json
|
|
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").json
|
|
22
|
+
http_get("/my/assignments/completed.json", operation: "GetMyCompletedAssignments").json
|
|
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)).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
|
|
@@ -16,7 +16,7 @@ module Basecamp
|
|
|
16
16
|
# @return [Hash] response data
|
|
17
17
|
def get_my_notifications(page: nil, limit_bubble_ups: nil)
|
|
18
18
|
with_operation(service: "mynotifications", operation: "get_my_notifications", is_mutation: false) do
|
|
19
|
-
http_get("/my/readings.json", params: compact_query_params(page: page, limit_bubble_ups: limit_bubble_ups)).json
|
|
19
|
+
http_get("/my/readings.json", params: compact_query_params(page: page, limit_bubble_ups: limit_bubble_ups), operation: "GetMyNotifications").json
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@ module Basecamp
|
|
|
26
26
|
def get_bubble_ups(page: nil)
|
|
27
27
|
wrap_paginated(service: "mynotifications", operation: "get_bubble_ups", is_mutation: false) do
|
|
28
28
|
params = compact_query_params(page: page)
|
|
29
|
-
paginate("/my/readings/bubble_ups.json", params: params)
|
|
29
|
+
paginate("/my/readings/bubble_ups.json", params: params, operation: "GetBubbleUps")
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
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
|
|
|
@@ -128,7 +128,7 @@ module Basecamp
|
|
|
128
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
|
|
|
@@ -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
|
|
|
@@ -46,7 +46,7 @@ module Basecamp
|
|
|
46
46
|
# @return [Hash] response data
|
|
47
47
|
def get_entry_occurrence(entry_id:, date:)
|
|
48
48
|
with_operation(service: "schedules", operation: "get_entry_occurrence", is_mutation: false, resource_id: entry_id) do
|
|
49
|
-
http_get("/schedule_entries/#{entry_id}/occurrences/#{date}").json
|
|
49
|
+
http_get("/schedule_entries/#{entry_id}/occurrences/#{date}", operation: "GetScheduleEntryOccurrence").json
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
52
|
|
|
@@ -55,7 +55,7 @@ module Basecamp
|
|
|
55
55
|
# @return [Hash] response data
|
|
56
56
|
def get(schedule_id:)
|
|
57
57
|
with_operation(service: "schedules", operation: "get", is_mutation: false, resource_id: schedule_id) do
|
|
58
|
-
http_get("/schedules/#{schedule_id}").json
|
|
58
|
+
http_get("/schedules/#{schedule_id}", operation: "GetSchedule").json
|
|
59
59
|
end
|
|
60
60
|
end
|
|
61
61
|
|
|
@@ -76,7 +76,7 @@ module Basecamp
|
|
|
76
76
|
def list_entries(schedule_id:, status: nil)
|
|
77
77
|
wrap_paginated(service: "schedules", operation: "list_entries", is_mutation: false, resource_id: schedule_id) do
|
|
78
78
|
params = compact_query_params(status: status)
|
|
79
|
-
paginate("/schedules/#{schedule_id}/entries.json", params: params)
|
|
79
|
+
paginate("/schedules/#{schedule_id}/entries.json", params: params, operation: "ListScheduleEntries")
|
|
80
80
|
end
|
|
81
81
|
end
|
|
82
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
|
|
|
@@ -53,7 +53,7 @@ module Basecamp
|
|
|
53
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
|
|