add doc to api
move client to api
rename api to session
move attribute error to models