Post Comment to Homepage – MindTouch Community Portal
Post Comment to HomepageTable of contents
1. 1. Description of the code sample
2. 2. Sample Code
3. 3. Sample Response from executing Code
4. 4. Implementation notesDescription of the code sample
The following code example creates a new comment on the home page
Sample Code
view sourceprint?
1 Plug p = Plug.New(“http://deki-hayes/@api/deki");
2 p.At(“users", “authenticate").WithCredentials(“admin", “password").Get();
3 DreamMessahttp://developer.mindtouch.com/editor/fckeditor/core/editor/images/spacer.gifge msg = DreamMessage.Ok(MimeType.TEXT, “Comment text");
4 p.At(“pages", “home", “comments").Post(msg);Sample Response from executing Code
view sourceprint?
01
02
03
04
05
06
07 Admin
08 Admin
09 admin@mindtouch.com
10
11 2007-08-23T09:52:07Z
12
13 1
14 Comment text
15
Implementation notes