![](/img/trans.png)
[英]Cannot create and attach file to an item in Podio using pypodio (PODIO API client, Python)
[英]Podio: How do I add a comment to an item I just created using the API for Python 3?
對於Python 3,我似乎無法在API的任何地方找到Comment-class,就像文檔中提到的那樣。 我已經嘗試了多種不同的方式,這些方式可以作為我如何使用Item.create-和Item.update-方法添加注釋的猜測,但是我嘗試過的任何方法都沒有奏效。 那么,我該怎么做?
我都找不到所謂的“可注釋ID”或“可注釋類型”。 這些只是我要添加注釋的項目的項目ID和項目類型嗎? 作為一個新手程序員,文檔並不是很容易解釋。
提前致謝。
您能否參考https://developers.podio.com/doc/comments/add-comment-to-object-22340 ,它說明了向對象添加注釋。
例如:PodioComment :: create($ ref_type,$ ref_id,$ attributes = array()); ref_type可以是App或Item Ref_id id對應的id,例如app_id或itemid,其參數為{“ value”:要進行注釋,
“ external_id”:注釋的外部ID(如果有),
“ file_ids”:已上傳並應附加到此注釋的臨時文件,
[
{file_id},
.... (more file ids)
]
“ embed_id”:[可選]已使用“嵌入”區域中的“添加嵌入”操作創建的嵌入式鏈接的ID,
“ embed_url”:要附加的URL
}
作為回應,您將獲得comment_id。 如果要編輯現有注釋,請按照請求在請求中使用comment_id。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.