Class: Kaltura::KalturaLikeService

Inherits:
KalturaServiceBase show all
Defined in:
lib/kaltura_plugins/kaltura_like_client_plugin.rb

Overview

Allows user to ‘like’ or ‘unlike’ and entry

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaLikeService

Returns a new instance of KalturaLikeService.



36
37
38
# File 'lib/kaltura_plugins/kaltura_like_client_plugin.rb', line 36

def initialize(client)
	super(client)
end

Instance Method Details

#check_like_exists(entry_id, user_id = KalturaNotImplemented) ⇒ Object



60
61
62
63
64
65
66
67
68
69
# File 'lib/kaltura_plugins/kaltura_like_client_plugin.rb', line 60

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

#like(entry_id) ⇒ Object



40
41
42
43
44
45
46
47
48
# File 'lib/kaltura_plugins/kaltura_like_client_plugin.rb', line 40

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

#unlike(entry_id) ⇒ Object



50
51
52
53
54
55
56
57
58
# File 'lib/kaltura_plugins/kaltura_like_client_plugin.rb', line 50

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