openaire-library/connect/contentProviders/searchDataproviders.service.ts

17 lines
627 B
TypeScript

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