accept JSON micropub requests and checkins #1677

Merged
merged 3 commits into from Mar 30, 2017

Projects

None yet

4 participants

@aaronpk
Contributor
aaronpk commented Mar 27, 2017 edited

Here's what I fixed or added:

With these changes, Known now passes the basic Micropub JSON syntax tests at https://micropub.rocks: 200, 201 and 203. The others will require more substantial changes to how Known stores posts. This is essentially just a syntax transformation from JSON to how Known already handles form-encoded Micropub requests.

This also adds support for handling checkins that OwnYourSwarm sends in JSON format.

Here's why I did it:

Some Micropub clients, such as https://ownyourswarm.p3k.io and https://ownyourgram.com send JSON requests in addition to or instead of form-encoded requests.

aaronpk added some commits Mar 27, 2017
@aaronpk aaronpk accept JSON micropub requests
Passes the basic Micropub JSON syntax tests at micropub.rocks: 200, 201 and 203. The others will require more substantial changes to how Known stores posts. This is essentially just a syntax transformation from JSON to how Known already handles form-encoded Micropub requests.
dec2125
@aaronpk aaronpk support checkins in JSON requests
Micropub checkins are sent with a `checkin` parameter containing an `h-card` describing the venue being checked in to. This adds support for mapping the checkin properties into the internal Known properties.
7061d71
@aaronpk aaronpk changed the title from accept JSON micropub requests to accept JSON micropub requests and checkins Mar 27, 2017
@aaronpk aaronpk include checkin photos
if the checkin includes a photo, download the photo and include an img tag in the checkin HTML. this seems to mirror how the existing checkin micropub plugin worked.
93dbe17
@benwerd
Member
benwerd commented Mar 28, 2017

This.
Is.
So.
Cool.

@chrisaldrich
Contributor

@aaronpk, (What @benwerd said)^2

@cleverdevil
Contributor

Agreed! Such a great start.

@aaronpk
Contributor
aaronpk commented Mar 28, 2017

Need anything else from me before merging this?

@benwerd benwerd merged commit 6298b50 into idno:master Mar 30, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@benwerd
Member
benwerd commented Mar 30, 2017

@aaronpk No! :) Thank you for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment