Skip to content

Migrate recordings.go to use SDK RecordingsService - #68

Merged
jeremy merged 1 commit into
mainfrom
sdk-recordings
Jan 26, 2026
Merged

Migrate recordings.go to use SDK RecordingsService#68
jeremy merged 1 commit into
mainfrom
sdk-recordings

Conversation

@jeremy

@jeremy jeremy commented Jan 26, 2026

Copy link
Copy Markdown
Member

Replace direct API calls with SDK client methods:

  • List uses app.SDK.Recordings().List()
  • Trash/Archive/Restore use respective SDK methods
  • Visibility uses app.SDK.Recordings().SetClientVisibility()

Remove local Recording type in favor of basecamp.Recording.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 121e517b77

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +261 to +262
case "active":
err = app.SDK.Recordings().Unarchive(cmd.Context(), bucketID, recordingID)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore trashed recordings instead of only unarchiving

The CLI help says recordings restore should bring back items from trash or archive, but the active branch only calls Recordings().Unarchive. That only targets archived recordings; a trashed recording won’t be restored (it will likely 404 or stay trashed), so bcq recordings restore <id> fails for trashed items. Consider calling the SDK method that maps to the status/active/restore endpoint (or adding a trash-restore path) so trashed recordings are handled too.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that SDK Unarchive() calls PUT /status/active.json which works for BOTH archived AND trashed recordings per the Basecamp API. Added clarifying comment in PR #73.

Replace direct API calls with SDK client methods:
- List uses app.SDK.Recordings().List()
- Trash/Archive/Restore use respective SDK methods
- Visibility uses app.SDK.Recordings().SetClientVisibility()

Remove local Recording type in favor of basecamp.Recording.
@jeremy
jeremy merged commit 5d0ed11 into main Jan 26, 2026
8 checks passed
@jeremy
jeremy deleted the sdk-recordings branch January 26, 2026 02:32
jeremy added a commit that referenced this pull request Jan 26, 2026
Fixes for Codex review comments:

1. webhooks.go: Let server use default webhook types instead of hard-coding
   (PR #58 feedback)

2. templates.go: Use raw API for archived/trashed status since SDK List()
   only returns active templates (PR #60 feedback)

3. campfire.go: Validate ParseInt errors before DeleteLine to avoid
   silent 0 IDs (PR #64 feedback)

4. recordings.go: Add comment clarifying that Unarchive() works for both
   archived AND trashed recordings via status/active endpoint (PR #68)

5. files.go: Preserve SDK errors in auto-detect mode instead of masking
   auth/permission errors as "not found" (PR #70 feedback)
jeremy added a commit that referenced this pull request Jan 26, 2026
Fixes for Codex review comments:

1. webhooks.go: Let server use default webhook types instead of hard-coding
   (PR #58 feedback)

2. templates.go: Use raw API for archived/trashed status since SDK List()
   only returns active templates (PR #60 feedback)

3. campfire.go: Validate ParseInt errors before DeleteLine to avoid
   silent 0 IDs (PR #64 feedback)

4. recordings.go: Add comment clarifying that Unarchive() works for both
   archived AND trashed recordings via status/active endpoint (PR #68)

5. files.go: Preserve SDK errors in auto-detect mode instead of masking
   auth/permission errors as "not found" (PR #70 feedback)
jeremy added a commit that referenced this pull request Feb 19, 2026
Replace direct API calls with SDK client methods:
- List uses app.SDK.Recordings().List()
- Trash/Archive/Restore use respective SDK methods
- Visibility uses app.SDK.Recordings().SetClientVisibility()

Remove local Recording type in favor of basecamp.Recording.
jeremy added a commit that referenced this pull request Feb 19, 2026
Fixes for Codex review comments:

1. webhooks.go: Let server use default webhook types instead of hard-coding
   (PR #58 feedback)

2. templates.go: Use raw API for archived/trashed status since SDK List()
   only returns active templates (PR #60 feedback)

3. campfire.go: Validate ParseInt errors before DeleteLine to avoid
   silent 0 IDs (PR #64 feedback)

4. recordings.go: Add comment clarifying that Unarchive() works for both
   archived AND trashed recordings via status/active endpoint (PR #68)

5. files.go: Preserve SDK errors in auto-detect mode instead of masking
   auth/permission errors as "not found" (PR #70 feedback)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant