1
|
package eu.dnetlib.repo.manager.service.controllers;
|
2
|
|
3
|
|
4
|
import eu.dnetlib.domain.data.PiwikInfo;
|
5
|
import io.swagger.annotations.Api;
|
6
|
import org.springframework.http.MediaType;
|
7
|
import org.springframework.web.bind.annotation.*;
|
8
|
|
9
|
import java.util.List;
|
10
|
|
11
|
@RestController
|
12
|
@RequestMapping(value = "/piwik")
|
13
|
@Api(description = "Piwik API", tags = {"piwik"})
|
14
|
public interface PiWikApi {
|
15
|
|
16
|
|
17
|
@RequestMapping(value = "/getPiwikSiteForRepo/{repositoryId}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
18
|
@ResponseBody
|
19
|
PiwikInfo getPiwikSiteForRepo(String repositoryId);
|
20
|
|
21
|
@RequestMapping(value = "/savePiwikInfo" , method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
|
22
|
PiwikInfo savePiwikInfo( PiwikInfo piwikInfo);
|
23
|
|
24
|
@RequestMapping(value = "/getPiwikSitesForRepos" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
25
|
List<PiwikInfo> getPiwikSitesForRepos();
|
26
|
|
27
|
@RequestMapping(value = "/approvePiwikSite/{repositoryId}" , method = RequestMethod.GET)
|
28
|
@ResponseBody
|
29
|
void approvePiwikSite(String repositoryId);
|
30
|
|
31
|
@RequestMapping(value = "/getOpenaireId/{repositoryId}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
32
|
@ResponseBody
|
33
|
String getOpenaireId(String repositoryid);
|
34
|
}
|