Skip to content

Add ListAnswersByUser to CheckinsService#276

Draft
robzolkos wants to merge 1 commit intobasecamp:mainfrom
robzolkos:feature/checkins-answers-by-person
Draft

Add ListAnswersByUser to CheckinsService#276
robzolkos wants to merge 1 commit intobasecamp:mainfrom
robzolkos:feature/checkins-answers-by-person

Conversation

@robzolkos
Copy link
Copy Markdown
Collaborator

@robzolkos robzolkos commented Apr 21, 2026

Summary

The BC3 API supports GET /questions/{id}/answers/by/{personId}.json to fetch a specific person's answers to a check-in question, and the generated Go client already exposes GetAnswersByPersonWithResponse. However, the CheckinsService had no service-layer wrapper for it.

This PR adds ListAnswersByUser(ctx, questionID, personID int64, opts *AnswerListOptions) (*AnswerListResult, error) to CheckinsService, following the same pagination pattern as the existing ListAnswers method.

Changes

  • go/pkg/basecamp/checkins.go — new ListAnswersByUser method on CheckinsService
  • go/pkg/basecamp/checkins_test.goTestCheckinsService_ListAnswersByUser verifying the correct API path is called and results are parsed
  • spec/fixtures/checkins/answers_by_person.json — fixture for single-user answer list

Other languages

Ruby, Python, TypeScript, Kotlin, and Swift all already expose this endpoint — their SDKs are fully generated from the OpenAPI spec so byPerson/by_person was included from the start. The Go SDK is unique in having a hand-written service layer on top of the generated client, which is why only Go needed this change.

Context

This unblocks basecamp/basecamp-cli#443, which requests a --by filter on basecamp checkins answers. The CLI PR depends on this SDK method being available.

@github-actions github-actions Bot added go spec Changes to the Smithy spec or OpenAPI labels Apr 21, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 21, 2026

Spec Change Impact

  • Added Operation: ListAnswersByUser in CheckinsService.
  • Affected SDKs: All SDKs need regeneration to include the new operation.
  • Breaking Change: No, this is a non-breaking addition.

SDKs needing updates:

  • Go
  • TypeScript
  • Ruby
  • Kotlin
  • Swift

@robzolkos robzolkos changed the title feat(checkins): add ListAnswersByUser to CheckinsService Add ListAnswersByUser to CheckinsService Apr 21, 2026
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

Wraps the existing GetAnswersByPersonWithResponse generated endpoint with
a proper service method, following the same pagination pattern as ListAnswers.

The BC3 API has supported GET /questions/{id}/answers/by/{personId}.json
but the Go SDK had no service-layer wrapper for it.
@robzolkos robzolkos force-pushed the feature/checkins-answers-by-person branch from 15fed52 to 2fe5be2 Compare April 21, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go spec Changes to the Smithy spec or OpenAPI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant