1 package org.oxerr.seatgeek.client.rescu;
2
3 import java.io.IOException;
4
5 import org.oxerr.seatgeek.client.model.request.CreateListingRequest;
6 import org.oxerr.seatgeek.client.model.request.UpdateListingRequest;
7 import org.oxerr.seatgeek.client.model.response.MultipleListingsResponse;
8 import org.oxerr.seatgeek.client.model.response.Response;
9 import org.oxerr.seatgeek.client.model.response.SingleListingResponse;
10
11 import jakarta.ws.rs.Consumes;
12 import jakarta.ws.rs.DELETE;
13 import jakarta.ws.rs.GET;
14 import jakarta.ws.rs.PATCH;
15 import jakarta.ws.rs.PUT;
16 import jakarta.ws.rs.Path;
17 import jakarta.ws.rs.PathParam;
18 import jakarta.ws.rs.Produces;
19 import jakarta.ws.rs.QueryParam;
20 import jakarta.ws.rs.core.MediaType;
21
22 @Path("/")
23 public interface ListingResource {
24
25 @PUT
26 @Path("/listings/single/{ticket_id}")
27 @Produces(MediaType.APPLICATION_JSON)
28 @Consumes(MediaType.APPLICATION_JSON)
29 Response createListing(
30 @PathParam("ticket_id") String ticketId,
31 CreateListingRequest r
32 ) throws IOException;
33
34 @PATCH
35 @Path("/listings/single/{ticket_id}")
36 @Produces(MediaType.APPLICATION_JSON)
37 @Consumes(MediaType.APPLICATION_JSON)
38 UpdateListingRequest updateListing(
39 @PathParam("ticket_id") String ticketId,
40 UpdateListingRequest r
41 ) throws IOException;
42
43 @GET
44 @Path("/listings/single/{ticket_id}")
45 SingleListingResponse getListing(
46 @PathParam("ticket_id") String ticketId
47 ) throws IOException;
48
49
50
51
52
53
54
55
56
57
58
59 @GET
60 @Path("/listings")
61 MultipleListingsResponse getListings(
62 @QueryParam("listing_ids") String listingIds,
63 @QueryParam("only_barcode") Integer onlyBarcode,
64 @QueryParam("page") Integer page,
65 @QueryParam("per_page") Integer perPage
66 ) throws IOException;
67
68 @DELETE
69 @Path("/listing")
70 Response deleteListing(@QueryParam("id") String ticketId) throws IOException;
71
72 }