finished restful api for friends according to example json