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
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get_boost(boost_id:)
|
|
14
14
|
with_operation(service: "boosts", operation: "get_boost", is_mutation: false, resource_id: boost_id) do
|
|
15
|
-
http_get("/boosts/#{boost_id}").json
|
|
15
|
+
http_get("/boosts/#{boost_id}", operation: "GetBoost").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_recording_boosts(recording_id:)
|
|
33
33
|
wrap_paginated(service: "boosts", operation: "list_recording_boosts", is_mutation: false, resource_id: recording_id) do
|
|
34
|
-
paginate("/recordings/#{recording_id}/boosts.json")
|
|
34
|
+
paginate("/recordings/#{recording_id}/boosts.json", operation: "ListRecordingBoosts")
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
@@ -51,7 +51,7 @@ module Basecamp
|
|
|
51
51
|
# @return [Enumerator<Hash>] paginated results
|
|
52
52
|
def list_event_boosts(recording_id:, event_id:)
|
|
53
53
|
wrap_paginated(service: "boosts", operation: "list_event_boosts", is_mutation: false, resource_id: event_id) do
|
|
54
|
-
paginate("/recordings/#{recording_id}/events/#{event_id}/boosts.json")
|
|
54
|
+
paginate("/recordings/#{recording_id}/events/#{event_id}/boosts.json", operation: "ListEventBoosts")
|
|
55
55
|
end
|
|
56
56
|
end
|
|
57
57
|
|
|
@@ -13,7 +13,7 @@ module Basecamp
|
|
|
13
13
|
# @return [Enumerator<Hash>] paginated results
|
|
14
14
|
def list()
|
|
15
15
|
wrap_paginated(service: "campfires", operation: "list", is_mutation: false) do
|
|
16
|
-
paginate("/chats.json")
|
|
16
|
+
paginate("/chats.json", operation: "ListCampfires")
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
@@ -22,7 +22,7 @@ module Basecamp
|
|
|
22
22
|
# @return [Hash] response data
|
|
23
23
|
def get(campfire_id:)
|
|
24
24
|
with_operation(service: "campfires", operation: "get", is_mutation: false, resource_id: campfire_id) do
|
|
25
|
-
http_get("/chats/#{campfire_id}").json
|
|
25
|
+
http_get("/chats/#{campfire_id}", operation: "GetCampfire").json
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
|
|
@@ -31,7 +31,7 @@ module Basecamp
|
|
|
31
31
|
# @return [Enumerator<Hash>] paginated results
|
|
32
32
|
def list_chatbots(campfire_id:)
|
|
33
33
|
wrap_paginated(service: "campfires", operation: "list_chatbots", is_mutation: false, resource_id: campfire_id) do
|
|
34
|
-
paginate("/chats/#{campfire_id}/integrations.json")
|
|
34
|
+
paginate("/chats/#{campfire_id}/integrations.json", operation: "ListChatbots")
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
@@ -52,7 +52,7 @@ module Basecamp
|
|
|
52
52
|
# @return [Hash] response data
|
|
53
53
|
def get_chatbot(campfire_id:, chatbot_id:)
|
|
54
54
|
with_operation(service: "campfires", operation: "get_chatbot", is_mutation: false, resource_id: chatbot_id) do
|
|
55
|
-
http_get("/chats/#{campfire_id}/integrations/#{chatbot_id}").json
|
|
55
|
+
http_get("/chats/#{campfire_id}/integrations/#{chatbot_id}", operation: "GetChatbot").json
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
58
|
|
|
@@ -87,7 +87,7 @@ module Basecamp
|
|
|
87
87
|
def list_lines(campfire_id:, sort: nil, direction: nil)
|
|
88
88
|
wrap_paginated(service: "campfires", operation: "list_lines", is_mutation: false, resource_id: campfire_id) do
|
|
89
89
|
params = compact_query_params(sort: sort, direction: direction)
|
|
90
|
-
paginate("/chats/#{campfire_id}/lines.json", params: params)
|
|
90
|
+
paginate("/chats/#{campfire_id}/lines.json", params: params, operation: "ListCampfireLines")
|
|
91
91
|
end
|
|
92
92
|
end
|
|
93
93
|
|
|
@@ -108,7 +108,7 @@ module Basecamp
|
|
|
108
108
|
# @return [Hash] response data
|
|
109
109
|
def get_line(campfire_id:, line_id:)
|
|
110
110
|
with_operation(service: "campfires", operation: "get_line", is_mutation: false, resource_id: line_id) do
|
|
111
|
-
http_get("/chats/#{campfire_id}/lines/#{line_id}").json
|
|
111
|
+
http_get("/chats/#{campfire_id}/lines/#{line_id}", operation: "GetCampfireLine").json
|
|
112
112
|
end
|
|
113
113
|
end
|
|
114
114
|
|
|
@@ -143,7 +143,7 @@ module Basecamp
|
|
|
143
143
|
def list_uploads(campfire_id:, sort: nil, direction: nil)
|
|
144
144
|
wrap_paginated(service: "campfires", operation: "list_uploads", is_mutation: false, resource_id: campfire_id) do
|
|
145
145
|
params = compact_query_params(sort: sort, direction: direction)
|
|
146
|
-
paginate("/chats/#{campfire_id}/uploads.json", params: params)
|
|
146
|
+
paginate("/chats/#{campfire_id}/uploads.json", params: params, operation: "ListCampfireUploads")
|
|
147
147
|
end
|
|
148
148
|
end
|
|
149
149
|
|
|
@@ -43,7 +43,7 @@ module Basecamp
|
|
|
43
43
|
# @return [Hash] response data
|
|
44
44
|
def get(column_id:)
|
|
45
45
|
with_operation(service: "cardcolumns", operation: "get", is_mutation: false, resource_id: column_id) do
|
|
46
|
-
http_get("/card_tables/columns/#{column_id}").json
|
|
46
|
+
http_get("/card_tables/columns/#{column_id}", operation: "GetCardColumn").json
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -36,7 +36,7 @@ module Basecamp
|
|
|
36
36
|
# @return [Hash] response data
|
|
37
37
|
def get(step_id:)
|
|
38
38
|
with_operation(service: "cardsteps", operation: "get", is_mutation: false, resource_id: step_id) do
|
|
39
|
-
http_get("/card_tables/steps/#{step_id}").json
|
|
39
|
+
http_get("/card_tables/steps/#{step_id}", operation: "GetCardStep").json
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(card_table_id:)
|
|
14
14
|
with_operation(service: "cardtables", operation: "get", is_mutation: false, resource_id: card_table_id) do
|
|
15
|
-
http_get("/card_tables/#{card_table_id}").json
|
|
15
|
+
http_get("/card_tables/#{card_table_id}", operation: "GetCardTable").json
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
end
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(card_id:)
|
|
14
14
|
with_operation(service: "cards", operation: "get", is_mutation: false, resource_id: card_id) do
|
|
15
|
-
http_get("/card_tables/cards/#{card_id}").json
|
|
15
|
+
http_get("/card_tables/cards/#{card_id}", operation: "GetCard").json
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -23,8 +23,8 @@ module Basecamp
|
|
|
23
23
|
# @param due_on [String, nil] due on (YYYY-MM-DD)
|
|
24
24
|
# @param assignee_ids [Array, nil] assignee ids
|
|
25
25
|
# @return [Hash] response data
|
|
26
|
-
def
|
|
27
|
-
with_operation(service: "cards", operation: "
|
|
26
|
+
def update_verbatim(card_id:, title: nil, content: nil, due_on: nil, assignee_ids: nil)
|
|
27
|
+
with_operation(service: "cards", operation: "update_verbatim", is_mutation: true, resource_id: card_id) do
|
|
28
28
|
http_put("/card_tables/cards/#{card_id}", body: compact_params(title: title, content: content, due_on: due_on, assignee_ids: assignee_ids)).json
|
|
29
29
|
end
|
|
30
30
|
end
|
|
@@ -46,7 +46,7 @@ module Basecamp
|
|
|
46
46
|
# @return [Enumerator<Hash>] paginated results
|
|
47
47
|
def list(column_id:)
|
|
48
48
|
wrap_paginated(service: "cards", operation: "list", is_mutation: false, resource_id: column_id) do
|
|
49
|
-
paginate("/card_tables/lists/#{column_id}/cards.json")
|
|
49
|
+
paginate("/card_tables/lists/#{column_id}/cards.json", operation: "ListCards")
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
52
|
|
|
@@ -11,7 +11,7 @@ module Basecamp
|
|
|
11
11
|
# @return [Enumerator<Hash>] paginated results
|
|
12
12
|
def reminders()
|
|
13
13
|
wrap_paginated(service: "checkins", operation: "reminders", is_mutation: false) do
|
|
14
|
-
paginate("/my/question_reminders.json")
|
|
14
|
+
paginate("/my/question_reminders.json", operation: "GetQuestionReminders")
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -20,7 +20,7 @@ module Basecamp
|
|
|
20
20
|
# @return [Hash] response data
|
|
21
21
|
def get_answer(answer_id:)
|
|
22
22
|
with_operation(service: "checkins", operation: "get_answer", is_mutation: false, resource_id: answer_id) do
|
|
23
|
-
http_get("/question_answers/#{answer_id}").json
|
|
23
|
+
http_get("/question_answers/#{answer_id}", operation: "GetAnswer").json
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
|
|
@@ -41,7 +41,7 @@ module Basecamp
|
|
|
41
41
|
# @return [Hash] response data
|
|
42
42
|
def get_questionnaire(questionnaire_id:)
|
|
43
43
|
with_operation(service: "checkins", operation: "get_questionnaire", is_mutation: false, resource_id: questionnaire_id) do
|
|
44
|
-
http_get("/questionnaires/#{questionnaire_id}").json
|
|
44
|
+
http_get("/questionnaires/#{questionnaire_id}", operation: "GetQuestionnaire").json
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
|
|
@@ -50,7 +50,7 @@ module Basecamp
|
|
|
50
50
|
# @return [Enumerator<Hash>] paginated results
|
|
51
51
|
def list_questions(questionnaire_id:)
|
|
52
52
|
wrap_paginated(service: "checkins", operation: "list_questions", is_mutation: false, resource_id: questionnaire_id) do
|
|
53
|
-
paginate("/questionnaires/#{questionnaire_id}/questions.json")
|
|
53
|
+
paginate("/questionnaires/#{questionnaire_id}/questions.json", operation: "ListQuestions")
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
|
|
@@ -71,7 +71,7 @@ module Basecamp
|
|
|
71
71
|
# @return [Hash] response data
|
|
72
72
|
def get_question(question_id:)
|
|
73
73
|
with_operation(service: "checkins", operation: "get_question", is_mutation: false, resource_id: question_id) do
|
|
74
|
-
http_get("/questions/#{question_id}").json
|
|
74
|
+
http_get("/questions/#{question_id}", operation: "GetQuestion").json
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
77
|
|
|
@@ -92,7 +92,7 @@ module Basecamp
|
|
|
92
92
|
# @return [Enumerator<Hash>] paginated results
|
|
93
93
|
def list_answers(question_id:)
|
|
94
94
|
wrap_paginated(service: "checkins", operation: "list_answers", is_mutation: false, resource_id: question_id) do
|
|
95
|
-
paginate("/questions/#{question_id}/answers.json")
|
|
95
|
+
paginate("/questions/#{question_id}/answers.json", operation: "ListAnswers")
|
|
96
96
|
end
|
|
97
97
|
end
|
|
98
98
|
|
|
@@ -112,7 +112,7 @@ module Basecamp
|
|
|
112
112
|
# @return [Enumerator<Hash>] paginated results
|
|
113
113
|
def answerers(question_id:)
|
|
114
114
|
wrap_paginated(service: "checkins", operation: "answerers", is_mutation: false, resource_id: question_id) do
|
|
115
|
-
paginate("/questions/#{question_id}/answers/by.json")
|
|
115
|
+
paginate("/questions/#{question_id}/answers/by.json", operation: "ListQuestionAnswerers")
|
|
116
116
|
end
|
|
117
117
|
end
|
|
118
118
|
|
|
@@ -122,7 +122,7 @@ module Basecamp
|
|
|
122
122
|
# @return [Enumerator<Hash>] paginated results
|
|
123
123
|
def by_person(question_id:, person_id:)
|
|
124
124
|
wrap_paginated(service: "checkins", operation: "by_person", is_mutation: false, resource_id: person_id) do
|
|
125
|
-
paginate("/questions/#{question_id}/answers/by/#{person_id}")
|
|
125
|
+
paginate("/questions/#{question_id}/answers/by/#{person_id}", operation: "GetAnswersByPerson")
|
|
126
126
|
end
|
|
127
127
|
end
|
|
128
128
|
|
|
@@ -14,7 +14,7 @@ module Basecamp
|
|
|
14
14
|
def list(sort: nil, direction: nil)
|
|
15
15
|
wrap_paginated(service: "clientapprovals", operation: "list", is_mutation: false) do
|
|
16
16
|
params = compact_query_params(sort: sort, direction: direction)
|
|
17
|
-
paginate("/client/approvals.json", params: params)
|
|
17
|
+
paginate("/client/approvals.json", params: params, operation: "ListClientApprovals")
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@ module Basecamp
|
|
|
23
23
|
# @return [Hash] response data
|
|
24
24
|
def get(approval_id:)
|
|
25
25
|
with_operation(service: "clientapprovals", operation: "get", is_mutation: false, resource_id: approval_id) do
|
|
26
|
-
http_get("/client/approvals/#{approval_id}").json
|
|
26
|
+
http_get("/client/approvals/#{approval_id}", operation: "GetClientApproval").json
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
end
|
|
@@ -14,7 +14,7 @@ module Basecamp
|
|
|
14
14
|
def list(sort: nil, direction: nil)
|
|
15
15
|
wrap_paginated(service: "clientcorrespondences", operation: "list", is_mutation: false) do
|
|
16
16
|
params = compact_query_params(sort: sort, direction: direction)
|
|
17
|
-
paginate("/client/correspondences.json", params: params)
|
|
17
|
+
paginate("/client/correspondences.json", params: params, operation: "ListClientCorrespondences")
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@ module Basecamp
|
|
|
23
23
|
# @return [Hash] response data
|
|
24
24
|
def get(correspondence_id:)
|
|
25
25
|
with_operation(service: "clientcorrespondences", operation: "get", is_mutation: false, resource_id: correspondence_id) do
|
|
26
|
-
http_get("/client/correspondences/#{correspondence_id}").json
|
|
26
|
+
http_get("/client/correspondences/#{correspondence_id}", operation: "GetClientCorrespondence").json
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
end
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Enumerator<Hash>] paginated results
|
|
13
13
|
def list(recording_id:)
|
|
14
14
|
wrap_paginated(service: "clientreplies", operation: "list", is_mutation: false, resource_id: recording_id) do
|
|
15
|
-
paginate("/client/recordings/#{recording_id}/replies.json")
|
|
15
|
+
paginate("/client/recordings/#{recording_id}/replies.json", operation: "ListClientReplies")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ module Basecamp
|
|
|
22
22
|
# @return [Hash] response data
|
|
23
23
|
def get(recording_id:, reply_id:)
|
|
24
24
|
with_operation(service: "clientreplies", operation: "get", is_mutation: false, resource_id: reply_id) do
|
|
25
|
-
http_get("/client/recordings/#{recording_id}/replies/#{reply_id}").json
|
|
25
|
+
http_get("/client/recordings/#{recording_id}/replies/#{reply_id}", operation: "GetClientReply").json
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
end
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(comment_id:)
|
|
14
14
|
with_operation(service: "comments", operation: "get", is_mutation: false, resource_id: comment_id) do
|
|
15
|
-
http_get("/comments/#{comment_id}").json
|
|
15
|
+
http_get("/comments/#{comment_id}", operation: "GetComment").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(recording_id:)
|
|
33
33
|
wrap_paginated(service: "comments", operation: "list", is_mutation: false, resource_id: recording_id) do
|
|
34
|
-
paginate("/recordings/#{recording_id}/comments.json")
|
|
34
|
+
paginate("/recordings/#{recording_id}/comments.json", operation: "ListComments")
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Hash] response data
|
|
13
13
|
def get(document_id:)
|
|
14
14
|
with_operation(service: "documents", operation: "get", is_mutation: false, resource_id: document_id) do
|
|
15
|
-
http_get("/documents/#{document_id}").json
|
|
15
|
+
http_get("/documents/#{document_id}", operation: "GetDocument").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(vault_id:)
|
|
34
34
|
wrap_paginated(service: "documents", operation: "list", is_mutation: false, resource_id: vault_id) do
|
|
35
|
-
paginate("/vaults/#{vault_id}/documents.json")
|
|
35
|
+
paginate("/vaults/#{vault_id}/documents.json", operation: "ListDocuments")
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -12,7 +12,7 @@ module Basecamp
|
|
|
12
12
|
# @return [Enumerator<Hash>] paginated results
|
|
13
13
|
def list(recording_id:)
|
|
14
14
|
wrap_paginated(service: "events", operation: "list", is_mutation: false, resource_id: recording_id) do
|
|
15
|
-
paginate("/recordings/#{recording_id}/events.json")
|
|
15
|
+
paginate("/recordings/#{recording_id}/events.json", operation: "ListEvents")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
end
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Basecamp
|
|
4
|
+
module Services
|
|
5
|
+
# Service for Everything operations
|
|
6
|
+
#
|
|
7
|
+
# @generated from OpenAPI spec
|
|
8
|
+
class EverythingService < BaseService
|
|
9
|
+
|
|
10
|
+
# Completed cards across all accessible projects, grouped by project (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_completed_cards(page: nil)
|
|
14
|
+
wrap_paginated(service: "everything", operation: "get_everything_completed_cards", is_mutation: false) do
|
|
15
|
+
params = compact_query_params(page: page)
|
|
16
|
+
paginate("/cards/completed.json", params: params, operation: "GetEverythingCompletedCards")
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Open cards with no due date across all accessible projects, grouped by project (paginated).
|
|
21
|
+
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
22
|
+
# @return [Enumerator<Hash>] paginated results
|
|
23
|
+
def get_everything_no_due_date_cards(page: nil)
|
|
24
|
+
wrap_paginated(service: "everything", operation: "get_everything_no_due_date_cards", is_mutation: false) do
|
|
25
|
+
params = compact_query_params(page: page)
|
|
26
|
+
paginate("/cards/no_due_date.json", params: params, operation: "GetEverythingNoDueDateCards")
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Cards parked in a project's "Not now" column across all accessible projects, grouped by project (paginated).
|
|
31
|
+
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
32
|
+
# @return [Enumerator<Hash>] paginated results
|
|
33
|
+
def get_everything_not_now_cards(page: nil)
|
|
34
|
+
wrap_paginated(service: "everything", operation: "get_everything_not_now_cards", is_mutation: false) do
|
|
35
|
+
params = compact_query_params(page: page)
|
|
36
|
+
paginate("/cards/not_now.json", params: params, operation: "GetEverythingNotNowCards")
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Incomplete cards in active columns across all accessible projects, grouped by project (paginated).
|
|
41
|
+
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
42
|
+
# @return [Enumerator<Hash>] paginated results
|
|
43
|
+
def get_everything_open_cards(page: nil)
|
|
44
|
+
wrap_paginated(service: "everything", operation: "get_everything_open_cards", is_mutation: false) do
|
|
45
|
+
params = compact_query_params(page: page)
|
|
46
|
+
paginate("/cards/open.json", params: params, operation: "GetEverythingOpenCards")
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Get every overdue card across all accessible projects, oldest-due-date-first.
|
|
51
|
+
# @return [Array<Hash>] response data
|
|
52
|
+
def get_everything_overdue_cards()
|
|
53
|
+
with_operation(service: "everything", operation: "get_everything_overdue_cards", is_mutation: false) do
|
|
54
|
+
http_get("/cards/overdue.json", operation: "GetEverythingOverdueCards").json
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Open, unassigned cards across all accessible projects, grouped by project (paginated).
|
|
59
|
+
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
60
|
+
# @return [Enumerator<Hash>] paginated results
|
|
61
|
+
def get_everything_unassigned_cards(page: nil)
|
|
62
|
+
wrap_paginated(service: "everything", operation: "get_everything_unassigned_cards", is_mutation: false) do
|
|
63
|
+
params = compact_query_params(page: page)
|
|
64
|
+
paginate("/cards/unassigned.json", params: params, operation: "GetEverythingUnassignedCards")
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Get every automatic check-in answer across all accessible projects, newest-first.
|
|
69
|
+
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
70
|
+
# @return [Enumerator<Hash>] paginated results
|
|
71
|
+
def get_everything_checkins(page: nil)
|
|
72
|
+
wrap_paginated(service: "everything", operation: "get_everything_checkins", is_mutation: false) do
|
|
73
|
+
params = compact_query_params(page: page)
|
|
74
|
+
paginate("/checkins.json", params: params, operation: "GetEverythingCheckins")
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Get every comment across all accessible projects, newest-first (paginated).
|
|
79
|
+
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
80
|
+
# @return [Enumerator<Hash>] paginated results
|
|
81
|
+
def get_everything_comments(page: nil)
|
|
82
|
+
wrap_paginated(service: "everything", operation: "get_everything_comments", is_mutation: false) do
|
|
83
|
+
params = compact_query_params(page: page)
|
|
84
|
+
paginate("/comments.json", params: params, operation: "GetEverythingComments")
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Get every file recording across all accessible projects, newest-first (paginated).
|
|
89
|
+
# @param kind [String, nil] Filter by file kind: all (default), images, pdfs, documents, or videos.
|
|
90
|
+
# @param people_ids [Array, nil] Restrict to files created by the given people (repeatable).
|
|
91
|
+
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
92
|
+
# @return [Enumerator<Hash>] paginated results
|
|
93
|
+
def get_everything_files(kind: nil, people_ids: nil, page: nil)
|
|
94
|
+
wrap_paginated(service: "everything", operation: "get_everything_files", is_mutation: false) do
|
|
95
|
+
params = compact_query_params(kind: kind, people_ids: people_ids, page: page)
|
|
96
|
+
paginate("/files.json", params: params, operation: "GetEverythingFiles")
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Get every inbox forward across all accessible projects, newest-first (paginated).
|
|
101
|
+
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
102
|
+
# @return [Enumerator<Hash>] paginated results
|
|
103
|
+
def get_everything_forwards(page: nil)
|
|
104
|
+
wrap_paginated(service: "everything", operation: "get_everything_forwards", is_mutation: false) do
|
|
105
|
+
params = compact_query_params(page: page)
|
|
106
|
+
paginate("/forwards.json", params: params, operation: "GetEverythingForwards")
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Get every message across all accessible projects, newest-first (paginated).
|
|
111
|
+
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
112
|
+
# @return [Enumerator<Hash>] paginated results
|
|
113
|
+
def get_everything_messages(page: nil)
|
|
114
|
+
wrap_paginated(service: "everything", operation: "get_everything_messages", is_mutation: false) do
|
|
115
|
+
params = compact_query_params(page: page)
|
|
116
|
+
paginate("/messages.json", params: params, operation: "GetEverythingMessages")
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Completed to-dos across all accessible projects, grouped by project (paginated).
|
|
121
|
+
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
122
|
+
# @return [Enumerator<Hash>] paginated results
|
|
123
|
+
def get_everything_completed_todos(page: nil)
|
|
124
|
+
wrap_paginated(service: "everything", operation: "get_everything_completed_todos", is_mutation: false) do
|
|
125
|
+
params = compact_query_params(page: page)
|
|
126
|
+
paginate("/todos/completed.json", params: params, operation: "GetEverythingCompletedTodos")
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Open to-dos with no due date across all accessible projects, grouped by project (paginated).
|
|
131
|
+
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
132
|
+
# @return [Enumerator<Hash>] paginated results
|
|
133
|
+
def get_everything_no_due_date_todos(page: nil)
|
|
134
|
+
wrap_paginated(service: "everything", operation: "get_everything_no_due_date_todos", is_mutation: false) do
|
|
135
|
+
params = compact_query_params(page: page)
|
|
136
|
+
paginate("/todos/no_due_date.json", params: params, operation: "GetEverythingNoDueDateTodos")
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Active, incomplete to-dos across all accessible projects, grouped by project (paginated).
|
|
141
|
+
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
142
|
+
# @return [Enumerator<Hash>] paginated results
|
|
143
|
+
def get_everything_open_todos(page: nil)
|
|
144
|
+
wrap_paginated(service: "everything", operation: "get_everything_open_todos", is_mutation: false) do
|
|
145
|
+
params = compact_query_params(page: page)
|
|
146
|
+
paginate("/todos/open.json", params: params, operation: "GetEverythingOpenTodos")
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Get every overdue to-do across all accessible projects, oldest-due-date-first.
|
|
151
|
+
# @return [Array<Hash>] response data
|
|
152
|
+
def get_everything_overdue_todos()
|
|
153
|
+
with_operation(service: "everything", operation: "get_everything_overdue_todos", is_mutation: false) do
|
|
154
|
+
http_get("/todos/overdue.json", operation: "GetEverythingOverdueTodos").json
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Open, unassigned to-dos across all accessible projects, grouped by project (paginated).
|
|
159
|
+
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
160
|
+
# @return [Enumerator<Hash>] paginated results
|
|
161
|
+
def get_everything_unassigned_todos(page: nil)
|
|
162
|
+
wrap_paginated(service: "everything", operation: "get_everything_unassigned_todos", is_mutation: false) do
|
|
163
|
+
params = compact_query_params(page: page)
|
|
164
|
+
paginate("/todos/unassigned.json", params: params, operation: "GetEverythingUnassignedTodos")
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
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
|