SocialDataService.GetRatingAverageOnUrl Method
Retrieves the average rating for the specified URL.
Namespace: [SocialDataService Web service]
Web service reference: http://Site/_vti_bin/SocialDataService.asmx
Syntax
'Declaration
<SoapDocumentMethodAttribute("https://microsoft.com/webservices/SharePointPortalServer/SocialDataService/GetRatingAverageOnUrl", RequestNamespace := "https://microsoft.com/webservices/SharePointPortalServer/SocialDataService", _
ResponseNamespace := "https://microsoft.com/webservices/SharePointPortalServer/SocialDataService", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function GetRatingAverageOnUrl ( _
url As String _
) As SocialRatingAverageDetail
'Usage
Dim instance As SocialDataService
Dim url As String
Dim returnValue As SocialRatingAverageDetail
returnValue = instance.GetRatingAverageOnUrl(url)
[SoapDocumentMethodAttribute("https://microsoft.com/webservices/SharePointPortalServer/SocialDataService/GetRatingAverageOnUrl", RequestNamespace = "https://microsoft.com/webservices/SharePointPortalServer/SocialDataService",
ResponseNamespace = "https://microsoft.com/webservices/SharePointPortalServer/SocialDataService",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public SocialRatingAverageDetail GetRatingAverageOnUrl(
string url
)
Parameters
url
Type: System.StringThe URL for which the average rating is retrieved. This value must be in a valid URI format and nust contain fewer than 2085 characters.
Return Value
Type: [SocialDataService Web service].SocialRatingAverageDetail
The average rating for the specified URL.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | url is null . |
UriFormatException | url is not in the correct format. |
SqlException | The user does not have permission to access the social ratings. |
Remarks
If this method does not find any social ratings for the URI, it sets the return value‘s LastModifiedTime property to MinValue(), Average property to negative infinity, and Count property to MinValue. If this method does not find any social ratings for the current user, it sets the return value’s CurrentUserRating property to -1.