Library (files.go):
- Types: FileEntry, FolderEntry, ProjectFilesResponse.
- GetProjectFiles, GetTaskFiles, GetFile, UploadProjectFile (POST .../upload),
AttachFilesToTask (POST form files=), UploadTaskFile (upload+attach),
DetachTaskFile (DELETE ?fileid=), RenameFile, DeleteFiles, DownloadFile.
- Helpers: FileEntryNumericID, FileEntryTitle, SafeLocalFileName, projectIDFromTaskMap.
http.go: putJSON for JSON PUT bodies.
CLI: oo projects files {list,upload,download,rename,delete}, oo tasks files
{list,upload,detach}; projects_files.go + tasks_files.go.
Tests: files_integration_test.go (live), files_test.go + testdata (decode).
Docs: CHANGELOG 0.6.0, README, AGENTS.md, cmd/oo/main.go tree.
Made-with: Cursor
26 lines
445 B
JSON
26 lines
445 B
JSON
{
|
|
"count": 1,
|
|
"status": 0,
|
|
"statusCode": 200,
|
|
"response": {
|
|
"folders": [
|
|
{
|
|
"id": 10,
|
|
"title": "Subfolder",
|
|
"filesCount": 0,
|
|
"foldersCount": 0
|
|
}
|
|
],
|
|
"files": [
|
|
{
|
|
"id": 100,
|
|
"title": "readme.txt",
|
|
"fileExst": ".txt",
|
|
"contentLength": "12",
|
|
"fileType": 2,
|
|
"viewUrl": "/Products/Files/DocEditor.aspx?fileid=100"
|
|
}
|
|
]
|
|
}
|
|
}
|