Files
bookhoard/bruno/ebooks/Get Ebook Ratings.bru
T
john-okeefe 8db5939892 refactor: standardize Bruno API requests with bruToJsonV2 format
- Convert all JSON tests to JavaScript functions for bruToJsonV2 compatibility
- Update authentication to use 'inherit' instead of manual headers
- Fix hardcoded URLs to use {{base_url}} variables
- Standardize variable syntax from {{ _.var }} to {{var}}
- Add comprehensive API documentation to all requests
- Update environment variables with missing required fields
- Apply consistent structure: meta, http method, headers, tests, vars, settings, docs
- Enhanced validation with proper error handling and field checks
2026-01-28 20:13:56 -05:00

44 lines
980 B
Plaintext

meta {
name: Get Ebook Ratings
type: http
seq: 9
}
get {
url: {{base_url}}/api/ebooks/{{ebookid}}/ratings
body: none
auth: inherit
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Get Ebook Ratings
Retrieves all ratings for a specific ebook, including usernames.
**Authentication:** Required (Bearer token)
**Path Parameters:**
- `id` (string): Ebook UUID
**Response:** Array of rating objects
- `id` (string): Rating UUID
- `ebook_id` (string): Ebook UUID
- `user_id` (string): User UUID
- `rating` (number): Rating value (1-10, where odd numbers = half-stars)
- `created_at` (string): Creation timestamp
- `updated_at` (string): Last update timestamp
- `username` (string): Username of the rating user
**Rating Conversion:**
- Frontend displays: 1-5 stars with half-star precision
- Backend stores: 1-10 (where 1,3,5,7,9 = half-stars)
**Error Responses:**
- 401: Invalid authentication
- 404: Ebook not found
}