# =================================================================================================== # _ __ _ _ # | |/ /__ _| | |_ _ _ _ _ __ _ # | ' . # # @ignore # =================================================================================================== require 'kaltura_client.rb' module Kaltura # Allows user to 'like' or 'unlike' and entry # class KalturaLikeService < KalturaServiceBase def initialize(client) super(client) end def like(entry_id) kparams = {} client.add_param(kparams, 'entryId', entry_id); client.queue_service_action_call('like_like', 'like', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end def unlike(entry_id) kparams = {} client.add_param(kparams, 'entryId', entry_id); client.queue_service_action_call('like_like', 'unlike', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end def check_like_exists(entry_id, user_id=KalturaNotImplemented) kparams = {} client.add_param(kparams, 'entryId', entry_id); client.add_param(kparams, 'userId', user_id); client.queue_service_action_call('like_like', 'checkLikeExists', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end end class KalturaClient < KalturaClientBase attr_reader :like_service def like_service if (@like_service == nil) @like_service = KalturaLikeService.new(self) end return @like_service end end end