-
Notifications
You must be signed in to change notification settings - Fork 1
/
Api.dot
67 lines (56 loc) · 2.88 KB
/
Api.dot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
digraph G {
user -> frontend
frontend -> user
backend -> frontend
# cal <-> backend
calendar_strategy [label="interface CalendarStrategy: \n\
getBlockedDates(start: Timestamp, end: Timestamp) -> [{start: Timestamp, end: Timestamp}] \n\
", shape=square]
calendar_strategy_factory [label="type CalendarStrategyFactory: \n\
setStrategy(strategy: StrategyName) \n\
setOptions(options: Object) \n\
buildStrategy() -> CalendarStrategy \n\
", shape=square]
## cal -> backend
calendar -> backend [label="[{start: Timestamp, end: Timestamp}]"]
#backend -> calendar [label="getBlockedDates(strategy: CalendarStrategy, start: Timestamp, end: Timestamp) -> [{start: Timestamp, end: Timestamp}]"]
## backend -> cal
backend_to_cal [label="Calendar API: Interface:\lgetBlockedDates(\l strategy: CalendarStrategy,\l start: Timestamp,\l end: Timestamp\l) -> [{start: Timestamp, end: Timestamp}]",
shape="square"];
backend -> backend_to_cal [arrowhead="none"]
backend_to_cal -> calendar
backend_to_cal -> calendar_strategy
calendar_strategy -> calendar_strategy_factory
# backend <-> Datenbank
dbfn [label="\
newEvent(name: String, description: String, start: Timestamp, end: Timestamp, duration: Duration, dayStart: Duration, dayEnd: Duration, weekdays: Weekdays) -> Event\n\
newParticipant(event: Event, name: String) -> Participant\n\
newBlockedDate(event: Event, participant: Participant, start: Timestamp, end: Timestamp)\n\
newBlockedDates(event: Event, participant: Participant, blockedDates: [{start: Timestamp, end: Timestamp}])",
shape=block]
user [shape=Mdiamond];
backend -> dbfn [arrowhead="none"]
dbfn -> datenbank
# frontend <-> backend
frontend -> frontend_to_backend [arrowhead=none]
frontend_to_backend -> backend
frontend_to_backend [label="\l\
User Authentication through cookies \l\
POST /events -> ID (create an Event and receive id) \l\
GET /events/<id> -> Event (Get an event by id) \l\
POST /events/<id>/participants/ : {name: String} -> UserId (Add a user to an event) \l\
GET /events/<id>/participants/ -> [{user_id: UserId, name: String, blockedDates: [{start: Timestamp, end: Timestamp}]}] \
(Get all user of event) \l\
POST /events/<id>/participants/<user_id>/blocked_dates : {start: Timestamp, end: Timestamp} \l\
GET /events/<id>/participants/<user_id>/blocked_dates -> [{start: Timestamp, end: Timestamp}] \l\
POST /events/<id>/participants/<user_id>/blocked_dates/caldav : {link: String, password: String} \l\
"shape=square]
# calendar
calendar [label="Calender API"];
user_calendar [label="Users Calendar"]
calendar -> user_calendar
user_calendar -> calendar
db [label="MariaDB"]
datenbank [label="Datenbank API"]
datenbank -> db
}