diff options
| author | Michael Tews <michael@tews.dev> | 2026-02-28 21:31:04 +0100 |
|---|---|---|
| committer | Michael Tews <michael@tews.dev> | 2026-03-12 15:35:53 +0100 |
| commit | 2673b7d003e853bf7bc7ffc4ba829d9d9d4e4b15 (patch) | |
| tree | 1f043611001f0f795b37ca9015eb8aff932d9245 /backend/studip/responses.go | |
| parent | ce94f2d69a5f1aab1fc8fc2947f0a6cfd81bb4d1 (diff) | |
feat: write support
Signed-off-by: Michael Tews <michael@tews.dev>
Diffstat (limited to 'backend/studip/responses.go')
| -rw-r--r-- | backend/studip/responses.go | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/backend/studip/responses.go b/backend/studip/responses.go new file mode 100644 index 0000000..d328ec9 --- /dev/null +++ b/backend/studip/responses.go @@ -0,0 +1,86 @@ +package studip + +import "time" + +type StudIPFolders struct { + Meta struct { + Page struct { + Offset int `json:"offset"` + Limit int `json:"limit"` + Total int `json:"total"` + } `json:"page"` + } `json:"meta"` + Data []StudIPFoldersData `json:"data"` +} + +type StudIPFoldersData struct { + Type string `json:"type"` + ID string `json:"id"` + Attributes struct { + FolderType string `json:"folder-type"` + Name string `json:"name"` + Description string `json:"description"` + Mkdate time.Time `json:"mkdate"` + Chdate time.Time `json:"chdate"` + IsVisible bool `json:"is-visible"` + IsReadable bool `json:"is-readable"` + IsWritable bool `json:"is-writable"` + IsEditable bool `json:"is-editable"` + IsEmpty bool `json:"is-empty"` + IsSubfolderAllowed bool `json:"is-subfolder-allowed"` + } `json:"attributes"` + Relationships struct { + Parent struct { + Data struct { + Type string `json:"type"` + ID string `json:"id"` + } `json:"data"` + } `json:"parent"` + } `json:"relationships"` +} + +type StudIPFiles struct { + Meta struct { + Page struct { + Offset int `json:"offset"` + Limit int `json:"limit"` + Total int `json:"total"` + } `json:"page"` + } `json:"meta"` + Links struct { + First string `json:"first"` + Last string `json:"last"` + } `json:"links"` + Data []struct { + Type string `json:"type"` + ID string `json:"id"` + Attributes struct { + Name string `json:"name"` + Description string `json:"description"` + Mkdate time.Time `json:"mkdate"` + Chdate time.Time `json:"chdate"` + Downloads int `json:"downloads"` + Filesize int64 `json:"filesize"` + MimeType string `json:"mime-type"` + IsReadable bool `json:"is-readable"` + IsDownloadable bool `json:"is-downloadable"` + IsEditable bool `json:"is-editable"` + IsWritable bool `json:"is-writable"` + } `json:"attributes"` + } `json:"data"` +} + +type StudIPCourses struct { + Data struct { + Type string `json:"type"` + ID string `json:"id"` + Attributes struct { + CourseNumber string `json:"course-number"` + Title string `json:"title"` + CourseType int `json:"course-type"` + CourseTypeText string `json:"course-type-text"` + Description string `json:"description"` + Dates string `json:"dates"` + } `json:"attributes"` + } `json:"data"` +} |
