- Introduced a new Lua-based REST API for darktable, allowing external applications to interact with the darktable library. - Implemented core functionalities including image listing, retrieval, and preview serving. - Added support for OAuth 2.0 authentication with token generation. - Created a simple HTTP router to handle API requests. - Included JSON encoding/decoding utilities for API responses. - Developed a script to launch the API server alongside darktable, ensuring seamless integration. - Added necessary configuration and setup for the API server, including CORS support and error handling.
32 lines
457 B
Plaintext
32 lines
457 B
Plaintext
meta {
|
|
name: Get Image (Not Found)
|
|
type: http
|
|
seq: 3
|
|
}
|
|
|
|
get {
|
|
url: {{baseUrl}}/api/v1/images/999999
|
|
body: none
|
|
auth: bearer
|
|
}
|
|
|
|
auth:bearer {
|
|
token: {{accessToken}}
|
|
}
|
|
|
|
tests {
|
|
test("returns 404", function() {
|
|
expect(res.status).to.equal(404);
|
|
});
|
|
|
|
test("error is not_found", function() {
|
|
expect(res.body.error).to.equal("not_found");
|
|
});
|
|
}
|
|
|
|
docs {
|
|
## Get Image — Not Found
|
|
|
|
Verifies a non-existent image ID returns 404.
|
|
}
|