Sunteți pe pagina 1din 38

ThePort Network, Inc.

API Documentation
Remote Commenting

Author Version Notes Date


Michael Dugan 1.0 Initial Iteration 10/10/08
TJ Muehleman 1.1 Added GetRemoteItemStatsBulk 08/06/09

1
Table of Contents
List of Methods.......................................................................................................................................3
Method Detail.........................................................................................................................................5
Comment Methods............................................................................................................................5
GetComment...............................................................................................................................5
AddComment..............................................................................................................................7
AddAnonymousComment..........................................................................................................8
AddEditorNote............................................................................................................................9
DeleteComment..........................................................................................................................10
FeatureComment.........................................................................................................................11
UnfeatureComment.....................................................................................................................12
Comment Collection Methods..........................................................................................................13
GetItemComments......................................................................................................................13
GetCommunityComments..........................................................................................................16
GetItemGroupComments............................................................................................................20
GetFeaturedCommunityComments............................................................................................24
GetFeaturedItemComments........................................................................................................27
GetFeaturedItemGroupComments..............................................................................................29
Item Methods....................................................................................................................................31
SetItemExpirationDate...............................................................................................................31
GetRemoteItemStats...................................................................................................................32
GetRemoteItemStatsBulk...........................................................................................................33
Item Collection Methods..................................................................................................................34
GetMostCommentedGroupItems................................................................................................33
GetMostCommentedCommunityItems.......................................................................................35
Error Handling........................................................................................................................................37

2
List of Methods
Comment Methods:

GetComment: A comment object is a collection of data representing everything needed to render a


single comment along with all of the expected ancillary data such as time of post, author data, etc.

AddComment: Adds a comment to an Item. The commenting User must be authenticated before
posting comments.

AddAnonymousComment: Adds an anonymous comment to an Item. This method is only available


to communities that allow for anonymous commenting, otherwise an error message will be returned.

AddEditorNote: Adds an editor note to a comment. The User adding the note must have content
moderation privileges, otherwise an error message will be returned.

DeleteComment: Deletes a comment from the System. The User deleting the comment must have
content moderation privileges, otherwise an error message will be returned.

FeatureComment: Marks a comment as featured. The User featuring the comment must have content
moderation privileges, otherwise an error message will be returned.

UnfeatureComment: Marks a comment as unfeatured. The User unfeaturing the comment must have
content moderation privileges, otherwise an error message will be returned.

Comment Collection Methods:

GetItemComments: Returns a collection of comment objects associated with an Item. The comments
will be sorted by the most to least recent. If no NumItems values is supplied, the first 20 comments
will be returned.

GetCommunityComments: Returns a collection of comment objects spanning the entire community.


The comments will be sorted by the most to least recent. If no NumItems values is supplied, the first
20 comments will be returned.

GetItemGroupComments: Returns a collection of comment objects associated with an Item Group.


The comments will be sorted by the most to least recent. If no NumItems values is supplied, the first
20 comments will be returned.

GetFeaturedCommunityComments: Returns a collection of Featured comment objects spanning the


entire community. The comments will be sorted by the most to least recent. If no NumItems values is
supplied, the first 20 comments will be returned.

3
GetFeaturedItemComments: Returns a collection of Featured comment objects associated with an
Item. The comments will be sorted by the most to least recent. If no NumItems values is supplied, the
first 20 comments will be returned.

GetFeaturedItemGroupComments: Returns a collection of Featured comment objects associated


with an ItemGroup. The comments will be sorted by the most to least recent. If no NumItems values is
supplied, the first 20 comments will be returned.

Item Methods:

SetItemExpirationDate: Sets the DateTime at which an Item will no longer be available for
commenting. The User setting the Item Expiration Date must have content moderation privileges,
otherwise an error message will be returned.

GetRemoteItemStats: Gets various commenting statistics for an Item.

Item Collection Methods:

GetMostCommentedGroupItems: Gets the most commented Items for a particular Group. The
Items will be sorted by the most to least recent. If no NumItems values is supplied, the first 20 Items
will be returned.

GetMostCommentedCommunityItems: Gets the most commented Items spanning the entire


community. The Items will be sorted by the most to least recent. If no NumItems values is supplied,
the first 20 Items will be returned.

4
Method Detail

Comment Methods
GetComment
A comment object is a collection of data representing everything needed to render a single comment
along with all of the expected ancillary data such as time of post, author data, etc.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
Yes CommentID GUID Unique Identifier of the Comment.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<GetComment>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<RemoteComment>
<ID>9a94f473-9aef-45fb-b3c1-af5f49e6226b</ID>
<Text>This is a new comment.</Text>
<OwnerID>ea0be746-1fad-405d-9176-0d28b44d7ffd</OwnerID>
<PostDate>2008-10-02T12:26:11.74</PostDate>
<Author>
<UserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</UserID>
<ImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/ea0be
746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto.jpg
</ImageUrl>
<SmallImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/
ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto_s.jpg
</SmallImageUrl>
<PublicName>Anonymous</PublicName>
<ProfileURL>http://defaulttemplate.portbuild.com/Anonymous9</ProfileURL>
</Author>
<RemoteItem>
<ID>5b460568-8c20-408b-b099-1cb62061d7f0</ID>
<Title>This is an Item Title.</Title>

