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

Open APIs #11

Open
jackycute opened this issue Jul 11, 2015 · 16 comments
Open

Open APIs #11

jackycute opened this issue Jul 11, 2015 · 16 comments
Assignees
Labels
feature Wants to add a new feature

Comments

@jackycute
Copy link
Member

Maybe can open some APIs to let third-party application to use

@janniklorenz
Copy link
Contributor

At first, I just took a quick look at the project and that's exactly what I had in mind too. A simple, markdown alternative to ether pad.

To provide such an API (REST) it maybe would be the best to simplify the creation of a note. Let the server just creates the note if no one with the same name exits (like ether pad).

So we could build an URL architecture like:
/api/get/noteName
/api/write/noteName
/editor/noteName

@jackycute
Copy link
Member Author

Thank you, that's a good proposal!
First, I refer to the API which now open by Hackpad
https://hackpad.com/ep/pad/static/k9bpcEeOo2Q

For now, the creation of the note is /new, which I think is simple enough.
But currently the note id policy is the UUID encoded by base64.
So the only note name I can give to you is the "header1", which is the title of the note.
And maybe I will take /api be the prefix of the APIs.

Thanks again!

@janniklorenz
Copy link
Contributor

Thanks for the quick response, I will take a look at it later.

@jackycute jackycute added the feature Wants to add a new feature label Sep 24, 2015
@a60814billy a60814billy self-assigned this Mar 28, 2016
@wonderchang
Copy link
Contributor

+1

1 similar comment
@Jyny
Copy link

Jyny commented Jul 4, 2016

+1

@ToniIltanen
Copy link

Any progress on creating an API to control the creation, updating and delete of the notes?

@jackycute
Copy link
Member Author

Not for now, maybe right after version 0.5.0

@jackycute
Copy link
Member Author

We'll need to build a OAuth process to allow programmatic usage.
Or an easy way is give every user a pair of key and secret like Hackpad did so.

@Yukaii Yukaii added this to the Backlog milestone Feb 27, 2017
@jackycute jackycute mentioned this issue Feb 27, 2017
@wonderchang
Copy link
Contributor

I prefer to provide a pair of key and secret to achieve it, and each authorized user could generate several key pairs for different application uses.

Why this feature would be implement after v0.5.0? Something fundamentals should be done before constructing Open API? (Just curious, not offense)

@rufuspollock
Copy link

Chiming in to say this is a top issue for me e.g. I want to be able to store todos in hackmd, or store a list of documents and get that list. This would also enable people to extend the platform a lot in interesting ways (e.g. push and pull between github files)

@tjcarroll11
Copy link

tjcarroll11 commented May 24, 2017

Also chiming in to say I really want to use hackmd, but this is a blocker for me. I need a way to create documents from a separate system and open them to edit in hackmd. Oauth is not necessary for my use case.

@RichardLitt
Copy link

I've built a module that can generate HackMD links. May prove useful, but it's not ideal. https://github.com/RichardLitt/generate-hackmd-links

@rufuspollock
Copy link

@jackycute any thoughts or updates here :-) ?

@iakat
Copy link

iakat commented Feb 12, 2018

Any update re: an API to write to notes?

@ccoenen
Copy link
Contributor

ccoenen commented Feb 13, 2018

There's now the possibility to create a new note with content, see #673 for an example. Editing is not trivial, currently believe that "simply" using the Websocket and adding content via OT is the best option.

@patcon
Copy link

patcon commented Mar 10, 2020

In case anyone else is interested, I created a really ugly code spike for messing around with socketio and both clearing a pad and replacing it with template copy: https://github.com/patcon/hackmd-edits-test

fwiw, it currently only works if no one else has an active cursor on the pad (not sure why)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Wants to add a new feature
Projects
None yet
Development

No branches or pull requests