16 lines
570 B
TypeScript
16 lines
570 B
TypeScript
import {Injectable} from '@angular/core';
|
|
import {HttpClient} from "@angular/common/http";
|
|
import{EnvProperties} from '../../utils/properties/env-properties';
|
|
|
|
@Injectable()
|
|
export class SearchZenodoCommunitiesService {
|
|
constructor(private http: HttpClient ) {}
|
|
|
|
searchZCommunities (properties:EnvProperties, pid: string):any {
|
|
let url = properties.communityAPI+pid+"/zenodocommunities";
|
|
|
|
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
|
|
//.map(res => <any> res.json())
|
|
}
|
|
}
|