Files
bookhoard/bruno/ebooks/Get Ebook Ratings.bru
T
john-okeefe 6ed69005b5 refactor(bruno): standardize all variables to snake_case naming convention
Standardize all Bruno environment variables to use snake_case convention
(aligned with Go naming practices) and remove duplicate camelCase variants.

Changes:
- Environment file cleanup:
  - Remove: baseUrl, ebookid, fakebookid, libraryId, mediaItemId, isVisible, refreshToken
  - Standardize: fakebookid → fake_book_id, isVisible → is_visible, refreshToken → refresh_token
  - All variables now use consistent snake_case format

- Update all Bruno requests to use standardized variables:
  - ebooks: {{ebookid}} → {{ebook_id}}
  - library: {{libraryId}} → {{library_id}}
  - media-items: {{mediaItemId}} → {{media_item_id}}
  - visibility: {{isVisible}} → {{is_visible}}
  - auth: {{refreshToken}} → {{refresh_token}}

Benefits:
- Single source of truth for each variable
- Consistent with Go naming conventions
- No ambiguity about which variable name to use
- Cleaner, more maintainable codebase
2026-01-29 10:06:00 -05:00

44 lines
981 B
Plaintext

meta {
name: Get Ebook Ratings
type: http
seq: 9
}
get {
url: {{base_url}}/api/ebooks/{{ebook_id}}/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
}