openaire-library/connect/zenodoCommunities/searchZenodoCommunities.ser...

16 lines
564 B
TypeScript
Raw Normal View History

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