Example #1
0
def set_public(hash, publc, is_public, id):
	x = Videos()
	
	# create a hash
	m = md5.new(id + publc + _private_key())
	
	if m.hexdigest() == hash:
		param = {
			'id': id,
			'is_public': is_public
		}
		bool = x.embedToPublic(param)
		dat = { 'response' : bool }
	else:
		dat = { 'response': 'failed' }
		
	return dat