refactorted get friends code to api client instance methods