Use new /p/create entry point for project creation

Instead of POSTing to /projects, we now use /p/create to create a new
project.
This commit is contained in:
2016-05-09 11:17:46 +02:00
parent e9289e05f3
commit 2664c7bf8b

View File

@@ -127,3 +127,11 @@ class Project(List, Find, Create, Post, Update, Delete, Replace):
headers = self.http_headers()
response = api.get(url, headers=headers)
return response
def create(self, api=None):
name = self.name or 'new project'
headers = self.http_headers()
response = api.post('p/create', headers=headers,
params={'name': name})
self.merge(response)