mirror of
https://github.com/zadam/trilium.git
synced 2024-11-13 03:04:27 +08:00
94 lines
2 KiB
HTTP
94 lines
2 KiB
HTTP
GET {{triliumHost}}/etapi/inbox/2022-01-01
|
|
|
|
> {%
|
|
client.test("Request executed successfully", function() {
|
|
client.assert(response.status === 200, "Response status is not 200");
|
|
});
|
|
%}
|
|
|
|
###
|
|
|
|
GET {{triliumHost}}/etapi/date/2022-01-01
|
|
|
|
> {%
|
|
client.test("Request executed successfully", function() {
|
|
client.assert(response.status === 200, "Response status is not 200");
|
|
});
|
|
%}
|
|
|
|
###
|
|
|
|
GET {{triliumHost}}/etapi/date/2022-1
|
|
|
|
> {%
|
|
client.test("Correct error handling", function() {
|
|
client.assert(response.status === 400, "Response status is not 400");
|
|
client.assert(response.body.code == "DATE_INVALID");
|
|
});
|
|
%}
|
|
|
|
###
|
|
|
|
GET {{triliumHost}}/etapi/week/2022-01-01
|
|
|
|
> {%
|
|
client.test("Request executed successfully", function() {
|
|
client.assert(response.status === 200, "Response status is not 200");
|
|
});
|
|
%}
|
|
|
|
###
|
|
|
|
GET {{triliumHost}}/etapi/week/2022-1
|
|
|
|
> {%
|
|
client.test("Correct error handling", function() {
|
|
client.assert(response.status === 400, "Response status is not 400");
|
|
client.assert(response.body.code == "DATE_INVALID");
|
|
});
|
|
%}
|
|
|
|
###
|
|
|
|
GET {{triliumHost}}/etapi/month/2022-01
|
|
|
|
> {%
|
|
client.test("Request executed successfully", function() {
|
|
client.assert(response.status === 200, "Response status is not 200");
|
|
});
|
|
%}
|
|
|
|
###
|
|
|
|
GET {{triliumHost}}/etapi/month/2022-1
|
|
|
|
> {%
|
|
client.test("Correct error handling", function() {
|
|
client.assert(response.status === 400, "Response status is not 400");
|
|
client.assert(response.body.code == "MONTH_INVALID");
|
|
});
|
|
%}
|
|
|
|
###
|
|
|
|
GET {{triliumHost}}/etapi/year/2022
|
|
|
|
> {%
|
|
client.test("Request executed successfully", function() {
|
|
client.assert(response.status === 200, "Response status is not 200");
|
|
});
|
|
%}
|
|
|
|
###
|
|
|
|
GET {{triliumHost}}/etapi/year/202
|
|
|
|
> {%
|
|
client.test("Correct error handling", function() {
|
|
client.assert(response.status === 400, "Response status is not 400");
|
|
client.assert(response.body.code == "YEAR_INVALID");
|
|
});
|
|
%}
|
|
|
|
###
|
|
|