Esempio n. 1
0
def playlist(hash, publc, uniq_id, username=""):
	if username == 'false':
		username = ''
		
	x = Playlists()
	data = False
	# create a hash
	m = md5.new(publc + uniq_id + _private_key())
	
	# check if this hash is equal to the one transmitted
	if m.hexdigest() == hash:
		
			
		param = {
			'uniq_id' : uniq_id,
			'username': username
		}
		data = x.getPlaylist(param)
			
	return {
		'data': data,
		'id': 1234
	}