summaryrefslogtreecommitdiff
path: root/docs/responses.pod6
blob: 7515d39477380de45f7178efe5c55bc5af2b8dc8 (plain)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
=begin pod

=TITLE Matrix Responses

=SUBTITLE Wrappers for HTTP responses

=head1 Event


       class Matrix::Response::Event { }

Common contents of a response.

=head2 Mapped keys

=item content
=item type

=head1 RoomEvent


       class Matrix::Response::RoomEvent is Matrix::Response::Event { }

A single event for a room

=head2 Mapped keys

=item sender
=item origin_server_ts
=item event_id
=item room_id

=head2 Methods

=head3 id

    method id

Returns the event_id

=head3 timestamp

    method timestamp

Returns the origin_server_ts

=head3 room-id

    method room-id

returns the room_id


=head1 StateEvent


       class Matrix::Response::StateEvent is Matrix::Response::RoomEvent { }

=head2 Mapped keys

=item C<prev_content>
=item C<state_key>

=head1 Timeline


       class Matrix::Response::Timeline { }

=head2 Mapped keys

=item events — Return a list of L<Matrix::Response::Event|#Event>
=item limited
=item prev-batch


=head1 RoomInfo


       class Matrix::Response::RoomInfo { }

=head2 Mapped keys

=item room-id — Str with the room id
=item state — List of L<Matrix::Response::Event|#Event>
=item Timeine — A L<Matrix::Response::Timeline|#Timeline>

=head1 InviteInfo


       class Matrix::Response::InviteInfo { }

=head2 Mapped keys

=item room-id — Str with the room id
=item events — List of L<Matrix::Response::Event|#Event>

=head1 Sync


       class Matrix::Response::Sync { }

=head2 Mapped keys

=item next-batch — Str with the hash for the next sync batch
=item presence — List of L<Matrix::Response::Event|#Event>
=item joined-rooms — List of L<Matrix::Response::RoomInfo|#RoomInfo>
=item invited-rooms — List of L<Matrix::Response::InviteInfo|#InviteInfo>


=head1 Presence


       class Matrix::Response::Presence { }

=head2 Mapped keys

=item presence
=item last-active-ago
=item status-message
=item currently-active

=end pod