fedwiki / wiki-server

Federated Wiki client and server in Node.js
Other
153 stars 35 forks source link

REST Interface #96

Closed opn closed 8 years ago

opn commented 9 years ago

I'd like to use a RESTful interface to be called from a remote mobile client. I'd like to start some Federated Wiki documentation of this project, and of the process of creating a mobile app that interfaces with the wiki-node-server. Could someone advise / point me to the relevant portions of code or existing SFW notes elsewhere?

almereyda commented 9 years ago

I am not sure if the API is actually REST, but you may want to start here

if I'm not mistaken.

opn commented 9 years ago

Hi thanks @almereyda but this as @WardCunningham pointed out is the old Ruby / Sinatra server. As far as I know there is no documented API for the wiki-node-server - it's in the code :) Hopefully I can get an answer tonight in the Hangout. I'm really keen to get this done - so I'm searching for advice and collaborators.

almereyda commented 9 years ago

Well, at least you won't find people who will do the work for you. But still the Ruby implementation and the Node implementation are API compatible - else the federation would not work - so you can use the aforementioned documentation to give context to the code.

Please also note that AFAIK wiki's sources are docco compatible. Feel free to experiment with it like:

$ cd repositories
$ git clone https://github.com/fedwiki/wiki-node-server.git
$ cd github.com/fedwiki/wiki-node-server
$ docco -o docs lib/*
$ cd docs
$ http-server .
WardCunningham commented 9 years ago

I notice that the WireDetails page above seems to be a suggestion, rather than anything actually ever built. Does anyone know otherwise?

To read federation sites one must know how to interpret the json pages. There is also some cross-implementation convention for lineup urls required for drag-and-drop behavior to work.

Our client/server ajax messaging could be made to use more REST conventions. See https://github.com/fedwiki/wiki-client/issues/96

The sharing in federated wiki happens in the client. The client manages information at the level of page, lineup and tab. This becomes more important as new features are layered on the client with plugins or by offering editing. See https://github.com/fedwiki/wiki-plugin-roster/issues/1

We have yet to declare a 1.0 release. I would like to have a lot of confidence in our APIs before we do that. Confidence will come from building lots of applications on the APIs we have now and then carefully improving them. I wonder what provisional documentation would facilitate this activity?