DESCRIPTION

capi implementation + simple create_view + json-set test

added create_view,get_view and delete_view and run_view to
RestConnection class
usage example :
capi = RestConnection(server)
function = "{\"_id\": \"_design/test\",\"views\": {\"stuff\": {\"map\": \"function (doc) { emit([doc.id], 99); }\"}}}"
capi.create_view("default","myview",function)
capi.get_view("default","myview")
capi.delete_view("default","myview")

Change-Id: I35326c5f3fc2fa8ce10004c47d0da187cae5afb5


COMMENTS

author: Zackery Barr
date: 2011-07-19 21:23:40.606000000

Uploaded patch set 6.

-------------------------------------
author: Noah Dean
date: 2011-07-19 22:31:21.405000000

Patch Set 6: (3 inline comments)



Line:44, pytests/viewtests.py -> This kind of thing is a lot easier with triple quotes.

Line:48, lib/membase/api/rest_client.py -> This is why I don't like comments in code.

Line:219, lib/membase/api/rest_client.py -> Why not just use the couchdb API for python?  That's likely to be closer to what our customers are going to use anyway.

-------------------------------------
author: Zackery Barr
date: 2011-07-20 22:40:51.814000000

Patch Set 6: (3 inline comments)



Line:44, pytests/viewtests.py -> yeah thats much easier :)
fixed it in the latest patch

Line:48, lib/membase/api/rest_client.py -> yeah this should be part of a different change

Line:219, lib/membase/api/rest_client.py -> yeah - it makes sense to just redirect these capi/crud api calls to couchdb python stuff
sure. I will look into that later ( post couchconf)

-------------------------------------
