kepler.api.unit_group module

The module contains the functionality for REST API calls related to unit groups.

class kepler.api.unit_group.AddUnitGroupParams

Bases: kepler.api.api_util.ApiParamsBase

The parameter class for the REST API call add_unit_group.

name_en = The name of the unit group to be added in English.
name_fi = The name of the unit group to be added in Finnish.
unit_type_id = The ID of the unit type of the unit group to be added.
units = A list of unit IDs and qualifier strings that the unit group shall have after the c...
class kepler.api.unit_group.DeleteUnitGroupParams

Bases: kepler.api.api_util.ApiParamsBase

The parameter class for the REST API call delete_unit_group.

unit_group_id = The ID of the unit group that will be deleted.
class kepler.api.unit_group.EditUnitGroupParams

Bases: kepler.api.api_util.ApiParamsBase

The parameter class for the REST API call edit_unit_group.

name_en = The name of the unit group to be added in English.
name_fi = The name of the unit group to be added in Finnish.
unit_group_id = The ID of the unit group that will be edited.
unit_type_id = The ID of the unit type of the unit group to be added.
units = A list of unit IDs and qualifier strings that the unit group shall have after the c...
kepler.api.unit_group.add_unit_group(request)

The function implements the REST API call add_unit_group.

kepler.api.unit_group.delete_unit_group(request)

The function implements the REST API call delete_unit_group.

kepler.api.unit_group.edit_unit_group(request)

The function implements the REST API call edit_unit.

kepler.api.unit_group.get_unit_groups(request)

The REST API handler returns the list of unit groups from the database.

Parameters:request – The Pyramid request object.
Returns:The list of unit groups in json format.
kepler.api.unit_group.set_transl(lang_id, tr_id, translation)

The utility function adds a translation to the database.