|
13 | 13 | - [Get Posts by Creator](#get-posts-by-creator) |
14 | 14 | - [Update Post](#update-post) |
15 | 15 | - [Delete Post](#delete-post) |
| 16 | +- [ICS Files](#ics-files) |
| 17 | + - [Get All Available ICS Files](#get-all-available-ics-files) |
| 18 | + - [Get ICS File](#get-ics-file) |
16 | 19 |
|
17 | 20 | --- |
18 | 21 |
|
@@ -507,6 +510,79 @@ Error (500 Internal Server Error): |
507 | 510 |
|
508 | 511 | --- |
509 | 512 |
|
| 513 | +## ICS Files |
| 514 | + |
| 515 | +### Get All Available ICS Files |
| 516 | + |
| 517 | +**Endpoint:** `GET /api/v1/ics` |
| 518 | + |
| 519 | +**Description:** Retrieves a list of all available ICS (iCalendar) file names stored on the server. |
| 520 | + |
| 521 | +**Authentication:** Not required |
| 522 | + |
| 523 | +**Request:** |
| 524 | +```http |
| 525 | +GET /api/v1/ics |
| 526 | +``` |
| 527 | + |
| 528 | +**Response:** |
| 529 | + |
| 530 | +Success (200 OK): |
| 531 | +```json |
| 532 | +{ |
| 533 | + "filenames": [ |
| 534 | + "A23a_5.ics", |
| 535 | + "A23b_5.ics", |
| 536 | + "A24a_3.ics", |
| 537 | + "B23a_5.ics", |
| 538 | + "I23a_5.ics", |
| 539 | + "T23a_5.ics", |
| 540 | + "W23a_5.ics" |
| 541 | + ] |
| 542 | +} |
| 543 | +``` |
| 544 | + |
| 545 | +Error (500 Internal Server Error): |
| 546 | +``` |
| 547 | +Something went wrong while reading the storage dir |
| 548 | +``` |
| 549 | + |
| 550 | +--- |
| 551 | + |
| 552 | +### Get ICS File |
| 553 | + |
| 554 | +**Endpoint:** `GET /api/v1/ics/{fileName}` |
| 555 | + |
| 556 | +**Description:** Downloads a specific ICS (iCalendar) file by its filename. |
| 557 | + |
| 558 | +**Authentication:** Not required |
| 559 | + |
| 560 | +**Path Parameters:** |
| 561 | +- `fileName` (string, required): The name of the ICS file to download (e.g., "A23a_5.ics") |
| 562 | + |
| 563 | +**Request:** |
| 564 | +```http |
| 565 | +GET /api/v1/ics/A23a_5.ics |
| 566 | +``` |
| 567 | + |
| 568 | +**Response:** |
| 569 | + |
| 570 | +Success (200 OK): |
| 571 | +- **Content-Type:** `application/octet-stream` |
| 572 | +- **Body:** The ICS file content |
| 573 | + |
| 574 | +Error (400 Bad Request): |
| 575 | +``` |
| 576 | +Invalid request without fileName |
| 577 | +``` |
| 578 | + |
| 579 | +Error (404 Not Found): |
| 580 | +``` |
| 581 | +File does not exist |
| 582 | +``` |
| 583 | + |
| 584 | +--- |
| 585 | + |
510 | 586 | ## Data Models |
511 | 587 |
|
512 | 588 | ### Post Object |
@@ -635,3 +711,5 @@ For validation errors: |
635 | 711 | | GET | `/api/v1/users/{creatorId}/posts` | Get posts by creator | |
636 | 712 | | PATCH | `/api/v1/users/{creatorId}/{postId}` | Update post | |
637 | 713 | | DELETE | `/api/v1/users/{creatorId}/{postId}` | Delete post | |
| 714 | +| GET | `/api/v1/ics` | Get all available ICS file names | |
| 715 | +| GET | `/api/v1/ics/{fileName}` | Download specific ICS file | |
0 commit comments