{ "meta": { "name": "Get Reading Stats", "type": "http", "event": [ { "listen": "test", "script": { "exec": [ "// Test reading stats response", "if (response.status === 200) {", " tests['Reading stats loaded'] = true;", " const body = JSON.parse(response.body);", " tests['Has total_books_read'] = body.total_books_read !== undefined;", " tests['Has total_pages_read'] = body.total_pages_read !== undefined;", " tests['Has total_reading_time_minutes'] = body.total_reading_time_minutes !== undefined;", " tests['Has completion_rate'] = body.completion_rate !== undefined;", " tests['Has daily_reading_minutes array'] = Array.isArray(body.daily_reading_minutes);", "} else {", " tests['Reading stats failed'] = false;", "}" ] } } ] }, "req": { "url": "{{baseUrl}}/api/analytics/reading-stats", "method": "GET", "headers": { "Authorization": "Bearer {{authToken}}" } } }