#sdk #rest #time #continue #alfresco #spaghetti

alfresco-sdk

一些可能继续或停止开发成 Alfresco SDK 的测试。包含乱序代码,不应被任何人使用,这是个糟糕的东西。

4 个版本

0.1.3 2024 年 1 月 15 日
0.1.2 2024 年 1 月 9 日
0.1.1 2024 年 1 月 9 日
0.1.0 2024 年 1 月 8 日

#2 in #continue

40 每月下载次数

MIT 许可证

82KB
2K SLoC

Alfresco Rust SDK

这个工具目前正在开发中,以满足我的个人需求。虽然我打算最终让它涵盖 Alfresco 的所有 REST API 端点,但我并不打算投入大量精力彻底测试以确保其完整功能——至少目前不是。我的测试将限于当前项目所需的内容,重点是确保它适用于我的特定用例。因此,它可能不适用于不同的用例。

这是我第一次编写 Rust,所以它将 100% 包含乱序代码。

编译

如果你还没有安装,请下载 rust

curl -sSf https://static.rust-lang.org/rustup.sh | sh
// TODO: Document compilation steps

API 覆盖率

认证 API

  • 模型
  • 认证
    • POST /tickets
    • GET /tickets/-me-
    • DELETE /tickets/-me-
  • 文档

