API PUT リクエストによる投稿の更新

API Docs にわずかな不一致があります。

ドキュメントでは、以下の通り記載されています:PUT /posts/{id}.json にペイロード

Content type: application/json

{
  "post[raw]": "string",
  "post[raw_old]": "string",
  "post[edit_reason]": "string",
  "post[cooked]": "string"
}

しかし、これは PUT /posts/{id} と Content-Type: application/x-www-form-urlencoded の場合にのみ機能します。

PUT /posts/{id}.json の正しいペイロードは以下の通りです:

Content type: application/json

{
  "post": {
      "raw": "string",
      "raw_old": "string",
      "edit_reason": "string",
      "cooked": "string"
    }
}

raw パラメータのみで投稿全体を置換することが可能です。