- Move all files from bruno-yaml/* to bruno/* - Maintains existing directory structure within categories - Updates bruno/user/auth files with OAuth2 refresh token flow - Updates bruno/user/profile files for user profile management - Adds bruno/dashboard/ directory with dashboard API tests - Preserves all existing test scenarios and OpenCollection YAML format - No functional changes - file reorganization only
59 lines
1.7 KiB
YAML
59 lines
1.7 KiB
YAML
info:
|
|
name: Get Reading Stats Date Range
|
|
type: http
|
|
seq: 3
|
|
http:
|
|
method: GET
|
|
url: '{{base_url}}/api/analytics/reading-stats?start_date=2024-01-01&end_date=2024-01-31'
|
|
auth: inherit
|
|
body:
|
|
type: none
|
|
runtime:
|
|
scripts:
|
|
- type: tests
|
|
code: "test(\"status must be 200\", function() {\n expect(res.status).to.eql(200);"
|
|
|
|
docs: |-
|
|
Get reading statistics for a specific date range.
|
|
|
|
**Endpoint**: GET /api/analytics/reading-stats
|
|
**Auth**: Required (Bearer token)
|
|
|
|
## Query Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
|-----------|------|-----------|-------------|
|
|
| start_date | string | No | Start date (ISO 8601 format, default: 30 days ago) |
|
|
| end_date | string | No | End date (ISO 8601 format, default: today) |
|
|
|
|
## Response Fields
|
|
|
|
| Field | Type | Description |
|
|
|-------|------|-------------|
|
|
| total_books_read | int | Total books completed in range |
|
|
| total_pages_read | int | Total pages read in range |
|
|
| total_reading_time_minutes | int | Total reading time in minutes |
|
|
| completion_rate | float | Percentage of books completed (0-1) |
|
|
| daily_reading_minutes | array | Daily reading time per day |
|
|
| daily_reading_minutes[].date | string | Date (ISO 8601) |
|
|
| daily_reading_minutes[].minutes | int | Minutes read on that date |
|
|
|
|
## Example Request
|
|
|
|
```
|
|
GET /api/analytics/reading-stats?start_date=2024-01-01&end_date=2024-01-31
|
|
```
|
|
|
|
## Example Response
|
|
|
|
```json
|
|
{
|
|
"total_books_read": 2,
|
|
"total_pages_read": 450,
|
|
"total_reading_time_minutes": 720,
|
|
"completion_rate": 0.85,
|
|
"daily_reading_minutes": [
|
|
{
|
|
"date": "2024-01-01",
|
|
"minutes": 30
|