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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b2b13ea2c32e1d4bf22a04af06e8c94d039e7698643a7aa7d9e0813f1526db2d
|
|
4
|
+
data.tar.gz: 942a8f09b4950764aa132ebd52a195d9d0eebb27b93656fb542e7e52b20ae1af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '081775bc028c20205c904d026ab9f79bf077e7cde1d1bf5dd074b0e641fedf2ac47ebe3ca3cd6860f5bed05ad92d672abcaaf0332ec0f9aa94327ebc4cfcb130'
|
|
7
|
+
data.tar.gz: ffee6cf6e25a9ad523628b5d5f9da23f15460c3b01cd03dd8ab5df472942826e05d1a40afc09fc6cec9acaf9a3b2329c468f94b69a3ee4f95e2a784d94eb2775
|
data/README.md
CHANGED
|
@@ -42,7 +42,6 @@ project = account.projects.get(project_id: 12345)
|
|
|
42
42
|
|
|
43
43
|
# Create a todo
|
|
44
44
|
todo = account.todos.create(
|
|
45
|
-
project_id: 12345,
|
|
46
45
|
todolist_id: 67890,
|
|
47
46
|
content: "Review PR",
|
|
48
47
|
due_on: "2024-12-31"
|
|
@@ -57,7 +56,7 @@ todo = account.todos.create(
|
|
|
57
56
|
config = Basecamp::Config.new(
|
|
58
57
|
base_url: "https://3.basecampapi.com", # Default
|
|
59
58
|
timeout: 30, # Request timeout in seconds
|
|
60
|
-
max_retries: 3, #
|
|
59
|
+
max_retries: 3, # Total request attempts for GET requests (including the initial request)
|
|
61
60
|
base_delay: 1.0, # Base delay for exponential backoff
|
|
62
61
|
max_pages: 10_000 # Max pages for pagination
|
|
63
62
|
)
|
|
@@ -72,7 +71,7 @@ client = Basecamp::Client.new(config: config, token_provider: token_provider)
|
|
|
72
71
|
|--------|---------|-------------|
|
|
73
72
|
| `base_url` | `https://3.basecampapi.com` | Basecamp API base URL |
|
|
74
73
|
| `timeout` | `30` | HTTP request timeout (seconds) |
|
|
75
|
-
| `max_retries` | `3` |
|
|
74
|
+
| `max_retries` | `3` | Total request attempts for GET requests (including the initial request) |
|
|
76
75
|
| `base_delay` | `1.0` | Base delay for exponential backoff (seconds) |
|
|
77
76
|
| `max_jitter` | `0.1` | Maximum random jitter added to delays |
|
|
78
77
|
| `max_pages` | `10_000` | Maximum pages to fetch during pagination |
|
|
@@ -133,6 +132,99 @@ if token.expired?
|
|
|
133
132
|
end
|
|
134
133
|
```
|
|
135
134
|
|
|
135
|
+
### Device Authorization Grant (RFC 8628)
|
|
136
|
+
|
|
137
|
+
For input-constrained clients (CLIs, TVs) that can't host a redirect URI, the
|
|
138
|
+
device flow trades a redirect for a user-entered code. Basecamp pre-registers the
|
|
139
|
+
public `basecamp-cli` client (`token_endpoint_auth_method: none`, no secret); an
|
|
140
|
+
omitted scope defaults to `read` — prefer pinning it explicitly with
|
|
141
|
+
`scope: "read"`. Pass bare origins everywhere (no trailing slash): binding is
|
|
142
|
+
code-point exact — a trailing-slash `expected_issuer` raises a **hard**
|
|
143
|
+
`expected_issuer_unavailable`, while a trailing-slash resource origin breaks
|
|
144
|
+
the hop-1 binding and silently soft-falls back to Launchpad.
|
|
145
|
+
|
|
146
|
+
```ruby
|
|
147
|
+
# The device grant runs against an ALREADY-SELECTED config whose issuer advertises
|
|
148
|
+
# a device_authorization_endpoint. Resolve one with resource-first discovery —
|
|
149
|
+
# NOT discover_launchpad: Launchpad advertises no device endpoint, so the
|
|
150
|
+
# capability guard would reject it.
|
|
151
|
+
result = Basecamp::Oauth.discover_from_resource("https://3.basecampapi.com")
|
|
152
|
+
raise "device login is not available for this resource" unless result.selected?
|
|
153
|
+
config = result.config
|
|
154
|
+
|
|
155
|
+
# One call runs the whole grant against the SELECTED config: it guards
|
|
156
|
+
# capability, requests a device/user code, shows it via the display hook, then
|
|
157
|
+
# polls the token endpoint until the user approves.
|
|
158
|
+
token = Basecamp::Oauth.perform_device_login(
|
|
159
|
+
config: config,
|
|
160
|
+
client_id: "basecamp-cli",
|
|
161
|
+
display: ->(auth) do
|
|
162
|
+
puts "Visit #{auth.verification_uri} and enter code: #{auth.user_code}"
|
|
163
|
+
puts "Or open: #{auth.verification_uri_complete}" if auth.verification_uri_complete
|
|
164
|
+
end
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
client = Basecamp.client(access_token: token.access_token)
|
|
168
|
+
|
|
169
|
+
# BC5 device logins as basecamp-cli mint MULTI-ACCOUNT refresh tokens: the
|
|
170
|
+
# token carries an RFC 8707 resource indicator (token.resource,
|
|
171
|
+
# "urn:bc:account:<id>"), and refreshing without echoing it is rejected
|
|
172
|
+
# (400 invalid_request). Persist token.resource alongside the tokens and
|
|
173
|
+
# echo it on refresh:
|
|
174
|
+
# A device-token response MAY omit refresh_token — guard it: without one,
|
|
175
|
+
# refreshing is impossible and the user must re-run the device login.
|
|
176
|
+
if token.expired? && token.refresh_token
|
|
177
|
+
fresh = Basecamp::Oauth.refresh_token(
|
|
178
|
+
token_endpoint: config.token_endpoint,
|
|
179
|
+
refresh_token: token.refresh_token,
|
|
180
|
+
client_id: "basecamp-cli", # public client — no secret
|
|
181
|
+
resource: token.resource
|
|
182
|
+
)
|
|
183
|
+
# A refresh response MAY omit resource (the binding is unchanged) — persist
|
|
184
|
+
# `fresh.resource || token.resource` so the next refresh still echoes it.
|
|
185
|
+
end
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
The capability guard requires BOTH `config.device_authorization_endpoint` AND the
|
|
189
|
+
exact grant-type URN `urn:ietf:params:oauth:grant-type:device_code` in
|
|
190
|
+
`config.grant_types_supported` — servers advertise the full URN, so checking for
|
|
191
|
+
a bare `device_code` entry would wrongly conclude the flow is unavailable;
|
|
192
|
+
otherwise it raises
|
|
193
|
+
`Basecamp::Oauth::DeviceFlowError` with `reason: :unavailable` before any request
|
|
194
|
+
is issued. The two lower-level steps are also exposed directly:
|
|
195
|
+
|
|
196
|
+
```ruby
|
|
197
|
+
auth = Basecamp::Oauth.request_device_authorization(
|
|
198
|
+
device_authorization_endpoint: config.device_authorization_endpoint,
|
|
199
|
+
client_id: "basecamp-cli"
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
token = Basecamp::Oauth.poll_device_token(
|
|
203
|
+
token_endpoint: config.token_endpoint,
|
|
204
|
+
client_id: "basecamp-cli",
|
|
205
|
+
device_code: auth.device_code,
|
|
206
|
+
interval: auth.interval,
|
|
207
|
+
expires_in: auth.expires_in
|
|
208
|
+
)
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
The polling loop waits at least `interval` seconds between polls against a
|
|
212
|
+
**monotonic** deadline, sustains a `slow_down` bump (+5s for every later poll),
|
|
213
|
+
and backs off exponentially on connection timeouts. A terminal outcome raises
|
|
214
|
+
`DeviceFlowError` carrying a `reason` whose parent `type` is derived from it:
|
|
215
|
+
|
|
216
|
+
| `reason` | `type` | Meaning |
|
|
217
|
+
|---|---|---|
|
|
218
|
+
| `:access_denied` | `auth` | The user declined the request |
|
|
219
|
+
| `:expired` | `auth` | The code expired before approval |
|
|
220
|
+
| `:transport` | `network` (retryable) | A network failure ended the flow |
|
|
221
|
+
| `:unavailable` | `validation` | The config can't do device flow |
|
|
222
|
+
| `:cancelled` | `usage` | The caller cancelled the flow |
|
|
223
|
+
|
|
224
|
+
`poll_device_token` and `perform_device_login` accept injectable `clock`,
|
|
225
|
+
`sleeper`, and `cancelled` callables — pass a `cancelled` probe (e.g. one that
|
|
226
|
+
checks a signal set by SIGINT) to abort a pending login cleanly.
|
|
227
|
+
|
|
136
228
|
### Resource-First Discovery (RFC 9728 + RFC 8414)
|
|
137
229
|
|
|
138
230
|
BC5's Authorization Server (AS) metadata lives only at the canonical issuer (the
|
|
@@ -179,7 +271,7 @@ aborts before an oversized body is buffered.
|
|
|
179
271
|
|
|
180
272
|
## Services
|
|
181
273
|
|
|
182
|
-
The SDK provides
|
|
274
|
+
The SDK provides 46 account-scoped services. The table below covers the common ones; see `lib/basecamp/generated/services/` for the authoritative, complete set:
|
|
183
275
|
|
|
184
276
|
| Service | Description |
|
|
185
277
|
|---------|-------------|
|
|
@@ -260,13 +352,15 @@ result = account.download_url(url)
|
|
|
260
352
|
|
|
261
353
|
## Retry Behavior
|
|
262
354
|
|
|
263
|
-
GET requests automatically retry
|
|
264
|
-
|
|
265
|
-
- **Retryable errors**: 429 (rate limit), 502, 503, 504 (gateway errors)
|
|
266
|
-
- **Backoff**: Exponential with jitter (1s, 2s, 4s...)
|
|
267
|
-
- **Rate limits**: Respects `Retry-After` header
|
|
355
|
+
Only plain GET requests retry — automatically, with exponential backoff. Mutation operations (POST, PUT, DELETE) do **not** retry to prevent data duplication, and the raw upload and download paths skip the retry loop entirely (the upload path is strictly one request; the download hop keeps only the one-shot 401 replay below).
|
|
268
356
|
|
|
269
|
-
|
|
357
|
+
- **Which errors**: Retry keys off the error's `retryable?` classification, not a declared status list — 429 (rate limit), 500, 502, 503, 504, and any other 5xx all retry, as does `NetworkError` (connection failures, including DNS and connect-phase timeouts). Read timeouts are the exception: Faraday surfaces them as a status-less `ApiError` with `retryable? == false`, so a GET that times out mid-response fails on the first attempt. 400, 401, 403, 404, and 422 never retry.
|
|
358
|
+
- **`max_retries`**: Total request attempts for GET requests, including the initial request — the default `3` means one initial attempt plus two retries. **`max_retries: 0` sends zero requests** and raises `Basecamp::ApiError` (`"Request failed after 0 attempts"`).
|
|
359
|
+
- **Backoff**: Exponential with jitter — `base_delay * 2^(attempt - 1) + rand * max_jitter` — uncapped, bounded in practice by the attempt budget.
|
|
360
|
+
- **Rate limits**: A 429's `Retry-After` header overrides the calculated backoff. Only 429 carries it: 5xx and network errors always use the exponential backoff.
|
|
361
|
+
- **401 responses**: With a refresh-capable token provider, the SDK refreshes the token and replays the request **once** — for all methods, including mutations — outside the `max_retries` budget. A second 401 is surfaced. The raw upload path has no 401 replay.
|
|
362
|
+
- **Per-operation metadata**: The retry policy operations declare (`retry_on` statuses, per-operation `max`) is inert in Ruby — every API GET issued through the client, including the Launchpad authorization fetch, rides the same classification-based loop bounded by `config.max_retries` alone. (The download flow's redirect hop and OAuth discovery use their own single-attempt transports.)
|
|
363
|
+
- **`retryable?`**: Unlike SDKs where the error classification is only a hint for your own code, in Ruby an error's `retryable?` (and `retry_after`) is exactly what the transport acts on for GET requests.
|
|
270
364
|
|
|
271
365
|
## Error Handling
|
|
272
366
|
|
|
@@ -335,6 +429,8 @@ client = Basecamp::Client.new(
|
|
|
335
429
|
| `BASECAMP_TOKEN` | OAuth access token |
|
|
336
430
|
| `BASECAMP_ACCOUNT_ID` | Account ID |
|
|
337
431
|
| `BASECAMP_BASE_URL` | API base URL (default: `https://3.basecampapi.com`) |
|
|
432
|
+
| `BASECAMP_TIMEOUT` | Request timeout in seconds (default: `30`) |
|
|
433
|
+
| `BASECAMP_MAX_RETRIES` | Total request attempts for GET requests, including the initial request (default: `3`) |
|
|
338
434
|
|
|
339
435
|
## Development
|
|
340
436
|
|
data/lib/basecamp/client.rb
CHANGED
|
@@ -152,8 +152,8 @@ module Basecamp
|
|
|
152
152
|
# @param path [String] URL path (without account prefix)
|
|
153
153
|
# @param params [Hash] query parameters
|
|
154
154
|
# @return [Response]
|
|
155
|
-
def get(path, params: {})
|
|
156
|
-
@parent.http.get(account_path(path), params: params)
|
|
155
|
+
def get(path, params: {}, operation: nil)
|
|
156
|
+
@parent.http.get(account_path(path), params: params, operation: operation)
|
|
157
157
|
end
|
|
158
158
|
|
|
159
159
|
# Performs a POST request scoped to this account.
|
|
@@ -204,8 +204,8 @@ module Basecamp
|
|
|
204
204
|
# @param params [Hash] query parameters
|
|
205
205
|
# @yield [Hash] each item from the response
|
|
206
206
|
# @return [Enumerator] if no block given
|
|
207
|
-
def paginate(path, params: {}, &)
|
|
208
|
-
@parent.http.paginate(account_path(path), params: params, &)
|
|
207
|
+
def paginate(path, params: {}, operation: nil, &)
|
|
208
|
+
@parent.http.paginate(account_path(path), params: params, operation: operation, &)
|
|
209
209
|
end
|
|
210
210
|
|
|
211
211
|
# Fetches all pages of a paginated resource, extracting items from a key.
|
|
@@ -215,8 +215,8 @@ module Basecamp
|
|
|
215
215
|
# @param params [Hash] query parameters
|
|
216
216
|
# @yield [Hash] each item from the response
|
|
217
217
|
# @return [Enumerator] if no block given
|
|
218
|
-
def paginate_key(path, key:, params: {}, &)
|
|
219
|
-
@parent.http.paginate_key(account_path(path), key: key, params: params, &)
|
|
218
|
+
def paginate_key(path, key:, params: {}, operation: nil, &)
|
|
219
|
+
@parent.http.paginate_key(account_path(path), key: key, params: params, operation: operation, &)
|
|
220
220
|
end
|
|
221
221
|
|
|
222
222
|
# Fetches a wrapped paginated resource, returning wrapper fields + lazy paginated items.
|
|
@@ -224,8 +224,8 @@ module Basecamp
|
|
|
224
224
|
# @param key [String] the key containing the array of paginated items
|
|
225
225
|
# @param params [Hash] query parameters
|
|
226
226
|
# @return [Hash] wrapper fields merged with key => Enumerator of all items
|
|
227
|
-
def paginate_wrapped(path, key:, params: {})
|
|
228
|
-
@parent.http.paginate_wrapped(account_path(path), key: key, params: params)
|
|
227
|
+
def paginate_wrapped(path, key:, params: {}, operation: nil)
|
|
228
|
+
@parent.http.paginate_wrapped(account_path(path), key: key, params: params, operation: operation)
|
|
229
229
|
end
|
|
230
230
|
|
|
231
231
|
# Downloads file content from any API-routable download URL.
|
|
@@ -501,6 +501,11 @@ module Basecamp
|
|
|
501
501
|
service(:timeline) { Services::TimelineService.new(self) }
|
|
502
502
|
end
|
|
503
503
|
|
|
504
|
+
# @return [Services::EverythingService]
|
|
505
|
+
def everything
|
|
506
|
+
service(:everything) { Services::EverythingService.new(self) }
|
|
507
|
+
end
|
|
508
|
+
|
|
504
509
|
# @return [Services::TimesheetsService]
|
|
505
510
|
def timesheets
|
|
506
511
|
service(:timesheets) { Services::TimesheetsService.new(self) }
|
data/lib/basecamp/config.rb
CHANGED
|
@@ -24,7 +24,8 @@ module Basecamp
|
|
|
24
24
|
# @return [Integer] request timeout in seconds
|
|
25
25
|
attr_accessor :timeout
|
|
26
26
|
|
|
27
|
-
# @return [Integer]
|
|
27
|
+
# @return [Integer] total request attempts for GET requests, including the
|
|
28
|
+
# initial request (0 sends no requests at all and raises)
|
|
28
29
|
attr_accessor :max_retries
|
|
29
30
|
|
|
30
31
|
# @return [Float] initial backoff delay in seconds
|
|
@@ -48,7 +49,7 @@ module Basecamp
|
|
|
48
49
|
#
|
|
49
50
|
# @param base_url [String] API base URL
|
|
50
51
|
# @param timeout [Integer] request timeout in seconds
|
|
51
|
-
# @param max_retries [Integer]
|
|
52
|
+
# @param max_retries [Integer] total request attempts for GET requests, including the initial request
|
|
52
53
|
# @param base_delay [Float] initial backoff delay
|
|
53
54
|
# @param max_jitter [Float] maximum jitter
|
|
54
55
|
# @param max_pages [Integer] maximum pages to fetch
|
|
@@ -78,7 +79,7 @@ module Basecamp
|
|
|
78
79
|
# Environment variables:
|
|
79
80
|
# - BASECAMP_BASE_URL: API base URL
|
|
80
81
|
# - BASECAMP_TIMEOUT: Request timeout in seconds
|
|
81
|
-
# - BASECAMP_MAX_RETRIES:
|
|
82
|
+
# - BASECAMP_MAX_RETRIES: Total request attempts for GET requests, including the initial request
|
|
82
83
|
#
|
|
83
84
|
# @return [Config]
|
|
84
85
|
def self.from_env
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://basecamp.com/schemas/sdk-metadata.json",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"generated": "2026-07-
|
|
4
|
+
"generated": "2026-07-31T06:58:29Z",
|
|
5
5
|
"operations": {
|
|
6
6
|
"GetAccount": {
|
|
7
7
|
"retry": {
|
|
@@ -115,6 +115,9 @@
|
|
|
115
115
|
429,
|
|
116
116
|
503
|
|
117
117
|
]
|
|
118
|
+
},
|
|
119
|
+
"idempotent": {
|
|
120
|
+
"natural": true
|
|
118
121
|
}
|
|
119
122
|
},
|
|
120
123
|
"DisableCardColumnOnHold": {
|
|
@@ -170,6 +173,72 @@
|
|
|
170
173
|
]
|
|
171
174
|
}
|
|
172
175
|
},
|
|
176
|
+
"ListMessageTypes": {
|
|
177
|
+
"retry": {
|
|
178
|
+
"maxAttempts": 3,
|
|
179
|
+
"baseDelayMs": 1000,
|
|
180
|
+
"backoff": "exponential",
|
|
181
|
+
"retryOn": [
|
|
182
|
+
429,
|
|
183
|
+
503
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
"pagination": {
|
|
187
|
+
"style": "link",
|
|
188
|
+
"totalCountHeader": "X-Total-Count",
|
|
189
|
+
"maxPageSize": 50
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"CreateMessageType": {
|
|
193
|
+
"retry": {
|
|
194
|
+
"maxAttempts": 2,
|
|
195
|
+
"baseDelayMs": 1000,
|
|
196
|
+
"backoff": "exponential",
|
|
197
|
+
"retryOn": [
|
|
198
|
+
429,
|
|
199
|
+
503
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"GetMessageType": {
|
|
204
|
+
"retry": {
|
|
205
|
+
"maxAttempts": 3,
|
|
206
|
+
"baseDelayMs": 1000,
|
|
207
|
+
"backoff": "exponential",
|
|
208
|
+
"retryOn": [
|
|
209
|
+
429,
|
|
210
|
+
503
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"UpdateMessageType": {
|
|
215
|
+
"retry": {
|
|
216
|
+
"maxAttempts": 3,
|
|
217
|
+
"baseDelayMs": 1000,
|
|
218
|
+
"backoff": "exponential",
|
|
219
|
+
"retryOn": [
|
|
220
|
+
429,
|
|
221
|
+
503
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
"idempotent": {
|
|
225
|
+
"natural": true
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"DeleteMessageType": {
|
|
229
|
+
"retry": {
|
|
230
|
+
"maxAttempts": 3,
|
|
231
|
+
"baseDelayMs": 1000,
|
|
232
|
+
"backoff": "exponential",
|
|
233
|
+
"retryOn": [
|
|
234
|
+
429,
|
|
235
|
+
503
|
|
236
|
+
]
|
|
237
|
+
},
|
|
238
|
+
"idempotent": {
|
|
239
|
+
"natural": true
|
|
240
|
+
}
|
|
241
|
+
},
|
|
173
242
|
"CreateTool": {
|
|
174
243
|
"retry": {
|
|
175
244
|
"maxAttempts": 2,
|
|
@@ -418,7 +487,7 @@
|
|
|
418
487
|
]
|
|
419
488
|
}
|
|
420
489
|
},
|
|
421
|
-
"
|
|
490
|
+
"GetEverythingCompletedCards": {
|
|
422
491
|
"retry": {
|
|
423
492
|
"maxAttempts": 3,
|
|
424
493
|
"baseDelayMs": 1000,
|
|
@@ -431,21 +500,26 @@
|
|
|
431
500
|
"pagination": {
|
|
432
501
|
"style": "link",
|
|
433
502
|
"totalCountHeader": "X-Total-Count",
|
|
434
|
-
"maxPageSize":
|
|
503
|
+
"maxPageSize": 5
|
|
435
504
|
}
|
|
436
505
|
},
|
|
437
|
-
"
|
|
506
|
+
"GetEverythingNoDueDateCards": {
|
|
438
507
|
"retry": {
|
|
439
|
-
"maxAttempts":
|
|
508
|
+
"maxAttempts": 3,
|
|
440
509
|
"baseDelayMs": 1000,
|
|
441
510
|
"backoff": "exponential",
|
|
442
511
|
"retryOn": [
|
|
443
512
|
429,
|
|
444
513
|
503
|
|
445
514
|
]
|
|
515
|
+
},
|
|
516
|
+
"pagination": {
|
|
517
|
+
"style": "link",
|
|
518
|
+
"totalCountHeader": "X-Total-Count",
|
|
519
|
+
"maxPageSize": 5
|
|
446
520
|
}
|
|
447
521
|
},
|
|
448
|
-
"
|
|
522
|
+
"GetEverythingNotNowCards": {
|
|
449
523
|
"retry": {
|
|
450
524
|
"maxAttempts": 3,
|
|
451
525
|
"baseDelayMs": 1000,
|
|
@@ -454,9 +528,14 @@
|
|
|
454
528
|
429,
|
|
455
529
|
503
|
|
456
530
|
]
|
|
531
|
+
},
|
|
532
|
+
"pagination": {
|
|
533
|
+
"style": "link",
|
|
534
|
+
"totalCountHeader": "X-Total-Count",
|
|
535
|
+
"maxPageSize": 5
|
|
457
536
|
}
|
|
458
537
|
},
|
|
459
|
-
"
|
|
538
|
+
"GetEverythingOpenCards": {
|
|
460
539
|
"retry": {
|
|
461
540
|
"maxAttempts": 3,
|
|
462
541
|
"baseDelayMs": 1000,
|
|
@@ -466,11 +545,24 @@
|
|
|
466
545
|
503
|
|
467
546
|
]
|
|
468
547
|
},
|
|
469
|
-
"
|
|
470
|
-
"
|
|
548
|
+
"pagination": {
|
|
549
|
+
"style": "link",
|
|
550
|
+
"totalCountHeader": "X-Total-Count",
|
|
551
|
+
"maxPageSize": 5
|
|
471
552
|
}
|
|
472
553
|
},
|
|
473
|
-
"
|
|
554
|
+
"GetEverythingOverdueCards": {
|
|
555
|
+
"retry": {
|
|
556
|
+
"maxAttempts": 3,
|
|
557
|
+
"baseDelayMs": 1000,
|
|
558
|
+
"backoff": "exponential",
|
|
559
|
+
"retryOn": [
|
|
560
|
+
429,
|
|
561
|
+
503
|
|
562
|
+
]
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
"GetEverythingUnassignedCards": {
|
|
474
566
|
"retry": {
|
|
475
567
|
"maxAttempts": 3,
|
|
476
568
|
"baseDelayMs": 1000,
|
|
@@ -480,8 +572,10 @@
|
|
|
480
572
|
503
|
|
481
573
|
]
|
|
482
574
|
},
|
|
483
|
-
"
|
|
484
|
-
"
|
|
575
|
+
"pagination": {
|
|
576
|
+
"style": "link",
|
|
577
|
+
"totalCountHeader": "X-Total-Count",
|
|
578
|
+
"maxPageSize": 5
|
|
485
579
|
}
|
|
486
580
|
},
|
|
487
581
|
"ListCampfires": {
|
|
@@ -670,6 +764,22 @@
|
|
|
670
764
|
]
|
|
671
765
|
}
|
|
672
766
|
},
|
|
767
|
+
"GetEverythingCheckins": {
|
|
768
|
+
"retry": {
|
|
769
|
+
"maxAttempts": 3,
|
|
770
|
+
"baseDelayMs": 1000,
|
|
771
|
+
"backoff": "exponential",
|
|
772
|
+
"retryOn": [
|
|
773
|
+
429,
|
|
774
|
+
503
|
|
775
|
+
]
|
|
776
|
+
},
|
|
777
|
+
"pagination": {
|
|
778
|
+
"style": "link",
|
|
779
|
+
"totalCountHeader": "X-Total-Count",
|
|
780
|
+
"maxPageSize": 50
|
|
781
|
+
}
|
|
782
|
+
},
|
|
673
783
|
"ListPingablePeople": {
|
|
674
784
|
"retry": {
|
|
675
785
|
"maxAttempts": 3,
|
|
@@ -767,6 +877,22 @@
|
|
|
767
877
|
]
|
|
768
878
|
}
|
|
769
879
|
},
|
|
880
|
+
"GetEverythingComments": {
|
|
881
|
+
"retry": {
|
|
882
|
+
"maxAttempts": 3,
|
|
883
|
+
"baseDelayMs": 1000,
|
|
884
|
+
"backoff": "exponential",
|
|
885
|
+
"retryOn": [
|
|
886
|
+
429,
|
|
887
|
+
503
|
|
888
|
+
]
|
|
889
|
+
},
|
|
890
|
+
"pagination": {
|
|
891
|
+
"style": "link",
|
|
892
|
+
"totalCountHeader": "X-Total-Count",
|
|
893
|
+
"maxPageSize": 50
|
|
894
|
+
}
|
|
895
|
+
},
|
|
770
896
|
"GetComment": {
|
|
771
897
|
"retry": {
|
|
772
898
|
"maxAttempts": 3,
|
|
@@ -856,6 +982,38 @@
|
|
|
856
982
|
"natural": true
|
|
857
983
|
}
|
|
858
984
|
},
|
|
985
|
+
"GetEverythingFiles": {
|
|
986
|
+
"retry": {
|
|
987
|
+
"maxAttempts": 3,
|
|
988
|
+
"baseDelayMs": 1000,
|
|
989
|
+
"backoff": "exponential",
|
|
990
|
+
"retryOn": [
|
|
991
|
+
429,
|
|
992
|
+
503
|
|
993
|
+
]
|
|
994
|
+
},
|
|
995
|
+
"pagination": {
|
|
996
|
+
"style": "link",
|
|
997
|
+
"totalCountHeader": "X-Total-Count",
|
|
998
|
+
"maxPageSize": 50
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
"GetEverythingForwards": {
|
|
1002
|
+
"retry": {
|
|
1003
|
+
"maxAttempts": 3,
|
|
1004
|
+
"baseDelayMs": 1000,
|
|
1005
|
+
"backoff": "exponential",
|
|
1006
|
+
"retryOn": [
|
|
1007
|
+
429,
|
|
1008
|
+
503
|
|
1009
|
+
]
|
|
1010
|
+
},
|
|
1011
|
+
"pagination": {
|
|
1012
|
+
"style": "link",
|
|
1013
|
+
"totalCountHeader": "X-Total-Count",
|
|
1014
|
+
"maxPageSize": 50
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
859
1017
|
"GetGaugeNeedle": {
|
|
860
1018
|
"retry": {
|
|
861
1019
|
"maxAttempts": 3,
|
|
@@ -1059,6 +1217,22 @@
|
|
|
1059
1217
|
]
|
|
1060
1218
|
}
|
|
1061
1219
|
},
|
|
1220
|
+
"GetEverythingMessages": {
|
|
1221
|
+
"retry": {
|
|
1222
|
+
"maxAttempts": 3,
|
|
1223
|
+
"baseDelayMs": 1000,
|
|
1224
|
+
"backoff": "exponential",
|
|
1225
|
+
"retryOn": [
|
|
1226
|
+
429,
|
|
1227
|
+
503
|
|
1228
|
+
]
|
|
1229
|
+
},
|
|
1230
|
+
"pagination": {
|
|
1231
|
+
"style": "link",
|
|
1232
|
+
"totalCountHeader": "X-Total-Count",
|
|
1233
|
+
"maxPageSize": 50
|
|
1234
|
+
}
|
|
1235
|
+
},
|
|
1062
1236
|
"GetMessage": {
|
|
1063
1237
|
"retry": {
|
|
1064
1238
|
"maxAttempts": 3,
|
|
@@ -1193,6 +1367,22 @@
|
|
|
1193
1367
|
]
|
|
1194
1368
|
}
|
|
1195
1369
|
},
|
|
1370
|
+
"GetBubbleUps": {
|
|
1371
|
+
"retry": {
|
|
1372
|
+
"maxAttempts": 3,
|
|
1373
|
+
"baseDelayMs": 1000,
|
|
1374
|
+
"backoff": "exponential",
|
|
1375
|
+
"retryOn": [
|
|
1376
|
+
429,
|
|
1377
|
+
503
|
|
1378
|
+
]
|
|
1379
|
+
},
|
|
1380
|
+
"pagination": {
|
|
1381
|
+
"style": "link",
|
|
1382
|
+
"totalCountHeader": "X-Total-Count",
|
|
1383
|
+
"maxPageSize": 50
|
|
1384
|
+
}
|
|
1385
|
+
},
|
|
1196
1386
|
"MarkAsRead": {
|
|
1197
1387
|
"retry": {
|
|
1198
1388
|
"maxAttempts": 2,
|
|
@@ -1851,6 +2041,9 @@
|
|
|
1851
2041
|
429,
|
|
1852
2042
|
503
|
|
1853
2043
|
]
|
|
2044
|
+
},
|
|
2045
|
+
"idempotent": {
|
|
2046
|
+
"natural": true
|
|
1854
2047
|
}
|
|
1855
2048
|
},
|
|
1856
2049
|
"UpdateSubscription": {
|
|
@@ -2371,6 +2564,81 @@
|
|
|
2371
2564
|
]
|
|
2372
2565
|
}
|
|
2373
2566
|
},
|
|
2567
|
+
"GetEverythingCompletedTodos": {
|
|
2568
|
+
"retry": {
|
|
2569
|
+
"maxAttempts": 3,
|
|
2570
|
+
"baseDelayMs": 1000,
|
|
2571
|
+
"backoff": "exponential",
|
|
2572
|
+
"retryOn": [
|
|
2573
|
+
429,
|
|
2574
|
+
503
|
|
2575
|
+
]
|
|
2576
|
+
},
|
|
2577
|
+
"pagination": {
|
|
2578
|
+
"style": "link",
|
|
2579
|
+
"totalCountHeader": "X-Total-Count",
|
|
2580
|
+
"maxPageSize": 5
|
|
2581
|
+
}
|
|
2582
|
+
},
|
|
2583
|
+
"GetEverythingNoDueDateTodos": {
|
|
2584
|
+
"retry": {
|
|
2585
|
+
"maxAttempts": 3,
|
|
2586
|
+
"baseDelayMs": 1000,
|
|
2587
|
+
"backoff": "exponential",
|
|
2588
|
+
"retryOn": [
|
|
2589
|
+
429,
|
|
2590
|
+
503
|
|
2591
|
+
]
|
|
2592
|
+
},
|
|
2593
|
+
"pagination": {
|
|
2594
|
+
"style": "link",
|
|
2595
|
+
"totalCountHeader": "X-Total-Count",
|
|
2596
|
+
"maxPageSize": 5
|
|
2597
|
+
}
|
|
2598
|
+
},
|
|
2599
|
+
"GetEverythingOpenTodos": {
|
|
2600
|
+
"retry": {
|
|
2601
|
+
"maxAttempts": 3,
|
|
2602
|
+
"baseDelayMs": 1000,
|
|
2603
|
+
"backoff": "exponential",
|
|
2604
|
+
"retryOn": [
|
|
2605
|
+
429,
|
|
2606
|
+
503
|
|
2607
|
+
]
|
|
2608
|
+
},
|
|
2609
|
+
"pagination": {
|
|
2610
|
+
"style": "link",
|
|
2611
|
+
"totalCountHeader": "X-Total-Count",
|
|
2612
|
+
"maxPageSize": 5
|
|
2613
|
+
}
|
|
2614
|
+
},
|
|
2615
|
+
"GetEverythingOverdueTodos": {
|
|
2616
|
+
"retry": {
|
|
2617
|
+
"maxAttempts": 3,
|
|
2618
|
+
"baseDelayMs": 1000,
|
|
2619
|
+
"backoff": "exponential",
|
|
2620
|
+
"retryOn": [
|
|
2621
|
+
429,
|
|
2622
|
+
503
|
|
2623
|
+
]
|
|
2624
|
+
}
|
|
2625
|
+
},
|
|
2626
|
+
"GetEverythingUnassignedTodos": {
|
|
2627
|
+
"retry": {
|
|
2628
|
+
"maxAttempts": 3,
|
|
2629
|
+
"baseDelayMs": 1000,
|
|
2630
|
+
"backoff": "exponential",
|
|
2631
|
+
"retryOn": [
|
|
2632
|
+
429,
|
|
2633
|
+
503
|
|
2634
|
+
]
|
|
2635
|
+
},
|
|
2636
|
+
"pagination": {
|
|
2637
|
+
"style": "link",
|
|
2638
|
+
"totalCountHeader": "X-Total-Count",
|
|
2639
|
+
"maxPageSize": 5
|
|
2640
|
+
}
|
|
2641
|
+
},
|
|
2374
2642
|
"GetTodo": {
|
|
2375
2643
|
"retry": {
|
|
2376
2644
|
"maxAttempts": 3,
|
|
@@ -11,7 +11,7 @@ module Basecamp
|
|
|
11
11
|
# @return [Hash] response data
|
|
12
12
|
def get_account()
|
|
13
13
|
with_operation(service: "account", operation: "get_account", is_mutation: false) do
|
|
14
|
-
http_get("/account.json").json
|
|
14
|
+
http_get("/account.json", operation: "GetAccount").json
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -8,10 +8,10 @@ module Basecamp
|
|
|
8
8
|
class AutomationService < BaseService
|
|
9
9
|
|
|
10
10
|
# List all lineup markers for the account
|
|
11
|
-
# @return [Hash] response data
|
|
11
|
+
# @return [Array<Hash>] response data
|
|
12
12
|
def list_lineup_markers()
|
|
13
13
|
with_operation(service: "automation", operation: "list_lineup_markers", is_mutation: false) do
|
|
14
|
-
http_get("/lineup/markers.json").json
|
|
14
|
+
http_get("/lineup/markers.json", operation: "ListLineupMarkers").json
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
end
|