PUT | /RestApi/comments-api/comments |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class CommentUpdateRequest
{
public String Key = null;
public String Message = null;
public String Status = null;
public String Name = null;
public String Email = null;
public String CustomData = null;
public BigDecimal Rating = null;
public String getKey() { return Key; }
public CommentUpdateRequest setKey(String value) { this.Key = value; return this; }
public String getMessage() { return Message; }
public CommentUpdateRequest setMessage(String value) { this.Message = value; return this; }
public String getStatus() { return Status; }
public CommentUpdateRequest setStatus(String value) { this.Status = value; return this; }
public String getName() { return Name; }
public CommentUpdateRequest setName(String value) { this.Name = value; return this; }
public String getEmail() { return Email; }
public CommentUpdateRequest setEmail(String value) { this.Email = value; return this; }
public String getCustomData() { return CustomData; }
public CommentUpdateRequest setCustomData(String value) { this.CustomData = value; return this; }
public BigDecimal getRating() { return Rating; }
public CommentUpdateRequest setRating(BigDecimal value) { this.Rating = value; return this; }
}
public static class CommentResponse
{
public String Key = null;
public String Name = null;
public String Message = null;
public Date DateCreated = null;
public String ProfilePictureUrl = null;
public String ProfilePictureThumbnailUrl = null;
public String Status = null;
public String Email = null;
public String ThreadKey = null;
public String AuthorIpAddress = null;
public String CustomData = null;
public BigDecimal Rating = null;
public String getKey() { return Key; }
public CommentResponse setKey(String value) { this.Key = value; return this; }
public String getName() { return Name; }
public CommentResponse setName(String value) { this.Name = value; return this; }
public String getMessage() { return Message; }
public CommentResponse setMessage(String value) { this.Message = value; return this; }
public Date getDateCreated() { return DateCreated; }
public CommentResponse setDateCreated(Date value) { this.DateCreated = value; return this; }
public String getProfilePictureUrl() { return ProfilePictureUrl; }
public CommentResponse setProfilePictureUrl(String value) { this.ProfilePictureUrl = value; return this; }
public String getProfilePictureThumbnailUrl() { return ProfilePictureThumbnailUrl; }
public CommentResponse setProfilePictureThumbnailUrl(String value) { this.ProfilePictureThumbnailUrl = value; return this; }
public String getStatus() { return Status; }
public CommentResponse setStatus(String value) { this.Status = value; return this; }
public String getEmail() { return Email; }
public CommentResponse setEmail(String value) { this.Email = value; return this; }
public String getThreadKey() { return ThreadKey; }
public CommentResponse setThreadKey(String value) { this.ThreadKey = value; return this; }
public String getAuthorIpAddress() { return AuthorIpAddress; }
public CommentResponse setAuthorIpAddress(String value) { this.AuthorIpAddress = value; return this; }
public String getCustomData() { return CustomData; }
public CommentResponse setCustomData(String value) { this.CustomData = value; return this; }
public BigDecimal getRating() { return Rating; }
public CommentResponse setRating(BigDecimal value) { this.Rating = value; return this; }
}
}
Java CommentUpdateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /RestApi/comments-api/comments HTTP/1.1
Host: www.asg.com.au
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CommentUpdateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Services.Comments.DTO">
<CustomData>String</CustomData>
<Email>String</Email>
<Key>String</Key>
<Message>String</Message>
<Name>String</Name>
<Rating>0</Rating>
<Status>String</Status>
</CommentUpdateRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CommentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Services.Comments.DTO"> <AuthorIpAddress>String</AuthorIpAddress> <CustomData>String</CustomData> <DateCreated>0001-01-01T00:00:00</DateCreated> <Email>String</Email> <Key>String</Key> <Message>String</Message> <Name>String</Name> <ProfilePictureThumbnailUrl>String</ProfilePictureThumbnailUrl> <ProfilePictureUrl>String</ProfilePictureUrl> <Rating>0</Rating> <Status>String</Status> <ThreadKey>String</ThreadKey> </CommentResponse>