oDesk API 没有给出具体示例来说明如何将里程碑参数用于 send_client_offer 函数。我尝试过使用 python 字典,但这样做时会收到错误消息。
该文档将里程碑描述为一个数组:
milestones[0][$key]`, ..., `milestones[N][$key]
但目前尚不清楚应该如何在 python 库中实现它:
我试过了:
milestones = [{"milestone_description":"descrip", "deposit_amount":1,
"due_date":"03-15-2015"},{"milestone_description":"descrip2",
"deposit_amount":5, "due_date":"03-20-2015"}]
输出:
HTTP400BadRequestError: HTTP Error 400: Code 1: FP2 offers should have at least one milestone defined.