1 |
61381
|
k.triantaf
|
import {Injectable} from '@angular/core';
|
2 |
|
|
import {HttpClient} from "@angular/common/http";
|
3 |
|
|
import{EnvProperties} from '../../utils/properties/env-properties';
|
4 |
|
|
|
5 |
|
|
@Injectable()
|
6 |
|
|
export class SearchZenodoCommunitiesService {
|
7 |
|
|
constructor(private http: HttpClient ) {}
|
8 |
|
|
|
9 |
|
|
searchZCommunities (properties:EnvProperties, pid: string):any {
|
10 |
|
|
let url = properties.communityAPI+pid+"/zenodocommunities";
|
11 |
|
|
|
12 |
|
|
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
|
13 |
|
|
//.map(res => <any> res.json())
|
14 |
|
|
}
|
15 |
|
|
}
|