damn_server.area.UpdateArea

class damn_server.area.UpdateArea(*, aid, tags=None, priority=None, description=None, instructions=None)

Bases: BaseModel

Structure for storing information about the area being updated.

For more descriptive information see CreateArea. This class differs from the CreateArea in two things:

  1. aid MUST be set.

  2. Nothing else matters. You can skip anything. (Usually, you change one thing anyway.)

NOTE: The information updated MUST be present. If not, it is untouched in the database. If you want to delete something, provide the null value to the property.

Example: I want to delete all the instructions of the area 9999, so I need to PUT:

{
    aid: 9999,
    instructions: {}
}

When the area is updated, new commit is automatically created with null square id, containing the information about the area being changed in the message. This enables the rollback procedure, used for restoring the area from the commits.