The project
This application is a J2EE/Spring application, which aims to store RPG persona.
Datas stored
A less as possible datas are stored. So, the application does not calculate anything. It just stores data.
gamesystem
: a RPG rule set,universe
: a RPG background,caracteristic
: a basic information withing the gamesystem,personatype
: the jobs and/or classes available in an universe,portage
: the application of a gamesystem witn an universe,caracteristicmodified
: the override of a caracteritic, inside a portage,persona
: a persona played using a portagepersonacaracteristic
: the value of the caracteristicmodifieds for a specific persona.
In this way, if you want to play in a specific universe, but don't like the official system, you can change to another system, for example, playing in a Dungeons & Dragons universe, with the rules of Cthulu.
Enjoy, and have fun !
The application's API
This application is based on a API, and stores the informations, and gives back answers to the available requests.
To make it easier, we provide you an unified set of data routes, for which you would have 3 elements to provide.
We also make use a lot of the HTTP verbs, to differenciate each route.
In the menu, you will find the different ways to use our application.
If you have any problem with it, you are free to send us issues via Github.
API's response
The API is JSON based, so you will always have a HTTP 200 code for each request, except in case of server failure.
The response is always structured in the same way :
{ "requestTime": 0, "response": [], "errors": [] }
requestTime
is a Timestamp value indicating the moment the server sent back a response.
response
is an array containing the request content.
errors
is an array containing your request errors. Let's hope you won't have any.
The entities
In the following pages, you will have a short description of the major entities accessible with the API.
For each entity, you will have a keyword
provided, to use in the routes, to define the type of entity you want the access of.
Below each, you will have a table describing the JSON object used.
The entity are listed alphabetically, for an easier access.
Caracteristic
Informations
- Description
- A
caracteristic
is the description of a caracteristic, as the name implies, as well as the skills that can be described or evaluated in a GameSystem. - Keyword
caracteristic
Attributes
Attribute | Type | Description |
---|---|---|
id | Integer | The entity identifier |
gamesystem | Integer/Object | Integer : a reference to the gamesystem the entity is belonging to. Object : See the gamesystem description. |
type | String | The type of data stored. Authorized values are :"string","integer","boolean". |
defaultLabel | String | The label of the caracteristic. |
min | String | The minimum value of the caracteristic. |
max | String | The maximum value of the caracteristic. |
CaracteristicModified
Informations
- Description
- A
caracteristicmodified
is an override of acaracteristic
label for a specificportage
- Keyword
caracteristicmodified
Attributes
Attribute | Type | Description |
---|---|---|
id | Integer | The entity identifier |
caracteristic | Object | The referenced caracteristic this entity is overriding. |
label | Null/String | If null , the the label has not been overridden. |
portage | Integer | The ID of the portage using this entity. |
GameSystem
Informations
- Description
- A set of caracteristics and basic informations about a game set of rules.
- Keyword
gamesystem
Attributes
Attribute | Type | Description |
---|---|---|
id | Integer | The entity identifier |
name | String | The entity full name |
shortName | String | The entity short name |
url | String | If the System has a website, it will provided in this field. |
media | String | The address of a description image, within our image repository. |
portageList | Array | In complete mode, a list of portage entities, otherwise the list of their IDs. |
caracteristicList | Array | In complete mode, a list of caracteristic entities, otherwise the list of their IDs. |
Persona
Informations
- Description
- The representation of a RPG character.
- Keyword
persona
Attributes
Attribute | Type | Description |
---|---|---|
id | Integer | The entity identifier |
owner | Integer | A reference to the User who created the persona |
isPublic | Boolean | Defines if the persona can be used by other people or not. |
firstName | String | The persona first name. |
lastName | String | The persona last name. |
lastUpdate | Timestamp | The moment of the last update. |
creationTime | Timestamp | The moment of the creation. |
media | String | The address of a description image, within our image repository. |
type | Integer | A reference to the personatype used by this entity. |
portage | Integer | A reference to the portage used by this entity. |
gender | String | The gender of the persona. Actually authorized values are : "female","male","other","transgender","undefined". |
caracteristicList | Array | In complete mode, a list of personacaracteristic entities, otherwise the list of their IDs. |
description | String | A description of the persona, its background. |
PersonaCaracteristic
Informations
- Description
- The application of a
caracteristicmodified
for apersona
. - Keyword
personacaracteristic
Attributes
Attribute | Type | Description |
---|---|---|
id | Integer | The entity identifier |
value | String | The value applied to this caracteristicmodified by this persona . |
caracteristicMiD | Integer/Object | A reference towards the caracteristicmodified used, or an Object representing it in complete mode. |
PersonaType
Informations
- Description
- The jobs and/or classes in use inside a
universe
. - Keyword
personatype
Attributes
Attribute | Type | Description |
---|---|---|
id | Integer | The entity identifier |
name | String | The name of the job/class. |
universe | Integer | A reference towards the universe . |
Portage
Informations
- Description
- The application of a
gamesystem
on auniverse
. - Keyword
portage
Attributes
Attribute | Type | Description |
---|---|---|
id | Integer | The entity identifier |
universe | Integer | A reference towards the universe . |
gamesystem | Integer | A reference towards the gamesystem . |
creationTime | Timestamp | The moment of the creation. |
personaList | Array | The list of persona created with this portage |
caracteristicList | Array | The list of caracteristicmodified to use with this portage . |
Universe
Informations
- Description
- Definition of a
universe
in the application. - Keyword
universe
Attributes
Attribute | Type | Description |
---|---|---|
id | Integer | The entity identifier |
name | String | The universe name |
description | String | The universe description |
media | String | The address of a description image, within our image repository. |
creationTime | Timestamp | The moment of the creation. |
portageList | Array | The list of portage using this universe . |
personaTypeList | Array | The list of personaType that can be used. |
Route for creating entities
POST /api/:keyword
Change the :keyword
to any of provided ones.
As a response, you will get the result of a GET on your freshly created entity.
Required attributes per entity
The media
is always optional.
Entity keyword | Attributes |
caracteristic | gamesystem, defaultLabel, type, min, max |
caracteristicmodified | caracteristic, label |
gamesystem | name, shortName, url, media |
persona | type, owner, isPublic, firstName, lastName, description, gender, portage |
personatype | name, universe |
portage | gamesystem, universe |
universe | name, description, media |
Route for getting an entity
GET /api/:keyword/:id/complete
Change the :keyword
to any of provided ones.
Change the :id
to the identifier value of the entity you want.
The /complete
part is optionnal. Using it will, in most cases, load a "not complete" representation of any linked entity within the one you want.
Replace /complete
by /all
to get a list of all publicly available entity of the requested type.
Route for updating entities
POST /api/:keyword/:id
Change the :keyword
to any of provided ones.
Change the :id
to the identifier value of the entity you want to update.
As a response, you will get the result of a GET on your freshly updated entity.
Authorized attributes per entity
All fields are optional, so you can send a post request, with just the id, even it's useless in itself.
Entity keyword | Attributes |
caracteristic | defaultLabel, type, min, max |
caracteristicmodified | label |
gamesystem | name, shortName, url, media |
persona | type, isPublic, firstName, lastName, description, gender |
personatype | name |
universe | name, description, media |
Route for deleting an entity
DELETE /api/:keyword/:id
Change the :keyword
to any of provided ones.
We use a data-cascade to delete related entities.
As a response, you will get a boolean value validating or not your request.
Change the :id
to the identifier value of the entity you want.