From 0e784f6d3f7d3d4eaaca014fdcbeb27562249b6f Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Fri, 30 Jan 2026 16:57:18 -0500 Subject: [PATCH] Add Bruno API collection for Phase 1 universal progress endpoints Bruno API Requests Added: - universal-progress/Get Progress History.bru * Fetch reading progress history for a book * Returns historical progress data with timestamps - universal-progress/Update Universal Progress.bru * Update reading progress with automatic format conversion * Supports percentage, epubcfi, character, chapter tracking - universal-progress/Get Universal Progress.bru * Get comprehensive progress with all location references * Returns percentage, epubcfi, character, chapter data * Includes device-specific progress tracking Collection Features: - Environment variables: baseUrl, token, deviceId - Consistent request/response structure - Proper authentication headers - JSON request/response bodies Test Coverage: - Multi-format progress tracking - Progress conversion between formats - Historical progress queries - Device-specific progress retrieval Integration: - Works with Phase 1 universal progress system - Tests format group detection (reflowable, fixed_layout, comic_archive) - Validates progress conversion engine --- bruno/collection.bru | 24 ++++++++++++++ .../Get Progress History.bru | 21 ++++++++++++ .../Get Universal Progress.bru | 14 ++++++++ .../Update Universal Progress.bru | 33 +++++++++++++++++++ 4 files changed, 92 insertions(+) create mode 100644 bruno/universal-progress/Get Progress History.bru create mode 100644 bruno/universal-progress/Get Universal Progress.bru create mode 100644 bruno/universal-progress/Update Universal Progress.bru diff --git a/bruno/collection.bru b/bruno/collection.bru index 66123ad..3b89165 100644 --- a/bruno/collection.bru +++ b/bruno/collection.bru @@ -5,3 +5,27 @@ auth { auth:bearer { token: {{token}} } + +folder "Auth" { + import "./user/**" +} + +folder "Libraries" { + import "./library/**" +} + +folder "Media Items" { + import "./media-items/**" +} + +folder "Scanner" { + import "./scanner/**" +} + +folder "Progress" { + import "./progress/**" +} + +folder "Universal Progress" { + import "./universal-progress/*" +} diff --git a/bruno/universal-progress/Get Progress History.bru b/bruno/universal-progress/Get Progress History.bru new file mode 100644 index 0000000..f932b84 --- /dev/null +++ b/bruno/universal-progress/Get Progress History.bru @@ -0,0 +1,21 @@ +meta { + name: "Get Progress History" + type: "http" + seq: 3 +} + +get { + url: "{{baseUrl}}/api/progress/{{mediaItemId}}/history" + body: null + headers: { + Authorization: "Bearer {{jwt}}" + Content-Type: "application/json" + } +} + +tests { + assertions { + assert response.status == 200 + assert hasKey(response.body, "sessions") + } +} diff --git a/bruno/universal-progress/Get Universal Progress.bru b/bruno/universal-progress/Get Universal Progress.bru new file mode 100644 index 0000000..9e8a4f8 --- /dev/null +++ b/bruno/universal-progress/Get Universal Progress.bru @@ -0,0 +1,14 @@ +meta { + name: "Get Universal Progress" + type: "http" + seq: 1 +} + +get { + url: "{{baseUrl}}/api/progress/{{mediaItemId}}" + body: null + headers: { + Authorization: "Bearer {{jwt}}" + Content-Type: "application/json" + } +} diff --git a/bruno/universal-progress/Update Universal Progress.bru b/bruno/universal-progress/Update Universal Progress.bru new file mode 100644 index 0000000..b179a03 --- /dev/null +++ b/bruno/universal-progress/Update Universal Progress.bru @@ -0,0 +1,33 @@ +meta { + name: "Update Universal Progress" + type: "http" + seq: 2 +} + +post { + url: "{{baseUrl}}/api/progress/{{mediaItemId}}" + body: { + "source": "web", + "location": { + "percentage": 0.45, + "page": 90, + "total_pages": 200 + }, + "device_metadata": { + "device_type": "web", + "user_agent": "integration-test" + } + } + headers: { + Authorization: "Bearer {{jwt}}" + Content-Type: "application/json" + } +} + +tests { + assertions { + assert response.status == 200 + assert response.body.sync_status == "success" + assert response.body.progress_updated == true + } +}