Skip to content

feat(client): accept query= on put/delete/patch like get() - #69

Merged
nycomp merged 1 commit into
mainfrom
feat/query-kwarg-non-get
Oct 3, 2026
Merged

nycomp merged 1 commit into
mainfrom
feat/query-kwarg-non-get

Conversation

@nycomp

@nycomp nycomp commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Closes #68.

CampusRequest.get() translates query= into params=; put/delete/patch only took json=, so callers hitting a non-GET endpoint that reads the query string had to hand-build URLs (live example in #68: campus.auth's disconnect route reads user_id from the query string only).

This adds the same optional query: JsonDict | None = None kwarg to the abstract JsonClient signatures and the CampusRequest implementations (params=query alongside json=). Optional and defaulting to None, so existing call sites are untouched.

Tests: tests/unit/test_json_client_query.py asserts each verb forwards query as session params (and that omitting it still sends params=None). Full suite green (122 tests).

get() translated query= into session params; the other verbs only
took json=, forcing callers to hand-build URLs when a non-GET
endpoint reads the query string (e.g. campus.auth's DELETE
/auth/v1/connections/{provider}/{integration}/?user_id=...).

query= is optional and defaults to None, so existing calls are
unchanged. Closes #68.
@nycomp
nycomp merged commit 39a6285 into main Oct 3, 2026
2 checks passed
@nycomp
nycomp deleted the feat/query-kwarg-non-get branch October 3, 2026 19:55
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.

JsonClient: accept query= on put/delete/patch like get() does

2 participants