convert to livescript.

convert api lib to livescript but keep sample in javascript formate.