New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accept JSON micropub requests and checkins #1677

Merged
merged 3 commits into from Mar 30, 2017

Conversation

Projects
None yet
4 participants
@aaronpk
Contributor

aaronpk commented Mar 27, 2017

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

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.
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.

@aaronpk aaronpk changed the title from accept JSON micropub requests to accept JSON micropub requests and checkins Mar 27, 2017

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.
@benwerd

This comment has been minimized.

Show comment
Hide comment
@benwerd

benwerd Mar 28, 2017

Member

This.
Is.
So.
Cool.

Member

benwerd commented Mar 28, 2017

This.
Is.
So.
Cool.

@chrisaldrich

This comment has been minimized.

Show comment
Hide comment
@chrisaldrich

chrisaldrich Mar 28, 2017

Contributor

@aaronpk, (What @benwerd said)^2

Contributor

chrisaldrich commented Mar 28, 2017

@aaronpk, (What @benwerd said)^2

@cleverdevil

This comment has been minimized.

Show comment
Hide comment
@cleverdevil

cleverdevil Mar 28, 2017

Contributor

Agreed! Such a great start.

Contributor

cleverdevil commented Mar 28, 2017

Agreed! Such a great start.

@aaronpk

This comment has been minimized.

Show comment
Hide comment
@aaronpk

aaronpk Mar 28, 2017

Contributor

Need anything else from me before merging this?

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

This comment has been minimized.

Show comment
Hide comment
@benwerd

benwerd Mar 30, 2017

Member

@aaronpk No! :) Thank you for this!

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