{
"error": "Not Found",
"message": "Image with the given slug not found."
},
{
"error": "Unauthorized",
"message": "Authentication token is missing or invalid."
}
Tasks
[ ] Create API endpoints to fetch an image.
[ ] Add resizing functionality.
[ ] Implement caching for images.
1.Resizing
[ ] Implement image resizing based on query parameters (width, height).
[ ] Validate resizing parameters.
2.Caching
[ ] Implement caching mechanism for fetched images.
[ ] Ensure cache invalidation for updated or deleted images.
Testing
Test GET /v1/api/images/
[ ] Test fetching an image with a valid slug and token.
[ ] Test fetching an image with an invalid slug.
[ ] Test unauthorized access without a token.
[ ] Test image resizing functionality.
[ ] Test caching mechanism for performance improvements.
Description
Creating an API endpoint for getting an image by slug, with resizing and caching.
Acceptance Criteria
Purpose
The purpose of this project is to allow users to access an image through a well-defined API.
Requirements
Read Images
Expected Outcome
Users should be able to get an image through a secure API with optional resizing, caching and appropriate responses.
API Endpoint
Request with resizing
Request without resizing
Response body (success)
Response body (error)
Tasks
[ ] Implement caching for images.
1.Resizing
[ ] Validate resizing parameters.
2.Caching
Testing
Test GET /v1/api/images/