LSD - lets share data daemon
This commit is contained in:
commit
71114c8e8b
14 changed files with 1655 additions and 0 deletions
65
README
Normal file
65
README
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
LSD - lets share data daemon
|
||||
|
||||
REQUIREMENTS
|
||||
|
||||
Python bindings for libtorrent-rasterbar (apt-get install python-libtorrent)
|
||||
python-ox (easy_install ox)
|
||||
|
||||
CLIENT API USED BY SITE
|
||||
|
||||
lsd offers a json api that can be integrated on any site,
|
||||
sites must provide the api outlined below for this to work.
|
||||
|
||||
config({username: '', password: '', url: ''})
|
||||
sync({})
|
||||
sync local folder with server
|
||||
addRequests({ids: []})
|
||||
download requested files and request seeder
|
||||
|
||||
//for debugging/stats:
|
||||
status({})
|
||||
status({id:})
|
||||
seedRequests({})
|
||||
|
||||
possibly in the future:
|
||||
// need to edit config for now
|
||||
//setFolder({}, callback)
|
||||
|
||||
|
||||
RESOURCE AVAILABLE TO SITE:
|
||||
|
||||
once available files can be accessed via:
|
||||
http://127.0.0.1:15550/get/ID
|
||||
|
||||
|
||||
SITE API USED BY CLIENT
|
||||
|
||||
sites must provide an api that allows clients to sync information
|
||||
about available files. The api must be available at the url endpoint
|
||||
set via config (defaults to site/api/)
|
||||
|
||||
sync({}) -> {ids: [id]}
|
||||
sync({add: [id], remove: [id]}) -> {update: [id]}
|
||||
sync({update: [metadata]}) -> {}
|
||||
|
||||
{} -> returns list of user ids know by server
|
||||
{add: [], remove: []} -> add or remove files on sever
|
||||
returns list of ids that need metadata {update: []}
|
||||
{update: [{sha1:, info_hash:, extension:, ...}]} -> send metadata to server
|
||||
|
||||
addRequests({ids: [id]}) -> [metadata]
|
||||
removeRequests({ids: [id]}) -> {}
|
||||
getRequests({}) -> {ids: [id]}
|
||||
|
||||
//FIXME: use cookie or something like that instead
|
||||
//if username/password is set via config your site must support this
|
||||
signin({username: string, password: string}) -> {...}
|
||||
|
||||
|
||||
IDENTIFIERS
|
||||
|
||||
id is assumed to be the sha1 of the file
|
||||
|
||||
sha1 and info_hash must be always in lower case hex form
|
||||
(40 characters, lower case)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue