haiwen/seahub — pull request #52 by dancewhale (2013-05-20 02:16:05+00:00)
Title: Extend the api and fix a small bug

Add three api for create repo 、delete repo and change name 、desc of repo

Create
desc (option) The default is new repo if not exist
name (Required) return error if not exist
perm (option、only can be rw or r) The default is rw if not exist
passwd (option)
example:
curl -X PUT -H 'Authorization: Token ee6df49d56f855e409347fb1fd39341975d9daa8' -H 'Accept: application/json; indent=4' "https://www.seafile.com/api2/repos/create/?name=zhetian&perm=r"

Delete
curl -X DELETE -H 'Authorization: Token ee6df49d56f855e409347fb1fd39341975d9daa8' -H 'Accept: application/json; indent=4' "https://www.seafile.com/api2/repos/76fc588d-e8e7-437d-9122-4c62376f25fb/operation/"

Edit
curl -d "name=123" -H 'Authorization: Token ee6df49d56f855e409347fb1fd39341975d9daa8' -H 'Accept: application/json; indent=4' https://www.seafile.com/api2/repos/2ac0416c-9e7f-4ce3-babf-3fff43546816/operation/?desc=hahah