basecamp-sdk 0.10.0 → 0.12.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 +28 -8
- data/lib/basecamp/config.rb +4 -3
- data/lib/basecamp/generated/metadata.json +178 -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/bookmarks_service.rb +49 -0
- data/lib/basecamp/generated/services/boosts_service.rb +3 -3
- data/lib/basecamp/generated/services/calendars_service.rb +30 -0
- 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/drafts_service.rb +21 -0
- data/lib/basecamp/generated/services/events_service.rb +1 -1
- data/lib/basecamp/generated/services/everything_service.rb +69 -46
- 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 +34 -3
- data/lib/basecamp/generated/services/my_notes_service.rb +28 -0
- 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 +19 -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 +313 -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 +10 -7
- metadata +9 -2
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Basecamp
|
|
4
|
+
module Services
|
|
5
|
+
# Service for Drafts operations
|
|
6
|
+
#
|
|
7
|
+
# @generated from OpenAPI spec
|
|
8
|
+
class DraftsService < BaseService
|
|
9
|
+
|
|
10
|
+
# List the current user's drafts across their active projects, most recently
|
|
11
|
+
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
12
|
+
# @return [Enumerator<Hash>] paginated results
|
|
13
|
+
def list_my_drafts(page: nil)
|
|
14
|
+
wrap_paginated(service: "drafts", operation: "list_my_drafts", is_mutation: false) do
|
|
15
|
+
params = compact_query_params(page: page)
|
|
16
|
+
paginate("/my/drafts.json", params: params, operation: "ListMyDrafts")
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
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: "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
|
|
@@ -7,71 +7,79 @@ 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).
|
|
11
|
+
# @param assignee_ids [Array, nil] Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
12
|
+
# Assignees on nested steps are not considered.
|
|
13
|
+
# @param due [String, nil] Filter by due date: with, without, or overdue. Unrecognized values are ignored.
|
|
21
14
|
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
22
15
|
# @return [Enumerator<Hash>] paginated results
|
|
23
|
-
def get_everything_completed_cards(page: nil)
|
|
16
|
+
def get_everything_completed_cards(assignee_ids: nil, due: nil, page: nil)
|
|
24
17
|
wrap_paginated(service: "everything", operation: "get_everything_completed_cards", is_mutation: false) do
|
|
25
|
-
params = compact_query_params(page: page)
|
|
26
|
-
paginate("/cards/completed.json", params: params)
|
|
18
|
+
params = compact_query_params(assignee_ids: assignee_ids, due: due, page: page)
|
|
19
|
+
paginate("/cards/completed.json", params: params, operation: "GetEverythingCompletedCards")
|
|
27
20
|
end
|
|
28
21
|
end
|
|
29
22
|
|
|
30
23
|
# Open cards with no due date across all accessible projects, grouped by project (paginated).
|
|
24
|
+
# @param assignee_ids [Array, nil] Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
25
|
+
# Assignees on nested steps are not considered.
|
|
26
|
+
# @param due [String, nil] Filter by due date: with, without, or overdue. Unrecognized values are ignored.
|
|
31
27
|
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
32
28
|
# @return [Enumerator<Hash>] paginated results
|
|
33
|
-
def get_everything_no_due_date_cards(page: nil)
|
|
29
|
+
def get_everything_no_due_date_cards(assignee_ids: nil, due: nil, page: nil)
|
|
34
30
|
wrap_paginated(service: "everything", operation: "get_everything_no_due_date_cards", is_mutation: false) do
|
|
35
|
-
params = compact_query_params(page: page)
|
|
36
|
-
paginate("/cards/no_due_date.json", params: params)
|
|
31
|
+
params = compact_query_params(assignee_ids: assignee_ids, due: due, page: page)
|
|
32
|
+
paginate("/cards/no_due_date.json", params: params, operation: "GetEverythingNoDueDateCards")
|
|
37
33
|
end
|
|
38
34
|
end
|
|
39
35
|
|
|
40
36
|
# Cards parked in a project's "Not now" column across all accessible projects, grouped by project (paginated).
|
|
37
|
+
# @param assignee_ids [Array, nil] Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
38
|
+
# Assignees on nested steps are not considered.
|
|
39
|
+
# @param due [String, nil] Filter by due date: with, without, or overdue. Unrecognized values are ignored.
|
|
41
40
|
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
42
41
|
# @return [Enumerator<Hash>] paginated results
|
|
43
|
-
def get_everything_not_now_cards(page: nil)
|
|
42
|
+
def get_everything_not_now_cards(assignee_ids: nil, due: nil, page: nil)
|
|
44
43
|
wrap_paginated(service: "everything", operation: "get_everything_not_now_cards", is_mutation: false) do
|
|
45
|
-
params = compact_query_params(page: page)
|
|
46
|
-
paginate("/cards/not_now.json", params: params)
|
|
44
|
+
params = compact_query_params(assignee_ids: assignee_ids, due: due, page: page)
|
|
45
|
+
paginate("/cards/not_now.json", params: params, operation: "GetEverythingNotNowCards")
|
|
47
46
|
end
|
|
48
47
|
end
|
|
49
48
|
|
|
50
49
|
# Incomplete cards in active columns across all accessible projects, grouped by project (paginated).
|
|
50
|
+
# @param assignee_ids [Array, nil] Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
51
|
+
# Assignees on nested steps are not considered.
|
|
52
|
+
# @param due [String, nil] Filter by due date: with, without, or overdue. Unrecognized values are ignored.
|
|
51
53
|
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
52
54
|
# @return [Enumerator<Hash>] paginated results
|
|
53
|
-
def get_everything_open_cards(page: nil)
|
|
55
|
+
def get_everything_open_cards(assignee_ids: nil, due: nil, page: nil)
|
|
54
56
|
wrap_paginated(service: "everything", operation: "get_everything_open_cards", is_mutation: false) do
|
|
55
|
-
params = compact_query_params(page: page)
|
|
56
|
-
paginate("/cards/open.json", params: params)
|
|
57
|
+
params = compact_query_params(assignee_ids: assignee_ids, due: due, page: page)
|
|
58
|
+
paginate("/cards/open.json", params: params, operation: "GetEverythingOpenCards")
|
|
57
59
|
end
|
|
58
60
|
end
|
|
59
61
|
|
|
60
62
|
# Get every overdue card across all accessible projects, oldest-due-date-first.
|
|
63
|
+
# @param assignee_ids [Array, nil] Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
64
|
+
# Assignees on nested steps are not considered.
|
|
65
|
+
# @param due [String, nil] Filter by due date: with, without, or overdue. Unrecognized values are ignored.
|
|
61
66
|
# @return [Array<Hash>] response data
|
|
62
|
-
def get_everything_overdue_cards()
|
|
67
|
+
def get_everything_overdue_cards(assignee_ids: nil, due: nil)
|
|
63
68
|
with_operation(service: "everything", operation: "get_everything_overdue_cards", is_mutation: false) do
|
|
64
|
-
http_get("/cards/overdue.json").json
|
|
69
|
+
http_get("/cards/overdue.json", params: compact_query_params(assignee_ids: assignee_ids, due: due), operation: "GetEverythingOverdueCards").json
|
|
65
70
|
end
|
|
66
71
|
end
|
|
67
72
|
|
|
68
73
|
# Open, unassigned cards across all accessible projects, grouped by project (paginated).
|
|
74
|
+
# @param assignee_ids [Array, nil] Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
75
|
+
# Assignees on nested steps are not considered.
|
|
76
|
+
# @param due [String, nil] Filter by due date: with, without, or overdue. Unrecognized values are ignored.
|
|
69
77
|
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
70
78
|
# @return [Enumerator<Hash>] paginated results
|
|
71
|
-
def get_everything_unassigned_cards(page: nil)
|
|
79
|
+
def get_everything_unassigned_cards(assignee_ids: nil, due: nil, page: nil)
|
|
72
80
|
wrap_paginated(service: "everything", operation: "get_everything_unassigned_cards", is_mutation: false) do
|
|
73
|
-
params = compact_query_params(page: page)
|
|
74
|
-
paginate("/cards/unassigned.json", params: params)
|
|
81
|
+
params = compact_query_params(assignee_ids: assignee_ids, due: due, page: page)
|
|
82
|
+
paginate("/cards/unassigned.json", params: params, operation: "GetEverythingUnassignedCards")
|
|
75
83
|
end
|
|
76
84
|
end
|
|
77
85
|
|
|
@@ -81,7 +89,7 @@ module Basecamp
|
|
|
81
89
|
def get_everything_checkins(page: nil)
|
|
82
90
|
wrap_paginated(service: "everything", operation: "get_everything_checkins", is_mutation: false) do
|
|
83
91
|
params = compact_query_params(page: page)
|
|
84
|
-
paginate("/checkins.json", params: params)
|
|
92
|
+
paginate("/checkins.json", params: params, operation: "GetEverythingCheckins")
|
|
85
93
|
end
|
|
86
94
|
end
|
|
87
95
|
|
|
@@ -91,7 +99,7 @@ module Basecamp
|
|
|
91
99
|
def get_everything_comments(page: nil)
|
|
92
100
|
wrap_paginated(service: "everything", operation: "get_everything_comments", is_mutation: false) do
|
|
93
101
|
params = compact_query_params(page: page)
|
|
94
|
-
paginate("/comments.json", params: params)
|
|
102
|
+
paginate("/comments.json", params: params, operation: "GetEverythingComments")
|
|
95
103
|
end
|
|
96
104
|
end
|
|
97
105
|
|
|
@@ -103,7 +111,7 @@ module Basecamp
|
|
|
103
111
|
def get_everything_files(kind: nil, people_ids: nil, page: nil)
|
|
104
112
|
wrap_paginated(service: "everything", operation: "get_everything_files", is_mutation: false) do
|
|
105
113
|
params = compact_query_params(kind: kind, people_ids: people_ids, page: page)
|
|
106
|
-
paginate("/files.json", params: params)
|
|
114
|
+
paginate("/files.json", params: params, operation: "GetEverythingFiles")
|
|
107
115
|
end
|
|
108
116
|
end
|
|
109
117
|
|
|
@@ -113,7 +121,7 @@ module Basecamp
|
|
|
113
121
|
def get_everything_forwards(page: nil)
|
|
114
122
|
wrap_paginated(service: "everything", operation: "get_everything_forwards", is_mutation: false) do
|
|
115
123
|
params = compact_query_params(page: page)
|
|
116
|
-
paginate("/forwards.json", params: params)
|
|
124
|
+
paginate("/forwards.json", params: params, operation: "GetEverythingForwards")
|
|
117
125
|
end
|
|
118
126
|
end
|
|
119
127
|
|
|
@@ -123,55 +131,70 @@ module Basecamp
|
|
|
123
131
|
def get_everything_messages(page: nil)
|
|
124
132
|
wrap_paginated(service: "everything", operation: "get_everything_messages", is_mutation: false) do
|
|
125
133
|
params = compact_query_params(page: page)
|
|
126
|
-
paginate("/messages.json", params: params)
|
|
134
|
+
paginate("/messages.json", params: params, operation: "GetEverythingMessages")
|
|
127
135
|
end
|
|
128
136
|
end
|
|
129
137
|
|
|
130
138
|
# Completed to-dos across all accessible projects, grouped by project (paginated).
|
|
139
|
+
# @param assignee_ids [Array, nil] Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
140
|
+
# Assignees on nested steps are not considered.
|
|
141
|
+
# @param due [String, nil] Filter by due date: with, without, or overdue. Unrecognized values are ignored.
|
|
131
142
|
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
132
143
|
# @return [Enumerator<Hash>] paginated results
|
|
133
|
-
def get_everything_completed_todos(page: nil)
|
|
144
|
+
def get_everything_completed_todos(assignee_ids: nil, due: nil, page: nil)
|
|
134
145
|
wrap_paginated(service: "everything", operation: "get_everything_completed_todos", is_mutation: false) do
|
|
135
|
-
params = compact_query_params(page: page)
|
|
136
|
-
paginate("/todos/completed.json", params: params)
|
|
146
|
+
params = compact_query_params(assignee_ids: assignee_ids, due: due, page: page)
|
|
147
|
+
paginate("/todos/completed.json", params: params, operation: "GetEverythingCompletedTodos")
|
|
137
148
|
end
|
|
138
149
|
end
|
|
139
150
|
|
|
140
151
|
# Open to-dos with no due date across all accessible projects, grouped by project (paginated).
|
|
152
|
+
# @param assignee_ids [Array, nil] Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
153
|
+
# Assignees on nested steps are not considered.
|
|
154
|
+
# @param due [String, nil] Filter by due date: with, without, or overdue. Unrecognized values are ignored.
|
|
141
155
|
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
142
156
|
# @return [Enumerator<Hash>] paginated results
|
|
143
|
-
def get_everything_no_due_date_todos(page: nil)
|
|
157
|
+
def get_everything_no_due_date_todos(assignee_ids: nil, due: nil, page: nil)
|
|
144
158
|
wrap_paginated(service: "everything", operation: "get_everything_no_due_date_todos", is_mutation: false) do
|
|
145
|
-
params = compact_query_params(page: page)
|
|
146
|
-
paginate("/todos/no_due_date.json", params: params)
|
|
159
|
+
params = compact_query_params(assignee_ids: assignee_ids, due: due, page: page)
|
|
160
|
+
paginate("/todos/no_due_date.json", params: params, operation: "GetEverythingNoDueDateTodos")
|
|
147
161
|
end
|
|
148
162
|
end
|
|
149
163
|
|
|
150
164
|
# Active, incomplete to-dos across all accessible projects, grouped by project (paginated).
|
|
165
|
+
# @param assignee_ids [Array, nil] Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
166
|
+
# Assignees on nested steps are not considered.
|
|
167
|
+
# @param due [String, nil] Filter by due date: with, without, or overdue. Unrecognized values are ignored.
|
|
151
168
|
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
152
169
|
# @return [Enumerator<Hash>] paginated results
|
|
153
|
-
def get_everything_open_todos(page: nil)
|
|
170
|
+
def get_everything_open_todos(assignee_ids: nil, due: nil, page: nil)
|
|
154
171
|
wrap_paginated(service: "everything", operation: "get_everything_open_todos", is_mutation: false) do
|
|
155
|
-
params = compact_query_params(page: page)
|
|
156
|
-
paginate("/todos/open.json", params: params)
|
|
172
|
+
params = compact_query_params(assignee_ids: assignee_ids, due: due, page: page)
|
|
173
|
+
paginate("/todos/open.json", params: params, operation: "GetEverythingOpenTodos")
|
|
157
174
|
end
|
|
158
175
|
end
|
|
159
176
|
|
|
160
177
|
# Get every overdue to-do across all accessible projects, oldest-due-date-first.
|
|
178
|
+
# @param assignee_ids [Array, nil] Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
179
|
+
# Assignees on nested steps are not considered.
|
|
180
|
+
# @param due [String, nil] Filter by due date: with, without, or overdue. Unrecognized values are ignored.
|
|
161
181
|
# @return [Array<Hash>] response data
|
|
162
|
-
def get_everything_overdue_todos()
|
|
182
|
+
def get_everything_overdue_todos(assignee_ids: nil, due: nil)
|
|
163
183
|
with_operation(service: "everything", operation: "get_everything_overdue_todos", is_mutation: false) do
|
|
164
|
-
http_get("/todos/overdue.json").json
|
|
184
|
+
http_get("/todos/overdue.json", params: compact_query_params(assignee_ids: assignee_ids, due: due), operation: "GetEverythingOverdueTodos").json
|
|
165
185
|
end
|
|
166
186
|
end
|
|
167
187
|
|
|
168
188
|
# Open, unassigned to-dos across all accessible projects, grouped by project (paginated).
|
|
189
|
+
# @param assignee_ids [Array, nil] Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
190
|
+
# Assignees on nested steps are not considered.
|
|
191
|
+
# @param due [String, nil] Filter by due date: with, without, or overdue. Unrecognized values are ignored.
|
|
169
192
|
# @param page [Integer, nil] Page number for paginating through results. Defaults to 1.
|
|
170
193
|
# @return [Enumerator<Hash>] paginated results
|
|
171
|
-
def get_everything_unassigned_todos(page: nil)
|
|
194
|
+
def get_everything_unassigned_todos(assignee_ids: nil, due: nil, page: nil)
|
|
172
195
|
wrap_paginated(service: "everything", operation: "get_everything_unassigned_todos", is_mutation: false) do
|
|
173
|
-
params = compact_query_params(page: page)
|
|
174
|
-
paginate("/todos/unassigned.json", params: params)
|
|
196
|
+
params = compact_query_params(assignee_ids: assignee_ids, due: due, page: page)
|
|
197
|
+
paginate("/todos/unassigned.json", params: params, operation: "GetEverythingUnassignedTodos")
|
|
175
198
|
end
|
|
176
199
|
end
|
|
177
200
|
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
|