src/ORCIDService.php
protected function searchProfiles( $query )
    {
        $token = $this->getOAuthToken();
        if (!$token) return;

        $response = Unirest\Request::get(
            "https://pub.orcid.org/v1.2/search/orcid-bio/",
            [
                'Authorization' => "Bearer $token",
                'Content-Type' => 'application/orcid+json'
            ],
            # TODO: search in names only and use boosting
            [ 'q' => luceneQuery('text',$query) ]
        );

        if ($response->code == 200) {
            return $response->body->{'orcid-search-results'};
        }
    }
protected function searchProfiles( $query )
    {
        $token = $this->getOAuthToken();
        if (!$token) return;

        $response = Unirest\Request::get(
            "https://pub.orcid.org/v1.2/search/orcid-bio/",
            [
                'Authorization' => "Bearer $token",
                'Content-Type' => 'application/orcid+json'
            ],
            # TODO: search in names only and use boosting
            [ 'q' => luceneQuery('text',$query) ]
        );

        if ($response->code == 200) {
            return $response->body->{'orcid-search-results'};
        }
    }
protected function searchProfiles ( $ query ) { $ token = $ this -> getOAuthToken ( ) ; if ( ! $ token ) return ; $ response = Unirest \ Request :: get ( "https://pub.orcid.org/v1.2/search/orcid-bio/" , [ 'Authorization' => "Bearer $token" , 'Content-Type' => 'application/orcid+json' ] , # TODO: search in names only and use boosting [ 'q' => luceneQuery ( 'text' , $ query ) ] ) ; if ( $ response -> code == 200 ) { return $ response -> body -> { 'orcid-search-results' } ; } }
search for an ORCID profile
search for an ORCID profile