5
<Permalink>http://www.google.com</Permalink>
<RemoteItemGroup>
<ID>892b3d6d-4dbd-489e-bf41-037d2ccc665e</ID>
<Title>This is an Item Group Title.</Title>
<Description />
</RemoteItemGroup>
<CommentExpirationDate />
<NumComments>4</NumComments>
</RemoteItem>
<Featured>false</Featured>
<FeaturedUserID />
<EditorNote />
<EditorNoteUserID />
</RemoteComment>
</GetComment>
</CommentingService>

6
AddComment
Adds a comment to an Item. The commenting User must be authenticated before posting comments.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
No ClientIP String IP Address of the client machine that is posting the
comment. If supplied, ip will be checked against the list of
banned ip's.
Yes UserToken String The UserToken is an encrypted GUID passed as a string to
determine whether or not the User posting the comment is
authenticated. It can be retrieved from the User's tp_ssid
cookie.
Yes CommentText String The actual comment being posted.
Yes ItemXRefCode String External UniqueIdentifier of the Item being commented
upon.
No ItemTitle String Title of the item being commented on. This value WILL be
required if the item is not yet in the system.
No ItemPermalink String URL of the item being commented on. This value WILL
be required if the item is not yet in the system.
No ItemGroupXRefCode String External UniqueIdentifier of the Item Group being
comented upon.
No ItemGroupTitle String Title of the Item Group being commented upon. This value
WILL be required if the ItemGroupXRefCode parameter is
supplied and that item group is not yet in the system.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<AddComment>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<Response>The Item was added.</Response>
</AddAnonymousComment>
</CommentingService>

7
AddAnonymousComment
Adds an anonymous comment to an Item. This method is only available to communities that allow for
anonymous commenting, otherwise an error message will be returned.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
No ClientIP String IP Address of the client machine that is posting the
comment. If supplied, ip will be checked against the list of
banned ip's.
Yes CommentText String The actual comment being posted.
Yes ItemXRefCode String External UniqueIdentifier of the Item being commented
upon.
No ItemTitle String Title of the item being commented on. This value WILL be
required if the item is not yet in the system.
No ItemPermalink String URL of the item being commented on. This value WILL
be required if the item is not yet in the system.
No ItemGroupXRefCode String External UniqueIdentifier of the Item Group being
comented upon.
No ItemGroupTitle String Title of the Item Group being commented upon. This value
WILL be required if the ItemGroupXRefCode parameter is
supplied and that item group is not yet in the system.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<AddAnonymousComment>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<Response>The Item was added.</Response>
</AddAnonymousComment>
</CommentingService>

8
AddEditorNote
Adds an editor note to a comment. The User adding the note must have content moderation privileges,
otherwise an error message will be returned.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
No ClientIP String IP Address of the client machine that is posting the
comment. If supplied, ip will be checked against the list of
banned ip's.
Yes UserToken String The UserToken is an encrypted GUID passed as a string to
determine whether or not the User adding the editor note is
authenticated and has the necessary permissions to do so.
It can be retrieved from the User's tp_ssid cookie.
Yes CommentID GUID Unique Identifier of the Comment to which the Editor Note
is being attached..
Yes EditorNote String The Editor Note being attached to the comment.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<AddEditorNoteToComment>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<Response>The Item was updated.</Response>
</AddEditorNoteToComment>
</CommentingService>

9
DeleteComment
Deletes a comment from the System. The User deleting the comment must have content moderation
privileges, otherwise an error message will be returned.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
No ClientIP String IP Address of the client machine that is deleting the
comment. If supplied, ip will be checked against the list of
banned ip's.
Yes UserToken String The UserToken is an encrypted GUID passed as a string to
determine whether or not the User deleting the comment is
authenticated and has the necessary permissions to do so.
It can be retrieved from the User's tp_ssid cookie.
Yes CommentID GUID Unique Identifier of the Comment being deleted.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<DeleteComment>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<Response>The Item was deleted.</Response>
</DeleteComment>
</CommentingService>

10
FeatureComment
Marks a comment as featured. The User featuring the comment must have content moderation
privileges, otherwise an error message will be returned.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
No ClientIP String IP Address of the client machine that is featuring the
comment. If supplied, ip will be checked against the list of
banned ip's.
Yes UserToken String The UserToken is an encrypted GUID passed as a string to
determine whether or not the User featuring the comment is
authenticated and has the necessary permissions to do so.
It can be retrieved from the User's tp_ssid cookie.
Yes CommentID GUID Unique Identifier of the Comment being featured.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<FeatureComment>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<Response>The Item was updated.</Response>
</AddEditorNoteToComment>
</FeatureComment>

11
UnfeatureComment
Marks a comment as unfeatured. The User unfeaturing the comment must have content moderation
privileges, otherwise an error message will be returned.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
No ClientIP String IP Address of the client machine that is unfeaturing the
comment. If supplied, ip will be checked against the list of
banned ip's.
Yes UserToken String The UserToken is an encrypted GUID passed as a string to
determine whether or not the User unfeaturing the
comment is authenticated and has the necessary
permissions to do so. It can be retrieved from the User's
tp_ssid cookie.
Yes CommentID GUID Unique Identifier of the Comment being unfeatured.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<UnfeatureComment>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<Response>The Item was updated.</Response>
</AddEditorNoteToComment>
</UnfeatureComment>

