Skip to content
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

micropub API for bridgy publish #796

Open
snarfed opened this issue Feb 26, 2018 · 4 comments
Open

micropub API for bridgy publish #796

snarfed opened this issue Feb 26, 2018 · 4 comments
Labels

Comments

@snarfed
Copy link
Owner

@snarfed snarfed commented Feb 26, 2018

when i started building bridgy publish in early 2014, micropub was just being born, so i overloaded webmention to be the trigger mechanism instead.

now that micropub is mature, we should support it too. some discussion on IRC. @EdwardHinkle might be interested!

@snarfed

This comment has been minimized.

Copy link
Owner Author

@snarfed snarfed commented Feb 26, 2018

for anyone looking into implementing this, you can basically take publish.py as a template, copy it to a new micropub.py file, drop all the interactive, HTTP fetching, and mf2 parsing code (_find_source() through TwitterSendHandler), and replace the mf2 parts in the rest with micropub handling.

auth is probably the one big open question. for a first pass, i'd recommend punting on it. just use the silo access token directly as the micropub. users could ask me for their token, or they can mint their own, per silo.

i'd also recommend punting on update, delete, media endpoint, and querying source content, at least to start.

@tantek

This comment has been minimized.

Copy link
Contributor

@tantek tantek commented Feb 27, 2018

The issue name “micropub for bridgy publish” sounded a lot like what I was looking for in https://chat.indieweb.org/dev/2018-02-26/1519669277072200 but this issue is clearly about adding Micropub support as another API to Bridgy Publish, rather than adding another Bridgy Publish target to Micropub servers (for which I’ll file a separate issue).

Perhaps consider renaming this issue to something like:

Micropub API to Bridgy Publish

and I can file an issue for: Bridgy Publish to Micropub servers

Thanks!

(Originally published at: http://tantek.com/2018/057/t2/issue-name-micropub-bridgy-publish)

@snarfed snarfed changed the title micropub for bridgy publish micropub API for bridgy publish Feb 27, 2018
@snarfed

This comment has been minimized.

Copy link
Owner Author

@snarfed snarfed commented Feb 27, 2018

sure! done.

@EdwardHinkle

This comment has been minimized.

Copy link

@EdwardHinkle EdwardHinkle commented Jan 23, 2019

So, thinking through this a little bit while looking through the code. The Micropub post sent would become the post that gets syndicated. You still have to determine what service it gets syndicated through. I see a couple options here, currently the URLs used are:

POST /publish/preview
POST /publish/webmention
GET /publish/{service}

Micropub could either have a single endpoint:

POST /publish/micropub

And use a special mp- command to signify the silo or, what I think would be better is making

POST /publish/{service}
Or
POST /publish/micropub/{service}

An endpoint that fetches the service from the url, then no special data has to be passed through the object itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.