Post comments to Known with Micropub

Post comments to Known with Micropub

Usage

Post a comment

$ curl -X POST\
 -H 'Content-Type: application/x-www-form-urlencoded'\
 -H 'Authorization: Bearer deadbeefcafe'\
 -d 'h=annotation'\
 -d 'url=http://example.org/some-blog-post'\
 -d 'type=reply'\
 -d 'username=barryf'\
 -d 'userurl=http://example.org/~barryf'\
 -d 'userphoto=http://example.org/~barryf/avatar.jpg'\
 -d "content=There is a typo in paragraph 1 - 'Fou' should be 'Foo'"\
 'http://example.org/micropub/endpoint'
$ ./bin/shpub.php x annotation\
 -x url=http://example.org/some-blog-post\
 -x type=reply\
 -x username=barryf\
 -x userurl=http://example.org/~barryf\
 -x userphoto=http://example.org/~barryf/avatar.jpg\
 -x content="There is a typo in paragraph 1. 'Fou' should be 'Foo'"

Post a like

$ curl -X POST\
 -H 'Content-Type: application/x-www-form-urlencoded'\
 -H 'Authorization: Bearer deadbeefcafe'\
 -d 'h=annotation'\
 -d 'url=http://example.org/some-blog-post'\
 -d 'type=like'\
 -d 'username=barryf'\
 -d 'userurl=http://example.org/~barryf'\
 -d 'userphoto=http://example.org/~barryf/avatar.jpg'\
 'http://example.org/micropub/endpoint'

Post a RSVP

$ curl -X POST\ -H 'Content-Type: application/x-www-form-urlencoded'\ -H 'Authorization: Bearer deadbeefcafe'\ -d 'h=annotation'\ -d 'url=http://example.org/some-blog-post'\ -d 'type=like'\ -d 'username=barryf'\ -d 'userurl=http://example.org/~barryf'\ -d 'userphoto=http://example.org/~barryf/avatar.jpg'\ -d 'content=yes'\ 'http://example.org/micropub/endpoint'

Comments

Popular posts from this blog

A Tailwind CSS Preset for Laravel 5.5

Short and safe array iteration

PHPStorm's performance