12
Comment Collection Methods
GetItemComments
Returns a collection of comment objects associated with an Item. The comments will be sorted by the
most to least recent. If no NumItems values is supplied, the first 20 comments will be returned.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
Yes XRefCode String External Unique Identifier of the Remote Item.
No ResultStart Int When pulling a subset of comments, where in the total list
of comments to begin.
No NumItems Int When pulling a subset of comments, how many comments
to pull.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<GetItemComments>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<RemoteCommentCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<List>
<RemoteComment>
<ID>9a94f473-9aef-45fb-b3c1-af5f49e6226b</ID>
<Text>This is a new comment.</Text>
<OwnerID>ea0be746-1fad-405d-9176-0d28b44d7ffd</OwnerID>
<PostDate>2008-10-02T12:26:11.74</PostDate>
<Author>
<UserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</UserID>
<ImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/ea
0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto.jpg
</ImageUrl>
<SmallImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0
/b/ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto_s.jpg
</SmallImageUrl>
<PublicName>Anonymous</PublicName>
<ProfileURL>http://defaulttemplate.portbuild.com/Anonymous9</ProfileURL>

13
</Author>
<RemoteItem>
<ID>5b460568-8c20-408b-b099-1cb62061d7f0</ID>
<Title>This is an Item Title.</Title>
<Permalink>http://www.google.com</Permalink>
<RemoteItemGroup>
<ID>892b3d6d-4dbd-489e-bf41-037d2ccc665e</ID>
<Title>This is an Item Group Title.</Title>
<Description />
</RemoteItemGroup>
<CommentExpirationDate />
<NumComments>4</NumComments>
</RemoteItem>
<Featured>false</Featured>
<FeaturedUserID />
<EditorNote />
<EditorNoteUserID />
</RemoteComment>
<RemoteComment>
<ID>9a94f473-9aef-45fb-b3c1-af5f49e6226b</ID>
<Text>This is a new comment.</Text>
<OwnerID>ea0be746-1fad-405d-9176-0d28b44d7ffd</OwnerID>
<PostDate>2008-10-02T12:26:11.74</PostDate>
<Author>
<UserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</UserID>
<ImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/ea
0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto.jpg
</ImageUrl>
<SmallImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0
/b/ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto_s.jpg
</SmallImageUrl>
<PublicName>Anonymous</PublicName>
<ProfileURL>http://defaulttemplate.portbuild.com/Anonymous9</ProfileURL>
</Author>
<RemoteItem>
<ID>5b460568-8c20-408b-b099-1cb62061d7f0</ID>
<Title>This is an Item Title.</Title>
<Permalink>http://www.google.com</Permalink>
<RemoteItemGroup>
<ID>892b3d6d-4dbd-489e-bf41-037d2ccc665e</ID>
<Title>This is an Item Group Title.</Title>
<Description />
</RemoteItemGroup>
<CommentExpirationDate />
<NumComments>4</NumComments>
</RemoteItem>
<Featured>false</Featured>
<FeaturedUserID />

14
<EditorNote />
<EditorNoteUserID />
</RemoteComment>
</List>
</RemoteCommentCollection>
</GetItemComments>
</CommentingService>

15
GetCommunityComments
Returns a collection of comment objects spanning the entire community. The comments will be sorted
by the most to least recent. If no NumItems values is supplied, the first 20 comments will be returned.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
No ResultStart Int When pulling a subset of comments, where in the total list
of comments to begin.
No NumItems Int When pulling a subset of comments, how many comments
to pull.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<GetCommunityComments>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<RemoteCommentCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<List>
<RemoteComment>
<ID>2bf3367c-2945-4bd5-87b5-77549e2e5f2b</ID>
<Text>This is a 4th comment.</Text>
<OwnerID>ea0be746-1fad-405d-9176-0d28b44d7ffd</OwnerID>
<PostDate>2008-10-02T13:32:29.067</PostDate>
<Author>
<UserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</UserID>
<ImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/ea
0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto.jpg
</ImageUrl>
<SmallImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0
/b/ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto_s.jpg
</SmallImageUrl>
<PublicName>Anonymous</PublicName>
<ProfileURL>http://defaulttemplate.portbuild.com/Anonymous9</ProfileURL>
</Author>
<RemoteItem>
<ID>7390ab9d-4a78-497f-b642-75c87d08d70a</ID>
<Title>My Item Title.</Title>

16
<Permalink>http://www.theport.com</Permalink>
<RemoteItemGroup>
<ID>bf81820e-2c15-4204-8f40-347b689565b0</ID>
<Title>My Item Group Title.</Title>
<Description />
<XRefCode>ItemGroupXRef0003</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0002</XRefCode>
<CommentExpirationDate />
<NumComments>1</NumComments>
</RemoteItem>
<Featured>false</Featured>
<FeaturedUserID />
<EditorNote />
<EditorNoteUserID />
</RemoteComment>
<RemoteComment>
<ID>1327f2d5-e319-4783-805d-3618f84fe3d7</ID>
<Text>This is a 4th comment.</Text>
<OwnerID>ea0be746-1fad-405d-9176-0d28b44d7ffd</OwnerID>
<PostDate>2008-10-02T12:38:13.973</PostDate>
<Author>
<UserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</UserID>
<ImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/ea0be
746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto.jpg
</ImageUrl>
<SmallImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/
ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto_s.jpg
</SmallImageUrl>
<PublicName>Anonymous</PublicName>
<ProfileURL>http://defaulttemplate.portbuild.com/Anonymous9</ProfileURL>
</Author>
<RemoteItem>
<ID>5b460568-8c20-408b-b099-1cb62061d7f0</ID>
<Title>This is an Item Title.</Title>
<Permalink>http://www.google.com</Permalink>
<RemoteItemGroup>
<ID>892b3d6d-4dbd-489e-bf41-037d2ccc665e</ID>
<Title>This is an Item Group Title.</Title>
<Description />
<XRefCode>ItemXRef0001</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0001</XRefCode>
<CommentExpirationDate />
<NumComments>4</NumComments>
</RemoteItem>
<Featured>false</Featured>
<FeaturedUserID />

