Skip to content

haum/hms_agenda

Repository files navigation

Agenda microservice

image

image

This microservice is dedicated for the handling of the agenda of the HAUM.

The backend of this microservice is a SQLite database, but you should communicate with this service if you want to interact with the agenda instead of using the database directly.

Using

Create a Python 3 virtualenv and install software:

$ virtualenv -ppython3 venv
$ source venv/bin/activate
(venv) $ pip install .

Then start the bot inside the virtual env:

(venv) $ hms_agenda

Accepted messages

Topic agenda.query.

Adding an event

command = {
    'command': 'add',
    'arguments': {
        'date': '10/11/2017 17:45',
        'location': 'Local du HAUM',
        'title': 'Test débile',
        'desc': 'Un super test complètement débile'
    }
}

Adding a seance

command = {
    'command': 'add_seance',
    'arguments': {
        'date': '10/11/2017 17:45'
    }
}

Removing an event

command = {
    'command': 'remove',
    'arguments': {
        'id': 42
    }
}

Modifying an event

command = {
    'command': 'modify',
    'arguments': {
        'id': 42,
        'field': 'titre',
        'new_value': 'Un super nouveau titre'
    }
}

Fields names allowed for modification are the following (in French language for historical reasons):

  • titre
  • lieu
  • description
  • date
  • status

License

This project is brought to you under MIT license. For further information, please read the provided LICENSE.txt file.