Add pins API support and fix pre-existing e2e failures#49
Merged
Conversation
Adds card pin/unpin subcommands and a top-level pin list command to support the new pins API endpoints.
The API uses POST/DELETE on /reading.json, not /read.json and /unread.json. Also handle nil response data from 204 No Content.
When the API returns non-JSON error responses (e.g. HTML 401 pages), the JSON parse error was masking the proper HTTP status error. Moving the status check first ensures correct error codes are returned.
Tests for missing --board and auth login checked wrong config path or leaked the default board from the global config file. Use temp HOME to isolate, check both config paths, and drop pagination assertion for single-page results.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
card pin,card unpin, andpin listcommands with unit tests, e2e tests, and README documentation/read.json,/unread.json) instead of the correctPOST/DELETE /reading.json--boardto fail were leaking the default board from global config; auth login test checked wrong config path; pagination assertion removed for single-page resultsTest plan
go test ./internal/...)