File size: 5,976 Bytes
bbadb3d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
example_sync = {
    "next_batch": "s72595_4483_1934",
    "presence": {
        "events": [
            {
                "sender": "@alice:example.com",
                "type": "m.presence",
                "content": {
                    "presence": "online"
                }
            }
        ]
    },
    "account_data": {
        "events": [
            {
                "type": "org.example.custom.config",
                "content": {
                    "custom_config_key": "custom_config_value"
                }
            }
        ]
    },
    "rooms": {
        "join": {
            "!726s6s6q:example.com": {
                "state": {
                    "events": [
                        {
                            "sender": "@alice:example.com",
                            "type": "m.room.member",
                            "state_key": "@alice:example.com",
                            "content": {
                                "membership": "join"
                            },
                            "origin_server_ts": 1417731086795,
                            "event_id": "$66697273743031:example.com"
                        }
                    ]
                },
                "timeline": {
                    "events": [
                        {
                            "sender": "@bob:example.com",
                            "type": "m.room.member",
                            "state_key": "@bob:example.com",
                            "content": {
                                "membership": "join"
                            },
                            "prev_content": {
                                "membership": "invite"
                            },
                            "origin_server_ts": 1417731086795,
                            "event_id": "$7365636s6r6432:example.com"
                        },
                        {
                            "sender": "@alice:example.com",
                            "type": "m.room.message",
                            "age": 124524,
                            "txn_id": "1234",
                            "content": {
                                "body": "I am a fish",
                                "msgtype": "m.text"
                            },
                            "origin_server_ts": 1417731086797,
                            "event_id": "$74686972643033:example.com"
                        }
                    ],
                    "limited": True,
                    "prev_batch": "t34-23535_0_0"
                },
                "ephemeral": {
                    "events": [
                        {
                            "type": "m.typing",
                            "content": {
                                "user_ids": [
                                    "@alice:example.com"
                                ]
                            }
                        }
                    ]
                },
                "account_data": {
                    "events": [
                        {
                            "type": "m.tag",
                            "content": {
                                "tags": {
                                    "work": {
                                        "order": 1
                                    }
                                }
                            }
                        },
                        {
                            "type": "org.example.custom.room.config",
                            "content": {
                                "custom_config_key": "custom_config_value"
                            }
                        }
                    ]
                }
            }
        },
        "invite": {
            "!696r7674:example.com": {
                "invite_state": {
                    "events": [
                        {
                            "sender": "@alice:example.com",
                            "type": "m.room.name",
                            "state_key": "",
                            "content": {
                                "name": "My Room Name"
                            }
                        },
                        {
                            "sender": "@alice:example.com",
                            "type": "m.room.member",
                            "state_key": "@bob:example.com",
                            "content": {
                                "membership": "invite"
                            }
                        }
                    ]
                }
            }
        },
        "leave": {}
    }
}

example_pl_event = {
    "age": 242352,
    "content": {
        "ban": 50,
        "events": {
            "m.room.name": 100,
            "m.room.power_levels": 100
        },
        "events_default": 0,
        "invite": 50,
        "kick": 50,
        "redact": 50,
        "state_default": 50,
        "users": {
            "@example:localhost": 100
        },
        "users_default": 0
    },
    "event_id": "$WLGTSEFSEF:localhost",
    "origin_server_ts": 1431961217939,
    "room_id": "!Cuyf34gef24t:localhost",
    "sender": "@example:localhost",
    "state_key": "",
    "type": "m.room.power_levels"
}

example_event_response = {
    "event_id": "YUwRidLecu"
}

example_key_upload_response = {
    "one_time_key_counts": {
        "curve25519": 10,
        "signed_curve25519": 20
    }
}

example_success_login_response = {
    "user_id": "@example:localhost",
    "access_token": "abc123",
    "home_server": "matrix.org",
    "device_id": "GHTYAJCE"
}

example_preview_url = {
    "matrix:image:size": 102400,
    "og:description": "This is a really cool blog post from matrix.org",
    "og:image": "mxc://example.com/ascERGshawAWawugaAcauga",
    "og:image:height": 48,
    "og:image:type": "image/png",
    "og:image:width": 48,
    "og:title": "Matrix Blog Post"
}