2018-01-29 15:32:41 +01:00
|
|
|
import { Injectable } from '@angular/core';
|
|
|
|
import { Http, Response, Headers, RequestOptions } from '@angular/http';
|
|
|
|
import { Observable } from 'rxjs/Rx';
|
|
|
|
|
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
export class CommunityService {
|
|
|
|
|
2018-01-29 15:44:50 +01:00
|
|
|
constructor(private http:Http) {
|
|
|
|
}
|
2018-01-29 15:32:41 +01:00
|
|
|
|
2018-01-29 15:44:50 +01:00
|
|
|
getNumberOfPublications() {
|
|
|
|
return this.http.get('http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/publications/count?format=json')
|
|
|
|
.map(res => <any> res.json()).do(res => {console.log(res)});
|
|
|
|
}
|
2018-01-29 15:32:41 +01:00
|
|
|
|
2018-01-29 15:44:50 +01:00
|
|
|
getNumberOfResearchData() {
|
|
|
|
return this.http.get('http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/datasets/count?format=json&fq=communityid=egi')
|
|
|
|
.map(res => <any> res.json()).do(res => {console.log(res)});
|
|
|
|
}
|
2018-01-29 15:32:41 +01:00
|
|
|
}
|