Skip to content

Commit ddb4671

Browse files
committed
ics endpoints documentation
1 parent 962eef5 commit ddb4671

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

API_DOCS.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
- [Get Posts by Creator](#get-posts-by-creator)
1414
- [Update Post](#update-post)
1515
- [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)
1619

1720
---
1821

@@ -507,6 +510,79 @@ Error (500 Internal Server Error):
507510

508511
---
509512

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+
510586
## Data Models
511587

512588
### Post Object
@@ -635,3 +711,5 @@ For validation errors:
635711
| GET | `/api/v1/users/{creatorId}/posts` | Get posts by creator |
636712
| PATCH | `/api/v1/users/{creatorId}/{postId}` | Update post |
637713
| 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

Comments
 (0)