Skip to content

refactor(client): extract API paths and use typed HTTP headers#11

Merged
lostmygithubaccount merged 1 commit intomainfrom
cody/extract-api-constants
Apr 5, 2026
Merged

refactor(client): extract API paths and use typed HTTP headers#11
lostmygithubaccount merged 1 commit intomainfrom
cody/extract-api-constants

Conversation

@lostmygithubaccount
Copy link
Copy Markdown
Member

Summary

  • Extract hardcoded API path strings (/v1/users, /v1/users/{}/tokens, etc.) into named constants and path-building helper functions
  • Replace string-literal HTTP headers ("Authorization", "User-Agent", "Content-Type") with typed http::header constants
  • Extract "application/json" to a CONTENT_TYPE_JSON constant

🤖 Generated with Claude Code

Replace hardcoded API path strings with named constants and path-building
helper functions. Replace string-literal HTTP headers with http::header
typed constants (AUTHORIZATION, USER_AGENT, CONTENT_TYPE).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lostmygithubaccount lostmygithubaccount enabled auto-merge (squash) April 5, 2026 23:57
@lostmygithubaccount lostmygithubaccount merged commit bbed7b1 into main Apr 5, 2026
1 check passed
@lostmygithubaccount lostmygithubaccount deleted the cody/extract-api-constants branch April 5, 2026 23:58
lostmygithubaccount added a commit that referenced this pull request Apr 13, 2026
Patch bump from 0.2.1 -> 0.2.2 via `bin/bump-version --patch`.
Regenerates Cargo.lock, crates/dkdc-md-cli-py/Cargo.lock, and uv.lock.

## Highlights

Fifteen commits merged since v0.2.1 (2026-03-22). Biggest items are
auth hardening, Python binding test coverage, and CI/release pipeline
stabilization after the transfer to the `dkdc-io` org.

## Fixes / hardening

- `fix(auth): trim whitespace from env var tokens and add hardening tests` (#9)
- `fix(ci): add local PyPI publish step` (#6)
- `fix: add contents:read to release-rust publish job permissions` (#5)
- `fix: add checkout ref to release workflows + remove target cache` (#2)
- `fix: use dkdc.io email for dkdc-io org` (#4)

## Refactors / tests

- `refactor(client): extract API paths and use typed HTTP headers` (#11)
- `refactor(client): extract constants and clean up patterns` (#10)
- `test(py): add Python binding tests` (#13)

## Chores / infra

- `chore(ci): migrate to org reusable workflows` (#7)
- `chore: fix CLAUDE.md symlink to AGENTS.md` (#7)
- `chore: update repo references after transfer to dkdc-io` (#1)
- `chore: update dependencies` (#12)
- `docs: fix token resolution order and remove stale script reference` (#8)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lostmygithubaccount lostmygithubaccount mentioned this pull request Apr 13, 2026
2 tasks
lostmygithubaccount added a commit that referenced this pull request Apr 13, 2026
Patch bump from 0.2.1 -> 0.2.2 via `bin/bump-version --patch`.
Regenerates Cargo.lock, crates/dkdc-md-cli-py/Cargo.lock, and uv.lock.

## Highlights

Fifteen commits merged since v0.2.1 (2026-03-22). Biggest items are
auth hardening, Python binding test coverage, and CI/release pipeline
stabilization after the transfer to the `dkdc-io` org.

## Fixes / hardening

- `fix(auth): trim whitespace from env var tokens and add hardening tests` (#9)
- `fix(ci): add local PyPI publish step` (#6)
- `fix: add contents:read to release-rust publish job permissions` (#5)
- `fix: add checkout ref to release workflows + remove target cache` (#2)
- `fix: use dkdc.io email for dkdc-io org` (#4)

## Refactors / tests

- `refactor(client): extract API paths and use typed HTTP headers` (#11)
- `refactor(client): extract constants and clean up patterns` (#10)
- `test(py): add Python binding tests` (#13)

## Chores / infra

- `chore(ci): migrate to org reusable workflows` (#7)
- `chore: fix CLAUDE.md symlink to AGENTS.md` (#7)
- `chore: update repo references after transfer to dkdc-io` (#1)
- `chore: update dependencies` (#12)
- `docs: fix token resolution order and remove stale script reference` (#8)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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