[Trunk | Library]: searchResearchResults.service.ts: Add method "searchForMyOrcidLinks()". (update of file missing from commit r60394 (where my-orcid-links folder was added).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60398 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
66645f70f2
commit
b3e5a0a947
|
@ -6,6 +6,7 @@ import {Dates, DOI, StringUtils} from '../utils/string-utils.class';
|
|||
import {ParsingFunctions} from '../landingPages/landing-utils/parsingFunctions.class';
|
||||
import {EnvProperties} from '../utils/properties/env-properties';
|
||||
import {map} from "rxjs/operators";
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
|
||||
@Injectable()
|
||||
|
@ -157,6 +158,18 @@ export class SearchResearchResultsService {
|
|||
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties)]));
|
||||
}
|
||||
|
||||
searchForMyOrcidLinks (resultType:string, orcidQuery: string, typeQuery: string, page: number, size: number):any {
|
||||
let url = properties.searchAPIURLLAst+"resources2/?format=json";
|
||||
if(orcidQuery!= null && orcidQuery != '' ) {
|
||||
url +="&query=(" + orcidQuery + ")";
|
||||
}
|
||||
url += typeQuery;
|
||||
url += "&page="+(page-1)+"&size="+size;
|
||||
|
||||
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
|
||||
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties)]));
|
||||
}
|
||||
|
||||
parseResults(resultType:string, data: any, properties: EnvProperties): SearchResult[] {
|
||||
let results: SearchResult[] = [];
|
||||
|
||||
|
|
Loading…
Reference in New Issue