2017-12-07 18:57:12 +01:00
|
|
|
package eu.dnetlib.repo.manager.service.controllers;
|
|
|
|
|
|
|
|
|
|
|
|
import eu.dnetlib.domain.data.PiwikInfo;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import org.springframework.http.MediaType;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
@RequestMapping(value = "/piwik")
|
|
|
|
@Api(description = "Piwik API", tags = {"piwik"})
|
|
|
|
public interface PiWikApi {
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/getPiwikSiteForRepo/{repositoryId}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
@ResponseBody
|
|
|
|
PiwikInfo getPiwikSiteForRepo(String repositoryId);
|
|
|
|
|
|
|
|
@RequestMapping(value = "/savePiwikInfo" , method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
|
2018-02-22 11:55:56 +01:00
|
|
|
PiwikInfo savePiwikInfo( PiwikInfo piwikInfo);
|
2017-12-07 18:57:12 +01:00
|
|
|
|
|
|
|
@RequestMapping(value = "/getPiwikSitesForRepos" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
List<PiwikInfo> getPiwikSitesForRepos();
|
|
|
|
|
2018-02-21 16:05:02 +01:00
|
|
|
@RequestMapping(value = "/approvePiwikSite/{repositoryId}" , method = RequestMethod.GET)
|
2017-12-07 18:57:12 +01:00
|
|
|
@ResponseBody
|
|
|
|
void approvePiwikSite(String repositoryId);
|
|
|
|
|
2018-02-21 16:05:02 +01:00
|
|
|
@RequestMapping(value = "/getOpenaireId/{repositoryId}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
2017-12-07 18:57:12 +01:00
|
|
|
@ResponseBody
|
|
|
|
String getOpenaireId(String repositoryid);
|
|
|
|
}
|