2016-12-02 16:51:20 +00:00
|
|
|
package gomatrix
|
|
|
|
|
|
|
|
// ReqRegister is the JSON request for http://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-register
|
|
|
|
type ReqRegister struct {
|
|
|
|
Username string `json:"username,omitempty"`
|
|
|
|
BindEmail bool `json:"bind_email,omitempty"`
|
|
|
|
Password string `json:"password,omitempty"`
|
|
|
|
DeviceID string `json:"device_id,omitempty"`
|
|
|
|
InitialDeviceDisplayName string `json:"initial_device_display_name"`
|
|
|
|
Auth interface{} `json:"auth,omitempty"`
|
|
|
|
}
|
2016-12-09 15:03:19 +00:00
|
|
|
|
|
|
|
// ReqLogin is the JSON request for http://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-login
|
|
|
|
type ReqLogin struct {
|
|
|
|
Type string `json:"type"`
|
|
|
|
Password string `json:"password,omitempty"`
|
|
|
|
Medium string `json:"medium,omitempty"`
|
|
|
|
User string `json:"user,omitempty"`
|
|
|
|
Address string `json:"address,omitempty"`
|
|
|
|
Token string `json:"token,omitempty"`
|
|
|
|
DeviceID string `json:"device_id,omitempty"`
|
|
|
|
InitialDeviceDisplayName string `json:"initial_device_display_name,omitempty"`
|
|
|
|
}
|
2016-12-09 15:42:32 +00:00
|
|
|
|
|
|
|
// ReqCreateRoom is the JSON request for https://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-createroom
|
|
|
|
type ReqCreateRoom struct {
|
|
|
|
Visibility string `json:"visibility,omitempty"`
|
|
|
|
RoomAliasName string `json:"room_alias_name,omitempty"`
|
|
|
|
Name string `json:"name,omitempty"`
|
|
|
|
Topic string `json:"topic,omitempty"`
|
|
|
|
Invite []string `json:"invite,omitempty"`
|
|
|
|
Invite3PID []ReqInvite3PID `json:"invite_3pid,omitempty"`
|
|
|
|
CreationContent map[string]interface{} `json:"creation_content,omitempty"`
|
|
|
|
InitialState []Event `json:"initial_state,omitempty"`
|
|
|
|
Preset string `json:"preset,omitempty"`
|
|
|
|
IsDirect bool `json:"is_direct,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-01-05 14:33:38 +00:00
|
|
|
// ReqRedact is the JSON request for http://matrix.org/docs/spec/client_server/r0.2.0.html#put-matrix-client-r0-rooms-roomid-redact-eventid-txnid
|
|
|
|
type ReqRedact struct {
|
|
|
|
Reason string `json:"reason,omitempty"`
|
|
|
|
}
|
|
|
|
|
2016-12-09 15:42:32 +00:00
|
|
|
// ReqInvite3PID is the JSON request for https://matrix.org/docs/spec/client_server/r0.2.0.html#id57
|
|
|
|
// It is also a JSON object used in https://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-createroom
|
|
|
|
type ReqInvite3PID struct {
|
|
|
|
IDServer string `json:"id_server"`
|
|
|
|
Medium string `json:"medium"`
|
|
|
|
Address string `json:"address"`
|
|
|
|
}
|