@Path(value="/competition/{competitionId}/fixtures/")
@Consumes(value="application/json")
@Produces(value="application/json")
public class FixtureREST
extends Object
| Constructor and Description |
|---|
FixtureREST() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createFixture(es.uvigo.esei.dgss.Fixture fixture)
Creates a new fixture.
|
javax.ws.rs.core.Response |
delete(int id)
Deletes a fixture.
|
javax.ws.rs.core.Response |
get(int id) |
javax.ws.rs.core.Response |
getFixtures()
Gets a list of fixtures
|
javax.ws.rs.core.Response |
update(es.uvigo.esei.dgss.Fixture fixture)
Updates a fixture.
|
@POST public javax.ws.rs.core.Response createFixture(es.uvigo.esei.dgss.Fixture fixture)
fixture - a new fixture to be stored.CREATED response with the URI of the new fixture in the
Location header.IllegalArgumentException - if fixture is null or if an fixture with the same id
already exists@Path(value="{id}")
@GET
public javax.ws.rs.core.Response get(@PathParam(value="id")
int id)
id - the id of a fixture.OK response containing the Fixture with the
provided id.IllegalArgumentException - if it does not correspond with any fixture.@GET @Path(value="list") public javax.ws.rs.core.Response getFixtures()
OK response containing list of fixtures@PUT public javax.ws.rs.core.Response update(es.uvigo.esei.dgss.Fixture fixture)
fixture - a fixture to be updated.OK response.IllegalArgumentException - if fixture is null.@Path(value="{id}")
@DELETE
public javax.ws.rs.core.Response delete(@PathParam(value="id")
int id)
id - the id of the fixture to be deleted.IllegalArgumentException - if it does not identifies a valid user.Copyright © 2018. All rights reserved.