File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -37,14 +37,27 @@ wp_rs_cli --help
37
37
### fetch-post examples
38
38
39
39
``` 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
41
47
wp_rs_cli fetch-post \
42
48
--wpcom-site example.wordpress.com \
43
49
--post-id 123 \
44
50
--bearer " $WP_BEARER_TOKEN " \
45
51
--pretty
46
52
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
48
61
wp_rs_cli fetch-post \
49
62
--api-root https://yoursite.com/wp-json \
50
63
--post-id 123 \
You can’t perform that action at this time.
0 commit comments