package es.uv.saic.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import es.uv.saic.domain.Wiki;

@FeignClient(value = "wiki-service", url = "${saic.url.domain}")
public interface WikiClient {
    @GetMapping("/wiki/text/{categoria}")
	@ResponseBody
	public Wiki renderWiki(@PathVariable String categoria);

    @PostMapping("/wiki/editor")
	@ResponseBody
	public Wiki updateWiki(@RequestParam String cat, @RequestParam String text);
}
