38 lines
961 B
Java
38 lines
961 B
Java
package de.hsos.swa.ma.api.al;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import javax.ws.rs.GET;
|
|
import javax.ws.rs.Path;
|
|
import javax.ws.rs.Produces;
|
|
import javax.ws.rs.core.MediaType;
|
|
|
|
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
|
|
|
|
import org.jboss.resteasy.annotations.jaxrs.PathParam;
|
|
import org.jboss.resteasy.annotations.jaxrs.QueryParam;
|
|
//import javax.ws.rs.Path;
|
|
|
|
//import javax.enterprise.context.ApplicationScoped;
|
|
|
|
@Path("/v1/1")
|
|
@RegisterRestClient(configKey="cocktailAPI")
|
|
public interface CocktailGatewayInterface {
|
|
|
|
@GET
|
|
@Path("/random.php")
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
public Drinks getAllCocktails();
|
|
|
|
@GET
|
|
@Path("/search.php")
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
public Drinks getCocktailByName(@QueryParam("s") String name);
|
|
|
|
@GET
|
|
@Path("/filter.php")
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
public Drinks getCocktailByIngredient(@QueryParam("i") String ingredient);
|
|
|
|
}
|