private Identity fetch(final String token) throws IOException {
        // @checkstyle LineLength (1 line)
        final String uri = this.apihref
            .with("oauth2_access_token", token)
            .with("format", "json")
            .toString();
        return PsLinkedin.parse(
            new JdkRequest(uri)
                .header("accept", "application/json")
                .fetch().as(RestResponse.class)
                .assertStatus(HttpURLConnection.HTTP_OK)
                .as(JsonResponse.class).json().readObject()
        );
    }
private Identity fetch ( final String token ) throws IOException { final String uri = this . apihref . with ( "oauth2_access_token" , token ) . with ( "format" , "json" ) . toString ( ) ; return PsLinkedin . parse ( new JdkRequest ( uri ) . header ( "accept" , "application/json" ) . fetch ( ) . as ( RestResponse . class ) . assertStatus ( HttpURLConnection . HTTP_OK ) . as ( JsonResponse . class ) . json ( ) . readObject ( ) ) ; }
Get user name from Linkedin, with the token provided.
@param token PsLinkedin access token
@return The user found in PsLinkedin
@throws IOException If fails