CellService.editCellThis is a featured page


HTTP MethodURIReturns
POST/CellService/editCell.doThe edited cell.

Overview: Updates the content of a cell. If the specified cell does not exist, then it is created. (NOTE: Currently, creating a cell through this call is the only way to specify a custom creation date.)
Required Parameters:

key
The developer key. This value is provided by Wetpaint during initial developer registration

ns
The content namespace. This value is provided by Wetpaint during initial developer registration

ticket
The ticket assigned to the current logged-in user

cell.cellId
The name of the cell to be edited

cell.displayName
The display name of the cell

cell.url
The cell’s URL

cell.currentRevision.version
The version of the cell being edited. If the cell is being created, then the currentRevision.version should be set to 0.

revision.content
The new HTML content

Optional Parameters:

revision.editNote
Edit note

revision.date
Desired date and time for new revision in ISO8601 format, e.g. 2008-12-31T23:59:59-08:00. This parameter is currently only used when editing the first revision of a cell.

Example Request ( required parameters in red ):

http://wapi.wetpaint.com/CellService/editCell.do
?key=yourissueddeveloperkey
&ns=yourassignednamespace
&cell.cellId=someCell
&cell.displayName=
Some%20Rad%20Cell
&cell.url=
http%3A%2F%2Fwww.yoursite.com%2Fmypage
&cell.currentRevision.version=3
&revision.content=%3Cdiv%3ESome%20Rad%20Content%3C%2Fdiv%3E

&ticket=ticketFromLogin
&output=api
&revision.editNote=I%20edited%20this.


Example Response:

<?xml version="1.0" encoding="UTF-8"?>
<response version="123456789"><cell><cellId>someCell</cellId><currentRevision><content><![CDATA[<div>Some Rad Content</div>]]></content><date>2008-10-08T10:34:58-07:00</date><deleted>false</deleted><diff><addedImages>0</addedImages><addedWidgets>0</addedWidgets><addedWords>0</addedWords><deletedImages>0</deletedImages><deletedWidgets>0</deletedWidgets><deletedWords>0</deletedWords></diff><editNote>I edited this.</editNote><type>edit</type><user><userId>IAmARegisteredUser</userId></user><version>4</version><wordCount>3</wordCount></currentRevision><deleted>false</deleted><displayName>Some Rad Cell</displayName><locked>false</locked><tags total="0" offset="0"/><url>http://www.yoursite.com/mypage</url></cell></response>






boe_wetpaint
boe_wetpaint
Latest page update: made by boe_wetpaint , Mar 9 2009, 2:42 PM EDT (about this update About This Update boe_wetpaint Edited by boe_wetpaint

15 words added
1 word deleted

view changes

- complete history)
Keyword tags: None
More Info: links to this page
Started By Thread Subject Replies Last Post
wishpot Default Revision 2 Nov 20 2008, 7:22 PM EST by bennyflint
Thread started: Nov 18 2008, 8:44 PM EST  Watch
If you edit a non-existent cell, it creates the cell for you. If I do this, what should I set cell.currentRevision.version to? Zero... one... something else? (It's listed as required)

I prefer the editCell function to createCell because I'd like to be able to create and initialize a cell with one call.
Do you find this valuable?    
Keyword tags: None
Show Last Reply
Showing 1 of 1 threads for this page