Move to package com.backend.unifier.title (remove service suffix), add list endpoint
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
package com.backend.unifier.title.api;
|
||||
|
||||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
|
||||
|
||||
import com.backend.metadata.kodik.api.model.KodikResponse;
|
||||
|
||||
import io.smallrye.mutiny.Uni;
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.PathParam;
|
||||
import jakarta.ws.rs.QueryParam;
|
||||
|
||||
@Path("/kodik")
|
||||
@RegisterRestClient(baseUri = "stork://kodik-metadata-service")
|
||||
public interface KodikSearchService {
|
||||
@GET
|
||||
@Path("/list")
|
||||
KodikResponse list();
|
||||
|
||||
@GET
|
||||
@Path("/search")
|
||||
KodikResponse search(@QueryParam("title") String title);
|
||||
|
||||
@GET
|
||||
@Path("/id/{id}")
|
||||
KodikResponse findByKodikId(@PathParam("id") String id);
|
||||
|
||||
@GET
|
||||
@Path("/shikimori/{id}")
|
||||
KodikResponse findByShikimoriId(@PathParam("id") String id);
|
||||
|
||||
@GET
|
||||
@Path("/kinopoisk/{id}")
|
||||
KodikResponse findByKinopoiskId(@PathParam("id") String id);
|
||||
|
||||
@GET
|
||||
@Path("/imdb/{id}")
|
||||
KodikResponse findByImdbId(@PathParam("id") String id);
|
||||
|
||||
@GET
|
||||
@Path("/search")
|
||||
Uni<KodikResponse> searchAsync(@QueryParam("title") String title);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.backend.unifier.title.api;
|
||||
|
||||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
|
||||
|
||||
import com.backend.metadata.shikimori.api.model.Anime;
|
||||
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.QueryParam;
|
||||
|
||||
@Path("/shikimori")
|
||||
@RegisterRestClient(baseUri = "stork://shikimori-metadata-service")
|
||||
public interface ShikimoriSearchService {
|
||||
@GET
|
||||
@Path("/search")
|
||||
Anime findById(@QueryParam("id") String id);
|
||||
}
|
||||
Reference in New Issue
Block a user