Open DrBlink7 opened 7 months ago
API Crea campagna POST master/campaign
body: {name: string}
return 200 body: { id: number name: string groups: number status: CampaignStatus }
API Modifica nome o status PATCH master/campaign/:id
body: {name: string, status: CampaignStatus}
return 204 empty body ? check for ORM @Zxcid
API cancella campagna Delete master/campaign/:id
no body
API recupera info di una campagna. GET master/campaign/:id
return 200 body { id: number name: string description: string plot: string placesOfInterest: PlacesOfInterestDTO groups: CampaignGroupDTO[] } // types interface PlacesOfInterestDTO { points: CampaignPlaceOfInterestDTO[] roots: number[] } interface CampaignGroupDTO { id: number name: string } type PlacesOfInterestType = keyof typeof PlacesOfInterestEnum enum PlacesOfInterestEnum { 'world' = 'world', 'continent' = 'continent', 'region' = 'region', 'area' = 'area', 'city' = 'city', 'camp' = 'camp', 'neighborhood' = 'neighborhood', 'point' = 'point' } interface CampaignPlaceOfInterestDTO { id: number name: string place: PlacesOfInterestType description: string parent?: number children?: number[] }
API Upsert descrizione campagna PUT master/campaign/:id/description
body: { description: string }
API Upsert plot campagna PUT master/campaign/:id/plot
body: { plot: string }
API DeletePoi PUT master/campaign/:id/poi/:poi
body: noBody
return 200 body PlacesOfInterestDTO (vedi sopra)
API editPoiName PATCH master/campaign/:id/poi/:poi
API editPoi PATCH master/campaign/:id/poi/:poi
body: {description: string, parent: string | null } // N.B. parent chiave numerica incrementale (fare cast e gestire eventuali errori)
API createPoi POST master/campaign/:id/poi
body: {name: string, parent: string | null, type: PlacesOfInterestType } // N.B. parent chiave numerica incrementale (fare cast e gestire eventuali errori)
Api di
Implementare API per visualizzare la Campagna
Create campagna
API Crea campagna POST master/campaign
REQ
RES
Edit campagna
API Modifica nome o status PATCH master/campaign/:id
REQ
RES
Delete campagna
API cancella campagna Delete master/campaign/:id
REQ
RES
Fetch Campagna
API recupera info di una campagna. GET master/campaign/:id
REQ
RES
Creare/modificare descrizione
API Upsert descrizione campagna PUT master/campaign/:id/description
REQ
RES
Creare/modificare plot
API Upsert plot campagna PUT master/campaign/:id/plot
REQ
RES
Cancella punto di interesse
API DeletePoi PUT master/campaign/:id/poi/:poi
REQ
RES
Modifica nome punto di interesse
API editPoiName PATCH master/campaign/:id/poi/:poi
REQ
RES
Modifica punto di interesse
API editPoi PATCH master/campaign/:id/poi/:poi
REQ
RES
Crea punto di interesse
API createPoi POST master/campaign/:id/poi
REQ
RES
Api di