SocialDataService.SetRating method

Creates a social rating for the current user with the specified value, on a scale of 1-5, for the specified URL.

Namespace:  WebSvcSocialDataService
Assembly:  UserProfileServices (in UserProfileServices.dll)

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://microsoft.com/webservices/SharePointPortalServer/SocialDataService/SetRating", RequestNamespace := "https://microsoft.com/webservices/SharePointPortalServer/SocialDataService",  _
    ResponseNamespace := "https://microsoft.com/webservices/SharePointPortalServer/SocialDataService",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function SetRating ( _
    url As String, _
    rating As Integer, _
    title As String, _
    analysisDataEntry As FeedbackData _
) As DateTime
'Usage
Dim instance As SocialDataService
Dim url As String
Dim rating As Integer
Dim title As String
Dim analysisDataEntry As FeedbackData
Dim returnValue As DateTime

returnValue = instance.SetRating(url, _
    rating, title, analysisDataEntry)
[SoapDocumentMethodAttribute("https://microsoft.com/webservices/SharePointPortalServer/SocialDataService/SetRating", RequestNamespace = "https://microsoft.com/webservices/SharePointPortalServer/SocialDataService", 
    ResponseNamespace = "https://microsoft.com/webservices/SharePointPortalServer/SocialDataService", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public DateTime SetRating(
    string url,
    int rating,
    string title,
    FeedbackData analysisDataEntry
)

Parameters

  • url
    Type: System.String

    The URL for which the social rating is to be applied. This value must be in a valid URI format and must contain fewer than 2085 characters.

  • rating
    Type: System.Int32

    The user’s social rating for the URL. This value must be between 1 and 5, inclusive.

  • title
    Type: System.String

    The title of the social rating. This value cannot be more than 500 characters.

Return value

Type: System.DateTime
The time when the social rating is set.

Exceptions

Exception Condition
ArgumentNullException

url is null .

UriFormatException

url is not a valid format.

UnauthorizedAccessException

The current user profile cannot be found.

ArgumentOutOfRangeException

The value of rating is less than 1 or greater than 5.

UnauthorizedAccessException

The user does not have permissions to create a social rating.

Remarks

This method updates the rating if a rating exists for the URL by the current user. The social rating is a 5-star rating system, so the rating parameter must be greater than or equal to 1 and less than or equal to 5.

See also

Reference

SocialDataService class

SocialDataService members

WebSvcSocialDataService namespace