Events Plugin πŸ“†

It is now :slight_smile:

https://github.com/angusmcleod/discourse-events/commit/33ba86f66e22afaab30dd64eb0e51e45f17860c9

To add a date and time when creating a topic, pass a JSON event string with start and end set as datetimes in ISO 8601 format.

Example request:

curl -X POST \
  https://your_site/posts \
  -H 'cache-control: no-cache' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F api_key=your_key \
  -F api_username=your_username \
  -F 'title=Posting an event from the API :robot:' \
  -F 'raw=Boogey on down to funky town.' \
  -F category=Events \
  -F 'event={ "start": "2017-10-18T10:08:08Z", "end":  "2017-10-18T11:08:08Z" }'

Result:
https://discourse.angusmcleod.com.au/t/posting-an-event-from-the-api-robot/79/1

Note: I’m not sure if it’s possible to pass custom parameters to methods available in the disocurse_api gem. @blake?

11 Likes