connect/src/app/community/community.service.ts

27 lines
1.1 KiB
TypeScript

import { Injectable } from '@angular/core';
import { Http, Response, Headers, RequestOptions } from '@angular/http';
import { Observable } from 'rxjs/Rx';
@Injectable()
export class CommunityService {
constructor(private http:Http) {
}
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)});
}
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)});
}
getNumberOfSoftware() {
return this.http.get('http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/software/count?format=json&fq=communityid=egi')
.map(res => <any> res.json()).do(res => {console.log(res)});
}
}