Skip to content

Commit 05b7ee5

Browse files
committed
Update README
1 parent ee35717 commit 05b7ee5

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

wp_rs_cli/README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,27 @@ wp_rs_cli --help
3737
### fetch-post examples
3838

3939
```bash
40-
# WordPress.com (Bearer)
40+
# WordPress.com (Bearer) by post URL (auto derive site)
41+
wp_rs_cli fetch-post \
42+
--url https://example.wordpress.com/2024/07/01/my-post \
43+
--bearer "$WP_BEARER_TOKEN" \
44+
--pretty
45+
46+
# WordPress.com (Bearer) by explicit site and post id
4147
wp_rs_cli fetch-post \
4248
--wpcom-site example.wordpress.com \
4349
--post-id 123 \
4450
--bearer "$WP_BEARER_TOKEN" \
4551
--pretty
4652

47-
# WordPress.org/Jetpack (Application Password)
53+
# WordPress.org/Jetpack (Application Password) by post URL (auto-discover /wp-json)
54+
wp_rs_cli fetch-post \
55+
--url https://yoursite.com/blog/2024/07/01/my-post \
56+
--username "$WP_USERNAME" \
57+
--password "$WP_APP_PASSWORD" \
58+
--pretty
59+
60+
# WordPress.org/Jetpack (Application Password) by explicit API root and post id
4861
wp_rs_cli fetch-post \
4962
--api-root https://yoursite.com/wp-json \
5063
--post-id 123 \

0 commit comments

Comments
 (0)