17
<EditorNote />
<EditorNoteUserID />
</RemoteComment>
<RemoteComment>
<ID>2a591bf7-e351-495c-b7f2-d92669366bbc</ID>
<Text>This is a 3rd comment.</Text>
<OwnerID>ea0be746-1fad-405d-9176-0d28b44d7ffd</OwnerID>
<PostDate>2008-10-02T12:38:04.927</PostDate>
<Author>
<UserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</UserID>
<ImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/ea0be
746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto.jpg
</ImageUrl>
<SmallImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/
ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto_s.jpg
</SmallImageUrl>
<PublicName>Anonymous</PublicName>
<ProfileURL>http://defaulttemplate.portbuild.com/Anonymous9</ProfileURL>
</Author>
<RemoteItem>
<ID>5b460568-8c20-408b-b099-1cb62061d7f0</ID>
<Title>This is an Item Title.</Title>
<Permalink>http://www.google.com</Permalink>
<RemoteItemGroup>
<ID>892b3d6d-4dbd-489e-bf41-037d2ccc665e</ID>
<Title>This is an Item Group Title.</Title>
<Description />
<XRefCode>ItemXRef0001</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0001</XRefCode>
<CommentExpirationDate />
<NumComments>4</NumComments>
</RemoteItem>
<Featured>false</Featured>
<FeaturedUserID />
<EditorNote />
<EditorNoteUserID />
</RemoteComment>
<RemoteComment>
<ID>4a20aea6-f72b-4003-9a39-11f1ad31ba66</ID>
<Text>This is a 2nd comment.</Text>
<OwnerID>ea0be746-1fad-405d-9176-0d28b44d7ffd</OwnerID>
<PostDate>2008-10-02T12:37:51.677</PostDate>
<Author>
<UserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</UserID>
<ImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/ea0be
746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto.jpg

18
</ImageUrl>
<SmallImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/
ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto_s.jpg
</SmallImageUrl>
<PublicName>Anonymous</PublicName>
<ProfileURL>http://defaulttemplate.portbuild.com/Anonymous9</ProfileURL>
</Author>
<RemoteItem>
<ID>5b460568-8c20-408b-b099-1cb62061d7f0</ID>
<Title>This is an Item Title.</Title>
<Permalink>http://www.google.com</Permalink>
<RemoteItemGroup>
<ID>892b3d6d-4dbd-489e-bf41-037d2ccc665e</ID>
<Title>This is an Item Group Title.</Title>
<Description />
<XRefCode>ItemXRef0001</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0001</XRefCode>
<CommentExpirationDate />
<NumComments>4</NumComments>
</RemoteItem>
<Featured>false</Featured>
<FeaturedUserID />
<EditorNote />
<EditorNoteUserID />
</RemoteComment>
</List>
</RemoteCommentCollection>
</GetCommunityComments>
</CommentingService>

19
GetItemGroupComments
Returns a collection of comment objects associated with an Item Group. The comments will be sorted
by the most to least recent. If no NumItems values is supplied, the first 20 comments will be returned.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
Yes XRefCode String External Unique Identifier of the Remote Item Group.
No ResultStart Int When pulling a subset of comments, where in the total list
of comments to begin.
No NumItems Int When pulling a subset of comments, how many comments
to pull.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<GetItemGroupComments>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<RemoteCommentCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<List>
<RemoteComment>
<ID>1327f2d5-e319-4783-805d-3618f84fe3d7</ID>
<Text>This is a 4th comment.</Text>
<OwnerID>ea0be746-1fad-405d-9176-0d28b44d7ffd</OwnerID>
<PostDate>2008-10-02T12:38:13.973</PostDate>
<Author>
<UserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</UserID>
<ImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b
/ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto.jpg
</ImageUrl>
<SmallImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e
/a/0/b/ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto_s.jpg
</SmallImageUrl>
<PublicName>Anonymous</PublicName>
<ProfileURL>http://defaulttemplate.portbuild.com/Anonymous9</ProfileURL>
</Author>
<RemoteItem>

20
<ID>5b460568-8c20-408b-b099-1cb62061d7f0</ID>
<Title>This is an Item Title.</Title>
<Permalink>http://www.google.com</Permalink>
<RemoteItemGroup>
<ID>892b3d6d-4dbd-489e-bf41-037d2ccc665e</ID>
<Title>This is an Item Group Title.</Title>
<Description />
<XRefCode>ItemXRef0001</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0001</XRefCode>
<CommentExpirationDate />
<NumComments>4</NumComments>
</RemoteItem>
<Featured>false</Featured>
<FeaturedUserID />
<EditorNote />
<EditorNoteUserID />
</RemoteComment>
<RemoteComment>
<ID>2a591bf7-e351-495c-b7f2-d92669366bbc</ID>
<Text>This is a 3rd comment.</Text>
<OwnerID>ea0be746-1fad-405d-9176-0d28b44d7ffd</OwnerID>
<PostDate>2008-10-02T12:38:04.927</PostDate>
<Author>
<UserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</UserID>
<ImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/ea
0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto.jpg
</ImageUrl>
<SmallImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0
/b/ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto_s.jpg
</SmallImageUrl>
<PublicName>Anonymous</PublicName>
<ProfileURL>http://defaulttemplate.portbuild.com/Anonymous9</ProfileURL>
</Author>
<RemoteItem>
<ID>5b460568-8c20-408b-b099-1cb62061d7f0</ID>
<Title>This is an Item Title.</Title>
<Permalink>http://www.google.com</Permalink>
<RemoteItemGroup>
<ID>892b3d6d-4dbd-489e-bf41-037d2ccc665e</ID>
<Title>This is an Item Group Title.</Title>
<Description />
<XRefCode>ItemXRef0001</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0001</XRefCode>
<CommentExpirationDate />
<NumComments>4</NumComments>
</RemoteItem>

21
<Featured>false</Featured>
<FeaturedUserID />
<EditorNote />
<EditorNoteUserID />
</RemoteComment>
<RemoteComment>
<ID>4a20aea6-f72b-4003-9a39-11f1ad31ba66</ID>
<Text>This is a 2nd comment.</Text>
<OwnerID>ea0be746-1fad-405d-9176-0d28b44d7ffd</OwnerID>
<PostDate>2008-10-02T12:37:51.677</PostDate>
<Author>
<UserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</UserID>
<ImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/ea
0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto.jpg
</ImageUrl>
<SmallImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0
/b/ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto_s.jpg
</SmallImageUrl>
<PublicName>Anonymous</PublicName>
<ProfileURL>http://defaulttemplate.portbuild.com/Anonymous9</ProfileURL>
</Author>
<RemoteItem>
<ID>5b460568-8c20-408b-b099-1cb62061d7f0</ID>
<Title>This is an Item Title.</Title>
<Permalink>http://www.google.com</Permalink>
<RemoteItemGroup>
<ID>892b3d6d-4dbd-489e-bf41-037d2ccc665e</ID>
<Title>This is an Item Group Title.</Title>
<Description />
<XRefCode>ItemXRef0001</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0001</XRefCode>
<CommentExpirationDate />
<NumComments>4</NumComments>
</RemoteItem>
<Featured>false</Featured>
<FeaturedUserID />
<EditorNote />
<EditorNoteUserID />
</RemoteComment>
<RemoteComment>
<ID>9a94f473-9aef-45fb-b3c1-af5f49e6226b</ID>
<Text>This is a new comment.</Text>
<OwnerID>ea0be746-1fad-405d-9176-0d28b44d7ffd</OwnerID>
<PostDate>2008-10-02T12:26:11.74</PostDate>
<Author>
<UserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</UserID>
<ImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/ea

22
0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto.jpg
</ImageUrl>
<SmallImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0
/b/ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto_s.jpg
</SmallImageUrl>
<PublicName>Anonymous</PublicName>
<ProfileURL>http://defaulttemplate.portbuild.com/Anonymous9</ProfileURL>
</Author>
<RemoteItem>
<ID>5b460568-8c20-408b-b099-1cb62061d7f0</ID>
<Title>This is an Item Title.</Title>
<Permalink>http://www.google.com</Permalink>
<RemoteItemGroup>
<ID>892b3d6d-4dbd-489e-bf41-037d2ccc665e</ID>
<Title>This is an Item Group Title.</Title>
<Description />
<XRefCode>ItemXRef0001</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0001</XRefCode>
<CommentExpirationDate />
<NumComments>4</NumComments>
</RemoteItem>
<Featured>false</Featured>
<FeaturedUserID />
<EditorNote />
<EditorNoteUserID />
</RemoteComment>
</List>
</RemoteCommentCollection>
</GetItemGroupComments>
</CommentingService>

23
GetFeaturedCommunityComments
Returns a collection of Featured comment objects spanning the entire community. The comments will
be sorted by the most to least recent. If no NumItems values is supplied, the first 20 comments will be
returned.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
No ResultStart Int When pulling a subset of comments, where in the total list
of comments to begin.
No NumItems Int When pulling a subset of comments, how many comments
to pull.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<GetFeaturedCommunityComments>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<RemoteCommentCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<List>
<RemoteComment>
<ID>2bf3367c-2945-4bd5-87b5-77549e2e5f2b</ID>
<Text>Sample comment</Text>
<OwnerID>ea0be746-1fad-405d-9176-0d28b44d7ffd</OwnerID>
<PostDate>2008-10-02T13:32:29.067</PostDate>
<Author>
<UserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</UserID>
<ImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/ea0be
746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto.jpg
</ImageUrl>
<SmallImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/
ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto_s.jpg
</SmallImageUrl>
<PublicName>Anonymous</PublicName>
<ProfileURL>http://defaulttemplate.portbuild.com/Anonymous9</ProfileURL>
</Author>
<RemoteItem>
<ID>7390ab9d-4a78-497f-b642-75c87d08d70a</ID>
<Title>My Item Title.</Title>

24
<Permalink>http://www.theport.com</Permalink>
<RemoteItemGroup>
<ID>bf81820e-2c15-4204-8f40-347b689565b0</ID>
<Title>My Item Group Title.</Title>
<Description />
<XRefCode>ItemGroupXRef0003</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0002</XRefCode>
<CommentExpirationDate />
<NumComments>1</NumComments>
</RemoteItem>
<Featured>true</Featured>
<FeaturedUserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</FeaturedUserID>
<EditorNote />
<EditorNoteUserID />
</RemoteComment>
<RemoteComment>
<ID>1327f2d5-e319-4783-805d-3618f84fe3d7</ID>
<Text>This is a 4th comment.</Text>
<OwnerID>ea0be746-1fad-405d-9176-0d28b44d7ffd</OwnerID>
<PostDate>2008-10-02T12:38:13.973</PostDate>
<Author>
<UserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</UserID>
<ImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/ea0be
746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto.jpg
</ImageUrl>
<SmallImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/
ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto_s.jpg
</SmallImageUrl>
<PublicName>Anonymous</PublicName>
<ProfileURL>http://defaulttemplate.portbuild.com/Anonymous9</ProfileURL>
</Author>
<RemoteItem>
<ID>5b460568-8c20-408b-b099-1cb62061d7f0</ID>
<Title>This is an Item Title.</Title>
<Permalink>http://www.google.com</Permalink>
<RemoteItemGroup>
<ID>892b3d6d-4dbd-489e-bf41-037d2ccc665e</ID>
<Title>This is an Item Group Title.</Title>
<Description />
<XRefCode>ItemGroupXRef0001</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0001</XRefCode>
<CommentExpirationDate />
<NumComments>5</NumComments>
</RemoteItem>
<Featured>true</Featured>
<FeaturedUserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</FeaturedUserID>

25
<EditorNote />
<EditorNoteUserID />
</RemoteComment>
</List>
</RemoteCommentCollection>
</GetFeaturedCommunityComments>
</CommentingService>

26
GetFeaturedItemComments
Returns a collection of Featured comment objects associated with an Item. The comments will be
sorted by the most to least recent. If no NumItems values is supplied, the first 20 comments will be
returned.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
Yes XRefCode String External Unique Identifier of the Remote Item.
No ResultStart Int When pulling a subset of comments, where in the total list
of comments to begin.
No NumItems Int When pulling a subset of comments, how many comments
to pull.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<GetFeaturedItemGroupComments>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<RemoteCommentCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<List>
<RemoteComment>
<ID>2bf3367c-2945-4bd5-87b5-77549e2e5f2b</ID>
<Text>Sample comment</Text>
<OwnerID>ea0be746-1fad-405d-9176-0d28b44d7ffd</OwnerID>
<PostDate>2008-10-02T13:32:29.067</PostDate>
<Author>
<UserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</UserID>
<ImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/ea0be
746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto.jpg
</ImageUrl>
<SmallImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/
ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto_s.jpg
</SmallImageUrl>
<PublicName>Anonymous</PublicName>
<ProfileURL>http://defaulttemplate.portbuild.com/Anonymous9</ProfileURL>
</Author>

27
<RemoteItem>
<ID>7390ab9d-4a78-497f-b642-75c87d08d70a</ID>
<Title>My Item Title.</Title>
<Permalink>http://www.theport.com</Permalink>
<RemoteItemGroup>
<ID>bf81820e-2c15-4204-8f40-347b689565b0</ID>
<Title>My Item Group Title.</Title>
<Description />
<XRefCode>ItemGroupXRef0003</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0002</XRefCode>
<CommentExpirationDate />
<NumComments>1</NumComments>
</RemoteItem>
<Featured>true</Featured>
<FeaturedUserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</FeaturedUserID>
<EditorNote />
<EditorNoteUserID />
</RemoteComment>
</List>
</RemoteCommentCollection>
</GetFeaturedItemGroupComments>
</CommentingService>

28
GetFeaturedItemGroupComments
Returns a collection of Featured comment objects associated with an ItemGroup. The comments will
be sorted by the most to least recent. If no NumItems values is supplied, the first 20 comments will be
returned.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
Yes XRefCode String External Unique Identifier of the Remote Item Group.
No ResultStart Int When pulling a subset of comments, where in the total list
of comments to begin.
No NumItems Int When pulling a subset of comments, how many comments
to pull.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<GetFeaturedItemGroupComments>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<RemoteCommentCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<List>
<RemoteComment>
<ID>2bf3367c-2945-4bd5-87b5-77549e2e5f2b</ID>
<Text>Sample comment</Text>
<OwnerID>ea0be746-1fad-405d-9176-0d28b44d7ffd</OwnerID>
<PostDate>2008-10-02T13:32:29.067</PostDate>
<Author>
<UserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</UserID>
<ImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/ea0be
746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto.jpg
</ImageUrl>
<SmallImageUrl>http://defaulttemplate.portbuild.com/blogs/portblogs/u/s/e/r/userfiles/e/a/0/b/
ea0be746-1fad-405d-9176-0d28b44d7ffd/profile/{93ab9a6c-0520-4ed2-9d08-
ce5e1bfbc478}/profilephoto_s.jpg
</SmallImageUrl>
<PublicName>Anonymous</PublicName>
<ProfileURL>http://defaulttemplate.portbuild.com/Anonymous9</ProfileURL>
</Author>

29
<RemoteItem>
<ID>7390ab9d-4a78-497f-b642-75c87d08d70a</ID>
<Title>My Item Title.</Title>
<Permalink>http://www.theport.com</Permalink>
<RemoteItemGroup>
<ID>bf81820e-2c15-4204-8f40-347b689565b0</ID>
<Title>My Item Group Title.</Title>
<Description />
<XRefCode>ItemGroupXRef0003</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0002</XRefCode>
<CommentExpirationDate />
<NumComments>1</NumComments>
</RemoteItem>
<Featured>true</Featured>
<FeaturedUserID>ea0be746-1fad-405d-9176-0d28b44d7ffd</FeaturedUserID>
<EditorNote />
<EditorNoteUserID />
</RemoteComment>
</List>
</RemoteCommentCollection>
</GetFeaturedItemGroupComments>
</CommentingService>

30
Item Methods
SetItemExpirationDate
Sets the DateTime at which an Item will no longer be available for commenting. The User setting the
Item Expiration Date must have content moderation privileges, otherwise an error message will be
returned.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
No ClientIP String IP Address of the client machine that is setting the Item's
Expiration Date. If supplied, ip will be checked against the
list of banned ip's.
Yes UserToken String The UserToken is an encrypted GUID passed as a string to
determine whether or not the User setting the Item's
Expiration Date is authenticated and has the necessary
permissions to do so. It can be retrieved from the User's
tp_ssid cookie.
Yes XRefCode String External Unique Identifier of the Item whose Expiration
Date is being set.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<SetItemExpirationDateForComments>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<Response>The Item was updated.</Response>
</SetItemExpirationDateForComments>
</UnfeatureComment>

31
GetRemoteItemStats
Gets various commenting statistics for an Item.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
Yes XRefCode String External UniqueIdentifier of the Item.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<GetRemoteItemStats>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<RemoteItemStats xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ID>5b460568-8c20-408b-b099-1cb62061d7f0</ID>
<RemoteItemID>5b460568-8c20-408b-b099-1cb62061d7f0</RemoteItemID>
<NumPublishedRegisteredComments>4</NumPublishedRegisteredComments>
<NumPublishedAnonComments>0</NumPublishedAnonComments>
<NumPendingRegisteredComments>0</NumPendingRegisteredComments>
<NumPendingAnonComments>0</NumPendingAnonComments>
<NumHoldRegisteredComments>0</NumHoldRegisteredComments>
<NumHoldAnonComments>0</NumHoldAnonComments>
<NumUniquePublishedUsers>1</NumUniquePublishedUsers>
<NumPublishedComments>4</NumPublishedComments>
</RemoteItemStats>
</GetRemoteItemStats>
</CommentingService>

GetRemoteItemStatsBulk
Gets various commenting statistics for up to 50 items.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
Yes XRefCodeList String A comma separated list of XrefCodes. Up to 50 can be
provided

32
Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<GetRemoteItemStatsBulk>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<RemoteItemStatsCollection>
<ObjectType></ObjectType>
<NumItems></NumItems>
<TotalItems></TotalItems>
<ResultStart></ResultStart>
<CurrentPage></CurrentPage>
<PageCount></PageCount>
<List>
<RemoteItemStats>
<ID>5b460568-8c20-408b-b099-1cb62061d7f0</ID>
<RemoteItemID>5b460568-8c20-408b-b099-1cb62061d7f0</RemoteItemID>
<NumPublishedRegisteredComments>4</NumPublishedRegisteredComments>
<NumPublishedAnonComments>0</NumPublishedAnonComments>
<NumPendingRegisteredComments>0</NumPendingRegisteredComments>
<NumPendingAnonComments>0</NumPendingAnonComments>
<NumHoldRegisteredComments>0</NumHoldRegisteredComments>
<NumHoldAnonComments>0</NumHoldAnonComments>
<NumUniquePublishedUsers>1</NumUniquePublishedUsers>
<NumPublishedComments>4</NumPublishedComments>
<XrefCode>2222</XrefCode>
</RemoteItemStats>
<RemoteItemStats>
<ID>5b460568-8c20-408b-b099-1cb62061d7f0</ID>
<RemoteItemID>5b460568-8c20-408b-b099-1cb62061d7f0</RemoteItemID>
<NumPublishedRegisteredComments>4</NumPublishedRegisteredComments>
<NumPublishedAnonComments>0</NumPublishedAnonComments>
<NumPendingRegisteredComments>0</NumPendingRegisteredComments>
<NumPendingAnonComments>0</NumPendingAnonComments>
<NumHoldRegisteredComments>0</NumHoldRegisteredComments>
<NumHoldAnonComments>0</NumHoldAnonComments>
<NumUniquePublishedUsers>1</NumUniquePublishedUsers>
<NumPublishedComments>4</NumPublishedComments>
<XrefCode>2222</XrefCode>
</RemoteItemStats>
</RemoteItemStatsCollection>
</CommentingService>

33
Item Collection Methods
GetMostCommentedGroupItems
Gets the most commented Items for a particular Group. The Items will be sorted by the most to least
recent. If no NumItems values is supplied, the first 20 Items will be returned.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
Yes XRefCode String External Unique Identifier of the Remote Item Group.
No ResultStart Int When pulling a subset of items, where in the total list of
items to begin.
No NumItems Int When pulling a subset of items, how many items to pull.
No MaxHoursOld Int Maximum number of hours in the past since the item to
which comments belong has been posted.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<GetMostCommentedGroupItems>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<RemoteItemCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<List>
<RemoteItem>
<ID>f40de20b-fb98-4f93-bb5a-461b94a65baa</ID>
<Title>My Item Title</Title>
<Permalink>http://www.theport.com</Permalink>
<RemoteItemGroup>
<ID>117e9cb0-0a4e-4984-beee-d6e8ee9bfd17</ID>

34
<Title>My Item Group Title.</Title>
<Description />
<XRefCode>ItemGroupXRef0002</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0005</XRefCode>
<CommentExpirationDate />
<NumComments>4</NumComments>
</RemoteItem>
<RemoteItem>
<ID>f1122ec0-228e-474c-8353-687b0eb59d82</ID>
<Title>My Item Title</Title>
<Permalink>http://www.theport.com</Permalink>
<RemoteItemGroup>
<ID>117e9cb0-0a4e-4984-beee-d6e8ee9bfd17</ID>
<Title>My Item Group Title.</Title>
<Description />
<XRefCode>ItemGroupXRef0002</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0004</XRefCode>
<CommentExpirationDate />
<NumComments>3</NumComments>
</RemoteItem>
</List>
</RemoteItemCollection>
</GetMostCommentedGroupItems>
</CommentingService>

35
GetMostCommentedCommunityItems
Gets the most commented Items spanning the entire community. The Items will be sorted by the most
to least recent. If no NumItems values is supplied, the first 20 Items will be returned.

Parameters

Required Name Type Description


Yes DeveloperKey String The Developer Key is an encrypted GUID passed as a
string. It is used to authenticate requests.
No ResultStart Int When pulling a subset of items, where in the total list of
items to begin.
No NumItems Int When pulling a subset of items, how many items to pull.
No MaxHoursOld Int Maximum number of hours in the past since the item to
which comments belong has been posted.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<GetMostCommentedCommunityItems>
<ResponseStatus>OK</ResponseStatus>
<ResponseCode>200</ResponseCode>
<RemoteItemCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<List>
<RemoteItem>
<ID>84afc11a-7dd6-466a-997c-882cd0f00257</ID>
<Title>Test Article</Title>
<Permalink>http://journaltimesonline.com/articles/2008/04/24/local_news/doc48100634ab8a3
633597461_test.txt
</Permalink>
<RemoteItemGroup />
<XRefCode>testarticle5000</XRefCode>
<CommentExpirationDate />
<NumComments>38</NumComments>
</RemoteItem>
<RemoteItem>
<ID>7390ab9d-4a78-497f-b642-75c87d08d70a</ID>
<Title>My Item Title.</Title>
<Permalink>http://www.theport.com</Permalink>
<RemoteItemGroup>
<ID>bf81820e-2c15-4204-8f40-347b689565b0</ID>
<Title>My Item Group Title.</Title>
<Description />

36
<XRefCode>ItemGroupXRef0003</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0002</XRefCode>
<CommentExpirationDate />
<NumComments>7</NumComments>
</RemoteItem>
<RemoteItem>
<ID>f40de20b-fb98-4f93-bb5a-461b94a65baa</ID>
<Title>My Item Title</Title>
<Permalink>http://www.theport.com</Permalink>
<RemoteItemGroup>
<ID>117e9cb0-0a4e-4984-beee-d6e8ee9bfd17</ID>
<Title>My Item Group Title.</Title>
<Description />
<XRefCode>ItemGroupXRef0002</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0005</XRefCode>
<CommentExpirationDate />
<NumComments>4</NumComments>
</RemoteItem>
<RemoteItem>
<ID>5b460568-8c20-408b-b099-1cb62061d7f0</ID>
<Title>This is an Item Title.</Title>
<Permalink>http://www.google.com</Permalink>
<RemoteItemGroup>
<ID>892b3d6d-4dbd-489e-bf41-037d2ccc665e</ID>
<Title>This is an Item Group Title.</Title>
<Description />
<XRefCode>ItemGroupXRef0001</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0001</XRefCode>
<CommentExpirationDate>10/15/2008 7:00:00 PM</CommentExpirationDate>
<NumComments>4</NumComments>
</RemoteItem>
<RemoteItem>
<ID>f1122ec0-228e-474c-8353-687b0eb59d82</ID>
<Title>My Item Title</Title>
<Permalink>http://www.theport.com</Permalink>
<RemoteItemGroup>
<ID>117e9cb0-0a4e-4984-beee-d6e8ee9bfd17</ID>
<Title>My Item Group Title.</Title>
<Description />
<XRefCode>ItemGroupXRef0002</XRefCode>
</RemoteItemGroup>
<XRefCode>ItemXRef0004</XRefCode>
<CommentExpirationDate />
<NumComments>3</NumComments>
</RemoteItem>
</List>
</RemoteItemCollection>

37
</GetMostCommentedCommunityItems>
</CommentingService>

Error Handling
In the event of a request error, a serialized object will be returned with a ResponseCode of 500.

Sample Return XML

<?xml version="1.0" encoding="utf-8"?>


<CommentingService>
<DeleteComment>
<ResponseStatus>Failed</ResponseStatus>
<ResponseCode>500</ResponseCode>
<error>
<exception>The UserToken is invalid.</exception>
</error>
</DeleteComment>
</CommentingService>

38