Last active
March 12, 2026 23:00
-
-
Save scripting/f30827d884f2c67ba987baab16615e94 to your computer and use it in GitHub Desktop.
This is backup for a blog post, see the first comment for a link to the post.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "idPost": 147, | |
| "idSite": 250464612, | |
| "title": "", | |
| "guid": "https://comments31.wordpress.com/2026/02/27/147/", | |
| "content": "<p>okay this should be a new reply to the spurlocks.</p>\n", | |
| "type": "post", | |
| "categories": [ | |
| "comment", | |
| "testing" | |
| ], | |
| "metadata": {}, | |
| "url": "https://comments31.wordpress.com/2026/02/27/147/", | |
| "urlShort": "https://wp.me/pgWVhO-2n", | |
| "whenCreated": "2026-02-27T17:30:53.000Z", | |
| "author": { | |
| "id": 21807, | |
| "username": "scripting", | |
| "name": "Dave Winer" | |
| }, | |
| "ctInbound": 0 | |
| }, | |
| { | |
| "idPost": 148, | |
| "idSite": 250464612, | |
| "title": "", | |
| "guid": "https://comments31.wordpress.com/2026/02/27/148/", | |
| "content": "<p>Here's yet another reply to the spurlox. And that's pretty nice.</p>\n<p>Oh yeah i'll tell you something i think you'll understand.</p>\n", | |
| "type": "post", | |
| "categories": [ | |
| "comment", | |
| "testing" | |
| ], | |
| "metadata": {}, | |
| "url": "https://comments31.wordpress.com/2026/02/27/148/", | |
| "urlShort": "https://wp.me/pgWVhO-2o", | |
| "whenCreated": "2026-02-27T17:56:08.000Z", | |
| "author": { | |
| "id": 21807, | |
| "username": "scripting", | |
| "name": "Dave Winer" | |
| }, | |
| "ctInbound": 0 | |
| }, | |
| { | |
| "idPost": 151, | |
| "idSite": 250464612, | |
| "title": "", | |
| "guid": "https://comments31.wordpress.com/2026/02/27/151/", | |
| "content": "<p>bing bong bing</p>\n", | |
| "type": "post", | |
| "categories": [ | |
| "comment", | |
| "testing" | |
| ], | |
| "metadata": {}, | |
| "url": "https://comments31.wordpress.com/2026/02/27/151/", | |
| "urlShort": "https://wp.me/pgWVhO-2r", | |
| "whenCreated": "2026-02-27T17:58:05.000Z", | |
| "author": { | |
| "id": 21807, | |
| "username": "scripting", | |
| "name": "Dave Winer" | |
| }, | |
| "ctInbound": 0 | |
| }, | |
| { | |
| "idPost": 152, | |
| "idSite": 250464612, | |
| "title": "", | |
| "guid": "https://comments31.wordpress.com/2026/03/05/152/", | |
| "content": "<p>This is a reply to the famous Spurlocks of RSS-Land piece. </p>\n<p>I am using it to test a new more cleanly designed startup function for the Reply Editor.</p>\n", | |
| "type": "post", | |
| "categories": [ | |
| "comment", | |
| "testing" | |
| ], | |
| "metadata": {}, | |
| "url": "https://comments31.wordpress.com/2026/03/05/152/", | |
| "urlShort": "https://wp.me/pgWVhO-2s", | |
| "whenCreated": "2026-03-05T14:59:57.000Z", | |
| "author": { | |
| "id": 21807, | |
| "username": "scripting", | |
| "name": "Dave Winer" | |
| }, | |
| "ctInbound": 0 | |
| }, | |
| { | |
| "idPost": 153, | |
| "idSite": 250464612, | |
| "title": "", | |
| "guid": "https://comments31.wordpress.com/2026/03/09/153/", | |
| "content": "<p>this is a comment on the spurlocks of rss-land post, yet another! why not?</p>\n", | |
| "type": "post", | |
| "categories": [ | |
| "comment", | |
| "testing" | |
| ], | |
| "metadata": {}, | |
| "url": "https://comments31.wordpress.com/2026/03/09/153/", | |
| "urlShort": "https://wp.me/pgWVhO-2t", | |
| "whenCreated": "2026-03-09T16:18:24.000Z", | |
| "author": { | |
| "id": 21807, | |
| "username": "scripting", | |
| "name": "Dave Winer" | |
| }, | |
| "ctInbound": 0 | |
| }, | |
| { | |
| "idPost": 154, | |
| "idSite": 250464612, | |
| "title": "", | |
| "guid": "https://comments31.wordpress.com/2026/03/09/154/", | |
| "content": "<p>I am convinced this might work, let's find out.</p>\n", | |
| "type": "post", | |
| "categories": [ | |
| "comment", | |
| "testing" | |
| ], | |
| "metadata": {}, | |
| "url": "https://comments31.wordpress.com/2026/03/09/154/", | |
| "urlShort": "https://wp.me/pgWVhO-2u", | |
| "whenCreated": "2026-03-09T22:04:21.000Z", | |
| "author": { | |
| "id": 21807, | |
| "username": "scripting", | |
| "name": "Dave Winer" | |
| }, | |
| "ctInbound": 0 | |
| }, | |
| { | |
| "idPost": 155, | |
| "idSite": 250464612, | |
| "title": "", | |
| "guid": "https://comments31.wordpress.com/2026/03/11/155/", | |
| "content": "<p>Always interested in another reply. Thank you very much.</p>\n", | |
| "type": "post", | |
| "categories": [ | |
| "comment", | |
| "testing" | |
| ], | |
| "metadata": {}, | |
| "url": "https://comments31.wordpress.com/2026/03/11/155/", | |
| "urlShort": "https://wp.me/pgWVhO-2v", | |
| "whenCreated": "2026-03-11T15:34:12.000Z", | |
| "author": { | |
| "id": 21807, | |
| "username": "scripting", | |
| "name": "Dave Winer" | |
| }, | |
| "ctInbound": 0 | |
| }, | |
| { | |
| "idPost": 156, | |
| "idSite": 250464612, | |
| "title": "A comment with a title", | |
| "guid": "https://comments31.wordpress.com/2026/03/11/a-comment-with-a-title/", | |
| "content": "<p>Titles are important when writing. Thank you very much.</p>\n", | |
| "type": "post", | |
| "categories": [ | |
| "comment", | |
| "testing" | |
| ], | |
| "metadata": {}, | |
| "url": "https://comments31.wordpress.com/2026/03/11/a-comment-with-a-title/", | |
| "urlShort": "https://wp.me/pgWVhO-2w", | |
| "whenCreated": "2026-03-11T15:36:18.000Z", | |
| "author": { | |
| "id": 21807, | |
| "username": "scripting", | |
| "name": "Dave Winer" | |
| }, | |
| "ctInbound": 0 | |
| }, | |
| { | |
| "idPost": 157, | |
| "idSite": 250464612, | |
| "title": "I am preparing to write a post with a title it should be a bit shorter than the previous title", | |
| "guid": "https://comments31.wordpress.com/2026/03/11/i-am-preparing-to-write-a-post-with-a-title-it-should-be-a-bit-shorter-than-the-previous-title/", | |
| "content": "<p>And now there is not very much to include here that isn't already said in the freaking title.</p>\n", | |
| "type": "post", | |
| "categories": [ | |
| "comment", | |
| "testing" | |
| ], | |
| "metadata": {}, | |
| "url": "https://comments31.wordpress.com/2026/03/11/i-am-preparing-to-write-a-post-with-a-title-it-should-be-a-bit-shorter-than-the-previous-title/", | |
| "urlShort": "https://wp.me/pgWVhO-2x", | |
| "whenCreated": "2026-03-11T15:46:38.000Z", | |
| "author": { | |
| "id": 21807, | |
| "username": "scripting", | |
| "name": "Dave Winer" | |
| }, | |
| "ctInbound": 0 | |
| } | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getPost (accessToken, idSite, idPost, callback) { //9/12/23 by DW | |
| Changes | |
| 9/12/23; 12:34:36 PM by DW | |
| Return an abbreviated post, not all the info that WordPress returns. | |
| const wp = wpcom (accessToken); | |
| const site = wp.site (idSite); | |
| const post = site.post (idPost); | |
| post.get (function (err, thePost) { //9/12/23 by DW | |
| if (err) { | |
| callback (err); | |
| } | |
| else { | |
| callback (undefined, convertPost (thePost)); | |
| } | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "ID": 157, | |
| "site_ID": 250464612, | |
| "author": { | |
| "ID": 21807, | |
| "login": "scripting", | |
| "email": false, | |
| "name": "Dave Winer", | |
| "first_name": "Dave", | |
| "last_name": "Winer", | |
| "nice_name": "scripting", | |
| "URL": "http://scripting.com/", | |
| "avatar_URL": "https://1.gravatar.com/avatar/d1f026c099fa51d2957b1612f11412cd08dd69c2bb160968068ed0f337b8918b?s=96&d=identicon&r=G", | |
| "profile_URL": "https://gravatar.com/scripting", | |
| "site_ID": 9969399 | |
| }, | |
| "date": "2026-03-11T11:46:38-04:00", | |
| "modified": "2026-03-11T11:46:38-04:00", | |
| "title": "I am preparing to write a post with a title it should be a bit shorter than the previous title", | |
| "URL": "https://comments31.wordpress.com/2026/03/11/i-am-preparing-to-write-a-post-with-a-title-it-should-be-a-bit-shorter-than-the-previous-title/", | |
| "short_URL": "https://wp.me/pgWVhO-2x", | |
| "content": "<p>And now there is not very much to include here that isn't already said in the freaking title.</p>\n", | |
| "excerpt": "<p>And now there is not very much to include here that isn't already said in the freaking title.</p>\n", | |
| "slug": "i-am-preparing-to-write-a-post-with-a-title-it-should-be-a-bit-shorter-than-the-previous-title", | |
| "guid": "https://comments31.wordpress.com/2026/03/11/i-am-preparing-to-write-a-post-with-a-title-it-should-be-a-bit-shorter-than-the-previous-title/", | |
| "status": "publish", | |
| "sticky": false, | |
| "password": "", | |
| "parent": false, | |
| "type": "post", | |
| "discussion": { | |
| "comments_open": true, | |
| "comment_status": "open", | |
| "pings_open": true, | |
| "ping_status": "open", | |
| "comment_count": 0 | |
| }, | |
| "likes_enabled": true, | |
| "sharing_enabled": true, | |
| "like_count": 0, | |
| "i_like": false, | |
| "is_reblogged": false, | |
| "is_following": false, | |
| "global_ID": "9c6335a979507e37366e96624e2e2f51", | |
| "featured_image": "", | |
| "post_thumbnail": null, | |
| "format": "standard", | |
| "geo": false, | |
| "menu_order": 0, | |
| "page_template": "", | |
| "publicize_URLs": [], | |
| "terms": { | |
| "category": { | |
| "comment": { | |
| "ID": 487, | |
| "name": "comment", | |
| "slug": "comment", | |
| "description": "", | |
| "post_count": 97, | |
| "parent": 0, | |
| "meta": { | |
| "links": { | |
| "self": "https://public-api.wordpress.com/rest/v1.1/sites/250464612/categories/slug:comment", | |
| "help": "https://public-api.wordpress.com/rest/v1.1/sites/250464612/categories/slug:comment/help", | |
| "site": "https://public-api.wordpress.com/rest/v1.1/sites/250464612" | |
| } | |
| } | |
| }, | |
| "testing": { | |
| "ID": 12, | |
| "name": "testing", | |
| "slug": "testing", | |
| "description": "", | |
| "post_count": 96, | |
| "parent": 0, | |
| "meta": { | |
| "links": { | |
| "self": "https://public-api.wordpress.com/rest/v1.1/sites/250464612/categories/slug:testing", | |
| "help": "https://public-api.wordpress.com/rest/v1.1/sites/250464612/categories/slug:testing/help", | |
| "site": "https://public-api.wordpress.com/rest/v1.1/sites/250464612" | |
| } | |
| } | |
| } | |
| }, | |
| "post_tag": {}, | |
| "post_format": {}, | |
| "mentions": {} | |
| }, | |
| "tags": {}, | |
| "categories": { | |
| "comment": { | |
| "ID": 487, | |
| "name": "comment", | |
| "slug": "comment", | |
| "description": "", | |
| "post_count": 97, | |
| "parent": 0, | |
| "meta": { | |
| "links": { | |
| "self": "https://public-api.wordpress.com/rest/v1.1/sites/250464612/categories/slug:comment", | |
| "help": "https://public-api.wordpress.com/rest/v1.1/sites/250464612/categories/slug:comment/help", | |
| "site": "https://public-api.wordpress.com/rest/v1.1/sites/250464612" | |
| } | |
| } | |
| }, | |
| "testing": { | |
| "ID": 12, | |
| "name": "testing", | |
| "slug": "testing", | |
| "description": "", | |
| "post_count": 96, | |
| "parent": 0, | |
| "meta": { | |
| "links": { | |
| "self": "https://public-api.wordpress.com/rest/v1.1/sites/250464612/categories/slug:testing", | |
| "help": "https://public-api.wordpress.com/rest/v1.1/sites/250464612/categories/slug:testing/help", | |
| "site": "https://public-api.wordpress.com/rest/v1.1/sites/250464612" | |
| } | |
| } | |
| } | |
| }, | |
| "attachments": {}, | |
| "attachment_count": 0, | |
| "metadata": [], | |
| "meta": { | |
| "links": { | |
| "self": "https://public-api.wordpress.com/rest/v1.1/sites/250464612/posts/157", | |
| "help": "https://public-api.wordpress.com/rest/v1.1/sites/250464612/posts/157/help", | |
| "site": "https://public-api.wordpress.com/rest/v1.1/sites/250464612", | |
| "replies": "https://public-api.wordpress.com/rest/v1.1/sites/250464612/posts/157/replies/", | |
| "likes": "https://public-api.wordpress.com/rest/v1.1/sites/250464612/posts/157/likes/" | |
| } | |
| }, | |
| "capabilities": { | |
| "publish_post": false, | |
| "delete_post": false, | |
| "edit_post": false | |
| }, | |
| "other_URLs": {} | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See this blog post for background.
http://scripting.com/2026/03/12/183605.html