Tridion UGC Blog Series: UGC Web Service API

Tridion UGC Web Service API Cheatsheet

You can use Tridion UGC Web Service to perform various activities related to comments and ratings management on a page or a content of a page.

For this, please get the Tridion.ContentDelivery.UGC.dll from the SDL Tridion installation disk and add a reference to it.In your code, add following using namespaces:

using Tridion.ContentDelivery.UGC.Web.Model;
using Tridion.ContentDelivery.UGC.WebService;

then use following web service calls:

  • To Retrieve All Comments for a page:
CommentsRetriever.RetrieveComments(PageUri, Submitted, FlaggedForModeration, Posted, Resubmitted, Rejected, FlaggedForDeletion, OrderDescending, int.MaxValue, 0);
  • To Retrieve Top 10 Comments for a page:
CommentsRetriever.RetrieveComments(PageUri, Submitted, FlaggedForModeration, Posted, Resubmitted, Rejected, FlaggedForDeletion, OrderDescending, 10, 0);
  • To Submit a Comment for a page:
WebServiceHelper.PostComment(PageUri, UserName, UserEmailID, CommentText);
  • To Like/Up vote a Comment on a page:
WebServiceHelper.VoteCommentUp(commentID);
  • To Dislike/Down vote a Comment on a page:
WebServiceHelper.VoteCommentDown(commentID);
  • To Edit a comment on a page:
WebServiceHelper.EditComment(PageUri, commentID, commentText);
  • To Remove/Delete a comment from a page:
WebServiceHelper.RemoveComment(commentID);
  • To Submit a Rating for a page or Like a Page:
WebServiceHelper.PostRating(PageUri, 5);
  • To View Total Likes for a page:
ItemStatsRetriever.RetrieveItemStats(PageUri).NumberOfRatings
  • To View Average Ratings for a page:
ItemStatsRetriever.RetrieveItemStats(PageUri).AverageRating

NEXTManaging and Analyzing Comments/Rating from CME

10+ years of experience in Software Development Life Cycle using AGILE, Iterative and RUP approaches. Hand-on experience in following: - CMS packages: SDL Tridion, Umbraco, Kentico, SiteFinity and Alfresco - Search Engines: SOLR, Endecca, FAST - .NET Technologies: .NET & .NET CE Framework, ASP.NET, ASP.NET MVC, WCF, WinForms - Mobile Development: Android Native App, Windows Mobile App - Database: MS-SQL Server, MySQL - Program Management: JIRA, MS-Project - Design Tools: MS-Visio, StarUML Have decent knowledge about Core Java, Spring MVC, Ektron and Google Mini Instrumental in Application Architecture, Designing (HLD & LLD), Coding and deployment .NET applications (Web, Desktop, Mobile). Experience in following domain: - Digital Media & eCommerce - Travel & Hospitality - Aviation Industry - Education - Insurance - Automation - Automobile - Railways Freelance trainer and consultant in .NET, CMS, SDL Tridion, Alfresco and soft skills like business communication, e-mail etiquette etc. Education: Bachelor Degree in Computer Engineering and Post Graduate Diploma in Business Administration with specialization in Marketing

Tagged with: , ,
Posted in SDL Tridion

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: