Skip to content

feat(cli): add auth command to verify GP_ACCESS_TOKEN#25

Merged
himewel merged 5 commits into
mainfrom
feat/auth-command
Jun 20, 2026
Merged

feat(cli): add auth command to verify GP_ACCESS_TOKEN#25
himewel merged 5 commits into
mainfrom
feat/auth-command

Conversation

@himewel

@himewel himewel commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add gopro-api auth to check whether GP_ACCESS_TOKEN is configured and accepted by the GoPro cloud API (lightweight GET /media/search?per_page=1).
  • Expose check_auth() on GoProAPI, AsyncGoProAPI, GoProClient, and AsyncGoProClient, returning a new GoProAuthStatus model with token source, HTTP status, and message.
  • Support Rich panel (default), --json, and --tsv output with exit codes 0 / 1 / 2 for scripting.
  • Bump version to 0.0.10 and update CLI, configuration, architecture, and API reference docs.

Test plan

  • gopro-api auth with a valid token → exit 0, panel shows authenticated
  • gopro-api auth without GP_ACCESS_TOKEN → exit 2
  • gopro-api auth --json → structured JSON on stdout
  • gopro-api auth --tsv → tab-separated key/value rows
  • async with AsyncGoProClient() as client: await client.check_auth() returns GoProAuthStatus

Made with Cursor

himewel and others added 3 commits June 20, 2026 17:14
Expose check_auth() on API and client layers with GoProAuthStatus,
and add gopro-api auth with Rich, JSON, and TSV output plus exit codes.

Co-authored-by: Cursor <cursoragent@cursor.com>
Update CLI, configuration, architecture, and API reference pages for
gopro-api auth and the new GoProAuthStatus model.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added feature and removed feature labels Jun 20, 2026
Move duplicated token verification helpers into AuthStatusResolver and
use a context manager for the CLI spinner instead of manual dunder calls.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added feature and removed feature labels Jun 20, 2026
@himewel himewel merged commit 407b1b5 into main Jun 20, 2026
5 checks passed
@himewel himewel deleted the feat/auth-command branch June 20, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant