Documentation of ECLERD

Documentation generated on using project's JS sources

HTML attributes

form[data-on-success]

Sets that a form will be submitted using AJAX. The valid values for this attribute are:
message
(empty value)
The default value (empty attribute) is "message", meaning that the server's response will be used to display a tooltip to the player.
reload:this
You reload only the current browsing context (the iframe itself if inside an iframe) Note that the message will also be displayed, after the reloading is done (delayed message)
reload:global
You reload the whole page (the tab, even if you currently are in an iframe) Note that the message will also be displayed, after the reloading is done (delayed message)
goto:/url/absolute/or/relative
The current browing context will go to the specified URL Note that the message will also be displayed, after the reloading is done (delayed message)
event-lock:eventName
The form will stay locked, and a CustomEvent with name "eventName" will be dispatched on the form. The event detail will be the server's response (usually, an object with ".row.message" fields). The "row" name comes from internal code: I use a generic "Single Row" bean. Note that this is the only value that brings no message by default: you must call the message display method in you event handler if you want a message to be shown.
in file /resources/template/web/form.js

.submit-on-change

Put this on a form field, and the form will be auto-submitted when the input is changed.
Works for any input, textarea, select, etc.
Even for non-input elements (so long a "change" event is dispatched).
Put this on the "form" tag and any input change will submit the form
(it's the preferred way if any input change must submit the form)
Note that listener is on the field and not on the form because the form might not be an ancestor of the input, so event might not boil up to the form. in file /resources/template/web/form.js

img[alt]:not([alt=""]):not([title])

Automatically set the image title according to its alt. in file /resources/template/web/web.js

time[datetime]:not([title])

Formats the date on "time" HTML elements.
Set a custom title to avoid this behavior. in file /resources/template/web/web.js

input[type="range"].percentage

Percentage display in file /resources/template/web/web.js

input, select, button

Disabled forms (because you don't have control of the country or so) in file /resources/template/web/web.js

All endpoints

This section also exists in Open API JSON version.

This is the list of all project's URLs. If the HTTP verb is POST then the endpoint cannot be GET called.
All endpoints can be contacted with the HTTP Accept header of your choice. You can also use the http-accept GET parameter. You can also use the http-accept GET parameter. So /url/?http-accept=application/json is the same as /url/ with Accept: application/json HTTP header, and it returns the page's data formatted in JSON.

GET /admin/

Not documented

GET /admin/balanceresource/

Not documented

GET /admin/simstats/

Not documented

GET /map/country/

Not documented
Name Description
id Not documented

GET /map/country/economy/

Shows economic infos about a specific country.
The country might not be the current connected player's one.
Name Description
id Not documented
warning Not documented

GET /map/country/economy/resource/

Not documented
Name Description
idCountry Not documented
idResource Not documented

POST /map/country/economy/resource/rationnement/

Not documented
Name Description
id-resource Not documented
rationnement Not documented

POST /map/country/economy/resource/stealing/

Not documented
Name Description
idCountry Not documented
idResource Not documented

POST /map/country/economy/resource/taking/

Not documented
Name Description
idCountry Not documented
idResource Not documented
quantity Not documented

GET /map/country/environment/

Not documented
Name Description
id Not documented

POST /map/country/environment/taking/

Not documented
Name Description
idCountry Not documented
action Not documented
wasteType Not documented
quantity Not documented

GET /map/country/laws/

Not documented
Name Description
id Not documented

POST /map/country/laws/submit/

Not documented
Name Description
helpForChildren Not documented
holidayWeeksPerYear Not documented
workingHoursPerDay Not documented
workingDaysPerWeek Not documented
educationUntilAge Not documented
retirementAge Not documented
hoursEducation Not documented
hoursSante Not documented
hoursPolice Not documented
hoursServices Not documented

POST /map/country/message/send/

Not documented
Name Description
idToPlayer Not documented
msg Not documented

GET /map/country/mine/

Not documented
Name Description
type Not documented

GET /map/country/politic/

Not documented
Name Description
id Not documented

POST /map/country/politic/coupetat/cancel/

Not documented

POST /map/country/politic/coupetat/execute/

Not documented

POST /map/country/politic/coupetat/start/

Not documented
Name Description
idTargetCountry Not documented

GET /map/country/research/

Not documented
Name Description
id Not documented

GET /map/country/research/buildinginfo/

Not documented
Name Description
idCountry Not documented
idBuilding Not documented

POST /map/country/research/buildinginfo/spying/

Not documented
Name Description
idBuilding Not documented
idCountry Not documented

POST /map/country/research/buildinginfo/submit/

Not documented
Name Description
idBuilding Not documented
competencies Not documented

POST /map/country/research/buildinginfo/taking/

Not documented
Name Description
idCountry Not documented
idBuilding Not documented

GET /map/country/societe/

Not documented
Name Description
id Not documented

POST /map/country/societe/killing/

Not documented
Name Description
idCountry Not documented

POST /map/country/societe/naturalize/

Not documented
Name Description
idCountry Not documented
people Not documented

POST /map/mapcase/starton/buildings/

Not documented
Name Description
cases Not documented

POST /map/mapcase/starton/submit/

Not documented
Name Description
country Not documented
register-pseudo Not documented
register-password Not documented
register-email Not documented
register-title Not documented

GET /map/mapcase/starton/territory/

Not documented
Name Description
x Not documented
y Not documented

GET /map/mapcase/viewcase/

Not documented
Name Description
id Not documented
build Not documented

POST /map/mapcase/viewcase/capturing/

Not documented
Name Description
idCase Not documented

POST /map/mapcase/viewcase/constructing/

Not documented
Name Description
id-mapcase Not documented
id-building Not documented

POST /map/mapcase/viewcase/demolish/

Not documented
Name Description
id-mapcase Not documented

POST /map/mapcase/viewcase/missiling/

Not documented
Name Description
idCase Not documented

POST /map/mapcase/viewcase/reconstruct/

Not documented
Name Description
id-mapcase Not documented

POST /map/mapcase/viewcase/rendement/

Not documented
Name Description
id-mapcase Not documented
rendement Not documented

GET /map/world/

Not documented

GET /map/world/abandon/

Not documented

POST /map/world/abandon/submit/

Not documented
Name Description
password Not documented

GET /map/world/buildings/

Not documented

GET /map/world/diplomacy/

Not documented
Name Description
id Not documented

POST /map/world/diplomacy/submit/

Not documented
Name Description
id Not documented
idx Not documented
response Not documented

GET /map/world/grounds/

Not documented

GET /map/world/medias/

Not documented
Name Description
event Not documented

POST /map/world/medias/answer/

Not documented
Name Description
idEvent Not documented
delayType Not documented

POST /map/world/medias/recalleveryone/

Not documented

GET /map/world/neutral/

Not documented
Name Description
x Not documented
y Not documented

GET /map/world/societe/

Not documented

GET /map/world/starton/

Not documented

GET /player/identify/

Not documented
Name Description
show-warning Not documented

GET /player/identify/forgotpwd/

Not documented

POST /player/identify/forgotpwd/submit/

Not documented
Name Description
email Not documented

GET /player/identify/forgotpwd/submit/reset/

Not documented
Name Description
req Not documented

POST /player/identify/forgotpwd/submit/reset/submit/

Not documented
Name Description
password Not documented
req Not documented

POST /player/identify/login/

Not documented
Name Description
login-pseudo Not documented
login-password Not documented

POST /player/identify/logout/

Not documented

GET /player/identify/register/

Not documented

GET /player/identify/register/terms/

Not documented

GET /player/myprofile/

Not documented

POST /player/myprofile/email/

Not documented
Name Description
email Not documented
password Not documented

GET /player/myprofile/email/validate/

Not documented
Name Description
req Not documented

POST /player/myprofile/password/

Not documented
Name Description
old-password Not documented
new-password Not documented

POST /player/myprofile/preferences/

Not documented
Name Description
avatar Not documented
pdt-title Not documented
notifications Not documented

POST /player/myprofile/pseudo/

Not documented
Name Description
pseudo Not documented
password Not documented

You may try this viewer