public static BoxUser getCurrentUser ( BoxAPIConnection api ) { URL url = GET_ME_URL . build ( api . getBaseURL ( ) ) ; BoxAPIRequest request = new BoxAPIRequest ( api , url , "GET" ) ; BoxJSONResponse response = ( BoxJSONResponse ) request . send ( ) ; JsonObject jsonObject = JsonObject . readFrom ( response . getJSON ( ) ) ; return new BoxUser ( api , jsonObject . get ( "id" ) . asString ( ) ) ; }
Gets the current user .