1 |
54525
|
panagiotis
|
package eu.dnetlib.repo.manager.controllers;
|
2 |
53003
|
panagiotis
|
|
3 |
54690
|
panagiotis
|
import eu.dnetlib.repo.manager.service.StatsServiceImpl;
|
4 |
54525
|
panagiotis
|
import io.swagger.annotations.Api;
|
5 |
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
6 |
|
|
import org.springframework.http.MediaType;
|
7 |
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
8 |
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
9 |
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
10 |
|
|
import org.springframework.web.bind.annotation.RestController;
|
11 |
53003
|
panagiotis
|
|
12 |
|
|
import java.util.Map;
|
13 |
|
|
|
14 |
54525
|
panagiotis
|
@RestController
|
15 |
|
|
@RequestMapping(value = "/stats")
|
16 |
|
|
@Api(description = "Stats API", tags = {"statistics"})
|
17 |
|
|
public class StatsController {
|
18 |
53003
|
panagiotis
|
|
19 |
54525
|
panagiotis
|
@Autowired
|
20 |
56661
|
ioannis.di
|
private StatsServiceImpl statsService;
|
21 |
53003
|
panagiotis
|
|
22 |
54525
|
panagiotis
|
@RequestMapping(value = "/getStatistics" , method = RequestMethod.GET,
|
23 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
24 |
|
|
@ResponseBody
|
25 |
56661
|
ioannis.di
|
public Map getStatistics(){
|
26 |
54690
|
panagiotis
|
return statsService.getStatistics();
|
27 |
53003
|
panagiotis
|
}
|
28 |
|
|
}
|