facundobatista / kilink

A next generation pastebin
GNU General Public License v3.0
25 stars 30 forks source link

CLIENT-SERVER #116

Closed matibarriento closed 2 months ago

matibarriento commented 7 years ago

CLIENT-SERVER

Linkode will provide a client that use the API.

Flask will only provide the static files with the language.

Cliente js The CLIENT will read the url at start If there is not params, pass Elif there is an anchor tag (#linkode_id) Get the tag as linkode_id Elif there is a /linkode_id Get the linkode_id Elif there is a /linkode_id/revno Get the revno as linkode_id

    Then, with the linkode_id, get the kilink from the API

When a new (or new version) kilink is created
    POST the API and retrieve the kilink and the tree
    Update the tree
    Update the url with the anchor tag #linkode_id

API 2 GET /api/2/linkodes GET /api/2/linkodes/ GET /api/2/linkodes/?include_tree=True POST /api/2/linkodes/?include_tree=True POST /api/2/linkodes/?include_tree=True

DB For each root kilink, overwrite the revno with the kid Rename kid as root Rename revno as linkode_id

Backend Update the fields "acord with the db changes" Get the tree from the linkode_id (aka revno) First get the root Then get the tree.

facundobatista commented 7 years ago

Leaving this issue open until we finish improving the API

facundobatista commented 2 months ago

Which is done now! We have API v2 :D