docs: fix WRAPPERS.md replacement examples

- update_post wrapper example now uses correct parameters (post_text, post_path)
- create_comment wrapper example shows post_key parameter option
This commit is contained in:
Jezza Hehn 2026-04-18 02:59:16 +00:00
parent 7e0244d49c
commit 4f0c06771d

View file

@ -426,33 +426,36 @@ API.run_job('post.create', {
```python
# Wrapper
API.wrapped(update_post(
post_id="current-pk-same-as-sk",
new_post_text="New content"
post_text="New content",
post_path="my-post-slug",
parent_path="/music"
))
# Job
API.run_job('post.update', {
"pk": "current-pk-same-as-sk",
"sk": "current-pk-same-as-sk",
"newPostText": "New content"
"key": {
"pk": "post#my-post-slug",
"sk": "post#my-post-slug"
},
"postText": "New content"
})
```
**Example 3: Create Comment**
```python
# Wrapper
# Wrapper - Using post_key
API.wrapped(create_comment(
"My comment",
parent_path="/post-id"
post_key={"pk": "post#123", "sk": "post#123"}
))
# Job
API.run_job('comment.create', {
"commentText": "My comment",
"parent": {
"pk": "post-id",
"sk": "post-id"
"pk": "post#123",
"sk": "post#123"
}
})
```