Administrating the Database

Accessing the scripts must be done through GET Http requests. A JSON Object or Array is returned whenever possible.

add

Purpose

Adds a station in the database

Parameters

Name of parameter Required type Description
id integer Identifier of the new station, similar to the one used on OpenStreetMap
latitude float Station's latitude
longitude float Station's longitude
name string Station's name

Output

Successful query

Name of element type Description
id integer identifier of the station as used on OpenStreetMap
latitude float latitude of the station
longitude float longitude of the station
name string name of the station
opening_days int Days when the station is open. (Note à faire)
opening_hour time Time of opening
closing_hour time Time of closing
availability int Index of availability of the station.
updated_at date-time Date and time of the last update.

update

Purpose

Updates a station thanks to the new information stores on OpenStreetMap.

Parameters

Name of parameter Required type Description
id integer Identifier of the new station, similar to the one used on OpenStreetMap
latitude float Station's latitude
longitude float Station's longitude
name string Station's name

Output

Successful query

Name of element type Description
id integer identifier of the station as used on OpenStreetMap
latitude float latitude of the station
longitude float longitude of the station
name string name of the station
opening_days int Days when the station is open. (Note à faire)
opening_hour time Time of opening
closing_hour time Time of closing
availability int Index of availability of the station.
updated_at date-time Date and time of the last update.

delete

Purpose

Deletes a station that no longer exist on OpenStreetMap

Parameters

Name of parameter Required type Description
id integer Identifier of the new station, similar to the one used on OpenStreetMap

Output

1.

indicator

Purpose

Fetches all the stations in a given rectangle

Parameters

Name of parameter Required type Description
north float The highest latitude
south float The lowest latitude
east west The highest longitude
west float The lowest longitude

Output

Successful query

An array of Stations is given. Here are the elements that made up a station.

Name of element type Description
id integer identifier of the station as used on OpenStreetMap
latitude float latitude of the station
longitude float longitude of the station
name string name of the station
opening_days int Days when the station is open. (Note à faire)
opening_hour time Time of opening
closing_hour time Time of closing
availability int Index of availability of the station.
updated_at date-time Date and time of the last update.