核心 API

  • TODO:正确处理状态码
  • 模型
  • 审计
    • GET /audit-applications
    • GET /audit-applications/{auditApplicationId}
    • PUT /audit-applications/{auditApplicationId}
    • GET /audit-applications/{auditApplicationId}/audit-entries
    • DELETE /audit-applications/{auditApplicationId}/audit-entries
    • GET /audit-applications/{auditApplicationId}/audit-entries/{auditEntryId}
    • DELETE /audit-applications/{auditApplicationId}/audit-entries/{auditEntryId}
    • GET /nodes/{nodeId}/audit-entries
  • 操作
    • GET /nodes/{nodeId}/action-definitions
    • GET /action-definitions
    • GET /action-definitions/{actionDefinitionId}
    • POST /action-executions
  • 活动
    • GET /people/{personId}/activities
  • 评论
    • GET /nodes/{nodeId}/comments
    • POST /nodes/{nodeId}/comments
    • PUT /nodes/{nodeId}/comments/{commentId}
    • DELETE /nodes/{nodeId}/comments/{commentId}
  • 下载
    • POST /downloads
    • GET /downloads/{downloadId}
    • DELETE /downloads/{downloadId}
  • 收藏
    • GET /people/{personId}/favorites
    • POST /people/{personId}/favorites
    • GET /people/{personId}/favorites/{favoriteId}
    • DELETE /people/{personId}/favorites/{favoriteId}
  • 网络
    • GET /people/{personId}/networks
    • GET /people/{personId}/networks/{networkId}
    • GET /networks/{networkId}
  • 节点
    • GET /nodes/{nodeId}
    • PUT /nodes/{nodeId}
    • DELETE /nodes/{nodeId}
    • GET /nodes/{nodeId}/children
    • POST /nodes/{nodeId}/children (文件上传)
    • POST /nodes/{nodeId}/children (通用节点创建)
    • POST /nodes/{nodeId}/copy
    • POST /nodes/{nodeId}/lock
    • POST /nodes/{nodeId}/unlock
    • POST /nodes/{nodeId}/move
    • GET /nodes/{nodeId}/content
    • PUT /nodes/{nodeId}/content
    • POST /nodes/{nodeId}/secondary-children
    • GET /nodes/{nodeId}/secondary-children
    • DELETE /nodes/{nodeId}/secondary-children/{childId}
    • GET /nodes/{nodeId}/parents
    • POST /nodes/{nodeId}/targets
    • GET /nodes/{nodeId}/targets
    • DELETE /nodes/{nodeId}/targets/{targetId}
    • GET /nodes/{nodeId}/sources
  • 人员
    • POST /people
    • GET /people
    • GET /people/{personId}
    • PUT /people/{personId}
    • POST /people/{personId}/request-password-reset
    • POST /people/{personId}/reset-password
    • GET /people/{personId}/avatar
    • PUT /people/{personId}/avatar
    • DELETE /people/{personId}/avatar
  • 群组
    • GET /people/{personId}/groups
    • GET /groups
    • POST /groups
    • GET /groups/{groupId}
    • PUT /groups/{groupId}
    • DELETE /groups/{groupId}
    • POST /groups/{groupId}/members
    • GET /groups/{groupId}/members
    • DELETE /groups/{groupId}/members/{groupMemberId}
  • 偏好设置
    • GET /people/{personId}/preferences
    • GET /people/{personId}/preferences/{preferenceName}
  • 探测
    • GET /probes/{probeId}
  • 查询
    • GET /queries/nodes
    • GET /queries/sites
    • GET /queries/people
  • 评分
    • GET /nodes/{nodeId}/ratings
    • POST /nodes/{nodeId}/ratings
    • GET /nodes/{nodeId}/ratings/{ratingId}
    • DELETE /nodes/{nodeId}/ratings/{ratingId}
  • 版本
    • POST /nodes/{nodeId}/renditions
    • GET /nodes/{nodeId}/renditions
    • GET /nodes/{nodeId}/renditions/{renditionId}
    • GET /nodes/{nodeId}/renditions/{renditionId}/content
  • 共享链接
    • POST /shared-links
    • GET /shared-links
    • GET /shared-links/{shareId}
    • DELETE /shared-links/{shareId}
    • GET /shared-links/{shareId}/content
    • GET /shared-links/{shareId}/renditions
    • GET /shared-links/{shareId}/renditions/{renditionId}
    • GET /shared-links/{shareId}/renditions/{renditionId}/content
    • POST /shared-links/{shareId}/email
  • 站点
    • GET /people/{personId}/site-membership-requests
    • POST /people/{personId}/site-membership-requests
    • GET /people/{personId}/site-membership-requests/{siteId}
    • PUT /people/{personId}/site-membership-requests/{siteId}
    • DELETE /people/{personId}/site-membership-requests/{siteId}
    • GET /people/{personId}/sites
    • GET /people/{personId}/sites/{siteId}
    • DELETE /people/{personId}/sites/{siteId}
    • GET /sites
    • POST /sites
    • GET /sites/{siteId}
    • PUT /sites/{siteId}
    • DELETE /sites/{siteId}
    • GET /sites/{siteId}/containers
    • GET /sites/{siteId}/containers/{containerId}
    • GET /sites-membership-requests
    • POST /sites/{siteId}/site-membership-requests/{inviteeId}/approve
    • POST /sites/{siteId}/site-membership-requests/{inviteeId}/reject
    • GET /sites/{siteId}/members
    • POST /sites/{siteId}/members
    • GET /sites/{siteId}/members/{personId}
    • PUT /sites/{siteId}/members/{personId}
    • DELETE /sites/{siteId}/members/{personId}
    • GET /sites/{siteId}/group-members
    • POST /sites/{siteId}/group-members
    • GET /sites/{siteId}/group-members/{groupId}
    • PUT /sites/{siteId}/group-members/{groupId}
    • DELETE /sites/{siteId}/group-members/{groupId}
  • 标签
    • GET /nodes/{nodeId}/tags
    • POST /nodes/{nodeId}/tags
    • DELETE /nodes/{nodeId}/tags/{tagId}
    • GET /tags
    • GET /tags/{tagId}
    • PUT /tags/{tagId}
  • 垃圾桶
    • GET /deleted-nodes
    • GET /deleted-nodes/{nodeId}
    • DELETE /deleted-nodes/{nodeId}
    • GET /deleted-nodes/{nodeId}/content
    • POST /deleted-nodes/{nodeId}/restore
    • GET /deleted-nodes/{nodeId}/renditions
    • GET /deleted-nodes/{nodeId}/renditions/{renditionId}
    • GET /deleted-nodes/{nodeId}/renditions/{renditionId}/content
  • 版本
    • GET /nodes/{nodeId}/versions
    • GET /nodes/{nodeId}/versions/{versionId}
    • DELETE /nodes/{nodeId}/versions/{versionId}
    • GET /nodes/{nodeId}/versions/{versionId}/content
    • POST /nodes/{nodeId}/versions/{versionId}/revert
    • POST /nodes/{nodeId}/versions/{versionId}/renditions
    • GET /nodes/{nodeId}/versions/{versionId}/renditions
    • GET /nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}
    • GET /nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/content

.env 配置

必须按照以下方式配置 .env 文件

ALFRESCO_URL=https://alfresco-base-url.com
ALFRESCO_USERNAME=username
ALFRESCO_PASSWORD=password

依赖项

~7–19MB
~275K SLoC