Add documentation for event entities

This commit is contained in:
Benjamin Neff 2016-12-31 22:21:10 +01:00
parent 160b2bdc34
commit d347c74306
4 changed files with 141 additions and 0 deletions

78
docs/_entities/event.md Normal file
View file

@ -0,0 +1,78 @@
---
title: Event
---
This entity represents an event.
See also: [EventParticipation][event_participation]
## Properties
| Property | Type (Length) | Description |
| --------- | ---------------------------- | --------------------------------------------- |
| `author` | [diaspora\* ID][diaspora-id] | The diaspora\* ID of the author of the event. |
| `guid` | [GUID][guid] | The GUID of the event. |
| `summary` | [String][string] (255) | The summary of the event. |
| `start` | [Timestamp][timestamp] | The start time of the event (in UTC). |
## Optional Properties
| Property | Type (Length) | Description |
| ------------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `end` | [Timestamp][timestamp] | The end time of the event (in UTC). If missing it is an open-end or a single `all_day` event. |
| `all_day` | [Boolean][boolean] | `true` if it is an all day event. Time/timezone is ignored. `false` by default. |
| `timezone` | [Timezone][timezone] | If the event is fixed to a specific timezone, this can be set. The `start`/`end` timestamps are then displayed in this timezone. This is useful for local events. If missing or empty the timestamps are displayed in the timezone of the user. |
| `description` | [Markdown][markdown] (65535) | Description of the event. |
| `location` | [Location][location] | Location of the event. |
## Examples
### With start, end and timezone
~~~xml
<event>
<author>alice@example.org</author>
<guid>bb8371f0b1c901342ebd55853a9b5d75</guid>
<summary>Cool event</summary>
<start>2016-12-27T12:00:00Z</start>
<end>2016-12-27T13:00:00Z</end>
<all_day>false</all_day>
<timezone>Europe/Berlin</timezone>
<description>You need to see this!</description>
<location>
<address>Vienna, Austria</address>
<lat>48.208174</lat>
<lng>16.373819</lng>
</location>
</event>
~~~
### All day event
~~~xml
<event>
<author>alice@example.org</author>
<guid>bb8371f0b1c901342ebd55853a9b5d75</guid>
<summary>Cool event</summary>
<start>2016-12-27T00:00:00Z</start>
<end/>
<all_day>true</all_day>
<timezone/>
<description>You need to see this!</description>
<location>
<address>Vienna, Austria</address>
<lat>48.208174</lat>
<lng>16.373819</lng>
</location>
</event>
~~~
[event_participation]: {{ site.baseurl }}/entities/event_participation.html
[diaspora-id]: {{ site.baseurl }}/federation/types.html#diaspora-id
[guid]: {{ site.baseurl }}/federation/types.html#guid
[string]: {{ site.baseurl }}/federation/types.html#string
[timestamp]: {{ site.baseurl }}/federation/types.html#timestamp
[markdown]: {{ site.baseurl }}/federation/types.html#markdown
[boolean]: {{ site.baseurl }}/federation/types.html#boolean
[timezone]: {{ site.baseurl }}/federation/types.html#timezone
[location]: {{ site.baseurl }}/entities/location.html

View file

@ -0,0 +1,54 @@
---
title: EventParticipation
---
This entity represents a participation in an [Event][event].
See also: [Relayable][relayable]
## Properties
| Property | Type | Description |
| ------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `author` | [diaspora\*&nbsp;ID][diaspora-id] | The diaspora\* ID of the author of the event participation. |
| `guid` | [GUID][guid] | The GUID of the event participation. |
| `parent_guid` | [GUID][guid] | The GUID of the [Event][event]. |
| `status` | [String][string] | The participation status, lowercase string as defined in [RFC 5545, Section 3.2.12][status] (`accepted`, `declined` or `tentative`). |
| `author_signature` | [Signature][signature] | The signature from the author of the event participation. |
| `parent_author_signature` | [Signature][signature] | The signature from the author of the [Event][event]. |
## Examples
### From author
~~~xml
<event_participation>
<author>alice@example.org</author>
<guid>92f26ff0b1cb01342ebd55853a9b5d75</guid>
<parent_guid>bb8371f0b1c901342ebd55853a9b5d75</parent_guid>
<status>accepted</status>
<author_signature>dT6KbT7kp0bE+s3//ZErxO1wvVIqtD0lY67i81+dO43B4D2m5kjCdzW240eWt/jZmcHIsdxXf4WHNdrb6ZDnamA8I1FUVnLjHA9xexBITQsSLXrcV88UdammSmmOxl1Ac4VUXqFpdavm6a7/MwOJ7+JHP8TbUO9siN+hMfgUbtY=</author_signature>
<parent_author_signature/>
</event_participation>
~~~
### From parent author
~~~xml
<event_participation>
<author>alice@example.org</author>
<guid>92f26ff0b1cb01342ebd55853a9b5d75</guid>
<parent_guid>bb8371f0b1c901342ebd55853a9b5d75</parent_guid>
<status>accepted</status>
<author_signature>dT6KbT7kp0bE+s3//ZErxO1wvVIqtD0lY67i81+dO43B4D2m5kjCdzW240eWt/jZmcHIsdxXf4WHNdrb6ZDnamA8I1FUVnLjHA9xexBITQsSLXrcV88UdammSmmOxl1Ac4VUXqFpdavm6a7/MwOJ7+JHP8TbUO9siN+hMfgUbtY=</author_signature>
<parent_author_signature>gWasNPpSnMcKBIMWyzfoVO6sr8eRYkhUqy3PIkkh53n/ki+DM9mnh3ayotI0+6un9aq1N3XkS7Vn05ZD3+nHVby6i21XkYgPnbD8pWYuBBj7VGPyahT70BUs/vSvY8KX8V3wYfsPsaiAgJsAFg2UHYdY3r4/oWdIIbBZc21O3zk=</parent_author_signature>
</event_participation>
~~~
[diaspora-id]: {{ site.baseurl }}/federation/types.html#diaspora-id
[guid]: {{ site.baseurl }}/federation/types.html#guid
[string]: {{ site.baseurl }}/federation/types.html#string
[status]: https://tools.ietf.org/html/rfc5545#section-3.2.12
[signature]: {{ site.baseurl }}/federation/types.html#signature
[event]: {{ site.baseurl }}/entities/event.html
[relayable]: {{ site.baseurl }}/federation/relayable.html

View file

@ -22,6 +22,7 @@ This entity represents a reshare of a status message. It inherits from [Post][po
| `location` | [Location][location] | The Location information of the status message. |
| `photo` | [Photo][photo]s | The attached Photos of the status message, the `status_message_guid` and the `author` need to match the status message. |
| `poll` | [Poll][poll] | The attached Poll of the status message. |
| `event` | [Event][event] | The attached Event of the status message. |
## Examples
@ -183,3 +184,4 @@ This entity represents a reshare of a status message. It inherits from [Post][po
[location]: {{ site.baseurl }}/entities/location.html
[photo]: {{ site.baseurl }}/entities/photo.html
[poll]: {{ site.baseurl }}/entities/poll.html
[event]: {{ site.baseurl }}/entities/event.html

View file

@ -85,6 +85,12 @@ An [ISO 8601][iso8601] date.
Example: `2016-02-19`
## Timezone
A timezone in the form `Area/Location` as used in the [Time Zone Database][tz].
Example: `Europe/Berlin`
## Signature
Signature with the private RSA key using the RSA-SHA256 algorithm and base64-encoded.
@ -98,3 +104,4 @@ Example:
[entities]: {{ site.baseurl }}/entities/
[commonmark]: http://spec.commonmark.org/
[iso8601]: https://www.w3.org/TR/NOTE-datetime
[tz]: https://www.iana.org/time-zones