很高兴听到您发现该包装器很有用。我们将很快自己发布一个您可能感兴趣的 PHP 库。敬请期待!
我认为,下面是一些伪代码来派生您正在寻找的层次结构。让我知道它是否有帮助。
获取/工作区
{
"data": [
{
"id": 1234,
"name": "Startup Inc"
}
]
}
获取 /workspaces/1234
{
"data": {
"id": 1234,
"name": "Startup Inc",
"is_organization": true,
...
}
}
因为 is_corganization 为真,所以我们可以继续...
获取 /organizations/organization-id/teams
{
"data": [
{
"id": 9876,
"name": "Ninja Team"
}
]
}
获取 /teams/9876/projects
{
"data": [
{
"id": 5678,
"name": "Stealth Project"
}
]
}
获取 /projects/5678/tasks
{
"data": [
{
"id": 8675309,
"name": "Top secret video"
}
]
}
获取 /tasks/8675309
{
"data": {
"id": 8675309,
"created_at": "2015-03-25T17:28:59.255Z",
"modified_at": "2015-05-15T03:13:28.754Z",
"name": "Top secret video",
"notes": "https://www.youtube.com/watch?v=6WTdTwcmxyo",
"completed": false,
... # All the task data
]
}
}