public JSONAPIDocument < User > fetchUser ( Collection < User . UserField > optionalFields ) throws IOException { URIBuilder pathBuilder = new URIBuilder ( ) . setPath ( "current_user" ) . addParameter ( "include" , "pledges" ) ; if ( optionalFields != null ) { Set < User . UserField > optionalAndDefaultFields = new HashSet <> ( optionalFields ) ; optionalAndDefaultFields . addAll ( User . UserField . getDefaultFields ( ) ) ; addFieldsParam ( pathBuilder , User . class , optionalAndDefaultFields ) ; } return converter . readDocument ( getDataStream ( pathBuilder . toString ( ) ) , User . class ) ; }
Get the user object of the creator