Commit ef7a7da5 authored by Lucas Carvalho's avatar Lucas Carvalho

Updated the README.txt with a better API.

parent 1c2a25bb
......@@ -20,11 +20,16 @@ API
======
So, it must provide 2 methods:
post(file)
''' Upload the file to Networkcache HTTP Server using POST as HTTP method.'''
get_file(key)
''' Download the file from SHACACHE server using GET as HTTP method.'''
get_information(directory, urlmd5=None)
''' Retrieve the information from SHADIR server using GET as HTTP method. '''
upload(file, directory_key=None, **kw)
''' Upload the file to ShaCache Server'''
If directory_key is not None, upload add a new key to the shadir server.
download(sha)
'''Download a file from shacache
Raise FileNotFound if file is not found
'''
select(directory_key)
'''Download a file from shacache by selecting the entry in shadir
Raise DirectoryNotFound if multiple files are found
'''
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment