Type.registerNamespace('YouDo.WebServices');
YouDo.WebServices.RatingService=function() {
YouDo.WebServices.RatingService.initializeBase(this);
this._timeout = 0;
this._userContext = null;
this._succeeded = null;
this._failed = null;
}
YouDo.WebServices.RatingService.prototype={
_get_path:function() {
 var p = this.get_path();
 if (p) return p;
 else return YouDo.WebServices.RatingService._staticInstance.get_path();},
GetRatingDetails:function(objectId,type,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'GetRatingDetails',false,{objectId:objectId,type:type},succeededCallback,failedCallback,userContext); },
RateObject:function(objectId,type,positive,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'RateObject',false,{objectId:objectId,type:type,positive:positive},succeededCallback,failedCallback,userContext); },
AjaxRateObject:function(objectId,type,positive,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'AjaxRateObject',false,{objectId:objectId,type:type,positive:positive},succeededCallback,failedCallback,userContext); },
RateComment:function(commentId,positive,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'RateComment',false,{commentId:commentId,positive:positive},succeededCallback,failedCallback,userContext); },
RateTask:function(taskId,positive,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'RateTask',false,{taskId:taskId,positive:positive},succeededCallback,failedCallback,userContext); },
RateSolution:function(solutionId,positive,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'RateSolution',false,{solutionId:solutionId,positive:positive},succeededCallback,failedCallback,userContext); },
RateForumNote:function(noteId,positive,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'RateForumNote',false,{noteId:noteId,positive:positive},succeededCallback,failedCallback,userContext); },
KarmUser:function(userId,score,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'KarmUser',false,{userId:userId,score:score},succeededCallback,failedCallback,userContext); }}
YouDo.WebServices.RatingService.registerClass('YouDo.WebServices.RatingService',Sys.Net.WebServiceProxy);
YouDo.WebServices.RatingService._staticInstance = new YouDo.WebServices.RatingService();
YouDo.WebServices.RatingService.set_path = function(value) { YouDo.WebServices.RatingService._staticInstance.set_path(value); }
YouDo.WebServices.RatingService.get_path = function() { return YouDo.WebServices.RatingService._staticInstance.get_path(); }
YouDo.WebServices.RatingService.set_timeout = function(value) { YouDo.WebServices.RatingService._staticInstance.set_timeout(value); }
YouDo.WebServices.RatingService.get_timeout = function() { return YouDo.WebServices.RatingService._staticInstance.get_timeout(); }
YouDo.WebServices.RatingService.set_defaultUserContext = function(value) { YouDo.WebServices.RatingService._staticInstance.set_defaultUserContext(value); }
YouDo.WebServices.RatingService.get_defaultUserContext = function() { return YouDo.WebServices.RatingService._staticInstance.get_defaultUserContext(); }
YouDo.WebServices.RatingService.set_defaultSucceededCallback = function(value) { YouDo.WebServices.RatingService._staticInstance.set_defaultSucceededCallback(value); }
YouDo.WebServices.RatingService.get_defaultSucceededCallback = function() { return YouDo.WebServices.RatingService._staticInstance.get_defaultSucceededCallback(); }
YouDo.WebServices.RatingService.set_defaultFailedCallback = function(value) { YouDo.WebServices.RatingService._staticInstance.set_defaultFailedCallback(value); }
YouDo.WebServices.RatingService.get_defaultFailedCallback = function() { return YouDo.WebServices.RatingService._staticInstance.get_defaultFailedCallback(); }
YouDo.WebServices.RatingService.set_path("/WebServices/RatingService.asmx");
YouDo.WebServices.RatingService.GetRatingDetails= function(objectId,type,onSuccess,onFailed,userContext) {YouDo.WebServices.RatingService._staticInstance.GetRatingDetails(objectId,type,onSuccess,onFailed,userContext); }
YouDo.WebServices.RatingService.RateObject= function(objectId,type,positive,onSuccess,onFailed,userContext) {YouDo.WebServices.RatingService._staticInstance.RateObject(objectId,type,positive,onSuccess,onFailed,userContext); }
YouDo.WebServices.RatingService.AjaxRateObject= function(objectId,type,positive,onSuccess,onFailed,userContext) {YouDo.WebServices.RatingService._staticInstance.AjaxRateObject(objectId,type,positive,onSuccess,onFailed,userContext); }
YouDo.WebServices.RatingService.RateComment= function(commentId,positive,onSuccess,onFailed,userContext) {YouDo.WebServices.RatingService._staticInstance.RateComment(commentId,positive,onSuccess,onFailed,userContext); }
YouDo.WebServices.RatingService.RateTask= function(taskId,positive,onSuccess,onFailed,userContext) {YouDo.WebServices.RatingService._staticInstance.RateTask(taskId,positive,onSuccess,onFailed,userContext); }
YouDo.WebServices.RatingService.RateSolution= function(solutionId,positive,onSuccess,onFailed,userContext) {YouDo.WebServices.RatingService._staticInstance.RateSolution(solutionId,positive,onSuccess,onFailed,userContext); }
YouDo.WebServices.RatingService.RateForumNote= function(noteId,positive,onSuccess,onFailed,userContext) {YouDo.WebServices.RatingService._staticInstance.RateForumNote(noteId,positive,onSuccess,onFailed,userContext); }
YouDo.WebServices.RatingService.KarmUser= function(userId,score,onSuccess,onFailed,userContext) {YouDo.WebServices.RatingService._staticInstance.KarmUser(userId,score,onSuccess,onFailed,userContext); }
var gtc = Sys.Net.WebServiceProxy._generateTypedConstructor;
Type.registerNamespace('YouDo.Entities.Rating');
if (typeof(YouDo.Entities.Rating.ScoreInfo) === 'undefined') {
YouDo.Entities.Rating.ScoreInfo=gtc("YouDo.Entities.Rating.ScoreInfo");
YouDo.Entities.Rating.ScoreInfo.registerClass('YouDo.Entities.Rating.ScoreInfo');
}
if (typeof(YouDo.Entities.Rating.RatingType) === 'undefined') {
YouDo.Entities.Rating.RatingType = function() { throw Error.invalidOperation(); }
YouDo.Entities.Rating.RatingType.prototype = {None: 0,Registration: 1,PaidTask: 2,FreeTask: 3,Solution: 4,Note: 5,Comment: 6,Quiz: 7,FirstModeratedPhoto: 8}
YouDo.Entities.Rating.RatingType.registerEnum('YouDo.Entities.Rating.RatingType', true);
}
