forked from matrix-org/synapse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:matrix-org/synapse into stream_r…
…efactor Conflicts: synapse/handlers/events.py synapse/rest/events.py synapse/rest/room.py
- Loading branch information
Showing
23 changed files
with
771 additions
and
748 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ docs/build/ | |
*.egg-info | ||
|
||
cmdclient_config.json | ||
homeserver.db | ||
homeserver*.db | ||
|
||
.coverage | ||
htmlcov | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,299 +1,112 @@ | ||
{ | ||
"apiVersion": "1.0.0", | ||
"swaggerVersion": "1.2", | ||
"basePath": "http://petstore.swagger.wordnik.com/api", | ||
"resourcePath": "/user", | ||
"basePath": "http://localhost:8080/matrix/client/api/v1", | ||
"resourcePath": "/events", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"apis": [ | ||
{ | ||
"path": "/user", | ||
"operations": [ | ||
{ | ||
"method": "POST", | ||
"summary": "Create user", | ||
"notes": "This can only be done by the logged in user.", | ||
"type": "void", | ||
"nickname": "createUser", | ||
"authorizations": { | ||
"oauth2": [ | ||
{ | ||
"scope": "test:anything", | ||
"description": "anything" | ||
} | ||
] | ||
}, | ||
"parameters": [ | ||
{ | ||
"name": "body", | ||
"description": "Created user object", | ||
"required": true, | ||
"type": "User", | ||
"paramType": "body" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"path": "/user/logout", | ||
"path": "/events", | ||
"operations": [ | ||
{ | ||
"method": "GET", | ||
"summary": "Logs out current logged in user session", | ||
"notes": "", | ||
"type": "void", | ||
"nickname": "logoutUser", | ||
"authorizations": {}, | ||
"parameters": [] | ||
"summary": "Listen on the event stream", | ||
"notes": "This can only be done by the logged in user. This will block until an event is received, or until the timeout is reached.", | ||
"type": "PaginationChunk", | ||
"nickname": "get_event_stream" | ||
} | ||
] | ||
}, | ||
{ | ||
"path": "/user/createWithArray", | ||
"operations": [ | ||
], | ||
"parameters": [ | ||
{ | ||
"method": "POST", | ||
"summary": "Creates list of users with given input array", | ||
"notes": "", | ||
"type": "void", | ||
"nickname": "createUsersWithArrayInput", | ||
"authorizations": { | ||
"oauth2": [ | ||
{ | ||
"scope": "test:anything", | ||
"description": "anything" | ||
} | ||
] | ||
}, | ||
"parameters": [ | ||
{ | ||
"name": "body", | ||
"description": "List of user object", | ||
"required": true, | ||
"type": "array", | ||
"items": { | ||
"$ref": "User" | ||
}, | ||
"paramType": "body" | ||
} | ||
] | ||
"name": "from", | ||
"description": "The token to stream from.", | ||
"required": false, | ||
"type": "string", | ||
"paramType": "query" | ||
}, | ||
{ | ||
"name": "timeout", | ||
"description": "The maximum time in milliseconds to wait for an event.", | ||
"required": false, | ||
"type": "integer", | ||
"paramType": "query" | ||
} | ||
] | ||
}, | ||
{ | ||
"path": "/user/createWithList", | ||
"operations": [ | ||
], | ||
"responseMessages": [ | ||
{ | ||
"method": "POST", | ||
"summary": "Creates list of users with given list input", | ||
"notes": "", | ||
"type": "void", | ||
"nickname": "createUsersWithListInput", | ||
"authorizations": { | ||
"oauth2": [ | ||
{ | ||
"scope": "test:anything", | ||
"description": "anything" | ||
} | ||
] | ||
}, | ||
"parameters": [ | ||
{ | ||
"name": "body", | ||
"description": "List of user object", | ||
"required": true, | ||
"type": "array", | ||
"items": { | ||
"$ref": "User" | ||
}, | ||
"paramType": "body" | ||
} | ||
] | ||
"code": 400, | ||
"message": "Bad pagination token." | ||
} | ||
] | ||
}, | ||
{ | ||
"path": "/user/{username}", | ||
"path": "/events/{eventId}", | ||
"operations": [ | ||
{ | ||
"method": "PUT", | ||
"summary": "Updated user", | ||
"notes": "This can only be done by the logged in user.", | ||
"type": "void", | ||
"nickname": "updateUser", | ||
"authorizations": { | ||
"oauth2": [ | ||
{ | ||
"scope": "test:anything", | ||
"description": "anything" | ||
} | ||
] | ||
}, | ||
"parameters": [ | ||
{ | ||
"name": "username", | ||
"description": "name that need to be deleted", | ||
"required": true, | ||
"type": "string", | ||
"paramType": "path" | ||
}, | ||
{ | ||
"name": "body", | ||
"description": "Updated user object", | ||
"required": true, | ||
"type": "User", | ||
"paramType": "body" | ||
} | ||
], | ||
"responseMessages": [ | ||
{ | ||
"code": 400, | ||
"message": "Invalid username supplied" | ||
}, | ||
{ | ||
"code": 404, | ||
"message": "User not found" | ||
} | ||
] | ||
}, | ||
{ | ||
"method": "DELETE", | ||
"summary": "Delete user", | ||
"notes": "This can only be done by the logged in user.", | ||
"type": "void", | ||
"nickname": "deleteUser", | ||
"authorizations": { | ||
"oauth2": [ | ||
{ | ||
"scope": "test:anything", | ||
"description": "anything" | ||
} | ||
] | ||
}, | ||
"parameters": [ | ||
{ | ||
"name": "username", | ||
"description": "The name that needs to be deleted", | ||
"required": true, | ||
"type": "string", | ||
"paramType": "path" | ||
} | ||
], | ||
"responseMessages": [ | ||
{ | ||
"code": 400, | ||
"message": "Invalid username supplied" | ||
}, | ||
{ | ||
"code": 404, | ||
"message": "User not found" | ||
} | ||
] | ||
}, | ||
{ | ||
"method": "GET", | ||
"summary": "Get user by user name", | ||
"notes": "", | ||
"type": "User", | ||
"nickname": "getUserByName", | ||
"authorizations": {}, | ||
"summary": "Get information about a single event.", | ||
"notes": "Get information about a single event.", | ||
"type": "Event", | ||
"nickname": "get_event", | ||
"parameters": [ | ||
{ | ||
"name": "username", | ||
"description": "The name that needs to be fetched. Use user1 for testing.", | ||
"name": "eventId", | ||
"description": "The event ID to get.", | ||
"required": true, | ||
"type": "string", | ||
"paramType": "path" | ||
} | ||
], | ||
"responseMessages": [ | ||
{ | ||
"code": 400, | ||
"message": "Invalid username supplied" | ||
}, | ||
{ | ||
"code": 404, | ||
"message": "User not found" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"path": "/user/login", | ||
"operations": [ | ||
{ | ||
"method": "GET", | ||
"summary": "Logs user into the system", | ||
"notes": "", | ||
"type": "string", | ||
"nickname": "loginUser", | ||
"authorizations": {}, | ||
"parameters": [ | ||
{ | ||
"name": "username", | ||
"description": "The user name for login", | ||
"required": true, | ||
"type": "string", | ||
"paramType": "query" | ||
}, | ||
{ | ||
"name": "password", | ||
"description": "The password for login in clear text", | ||
"required": true, | ||
"type": "string", | ||
"paramType": "query" | ||
} | ||
], | ||
"responseMessages": [ | ||
{ | ||
"code": 400, | ||
"message": "Invalid username and password combination" | ||
"message": "Event not found." | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"models": { | ||
"User": { | ||
"id": "User", | ||
"PaginationChunk": { | ||
"id": "PaginationChunk", | ||
"properties": { | ||
"id": { | ||
"type": "integer", | ||
"format": "int64" | ||
}, | ||
"firstName": { | ||
"type": "string" | ||
}, | ||
"username": { | ||
"type": "string" | ||
}, | ||
"lastName": { | ||
"type": "string" | ||
}, | ||
"email": { | ||
"type": "string" | ||
"start": { | ||
"type": "string", | ||
"description": "A token which correlates to the first value in \"chunk\" for paginating.", | ||
"required": true | ||
}, | ||
"password": { | ||
"type": "string" | ||
"end": { | ||
"type": "string", | ||
"description": "A token which correlates to the last value in \"chunk\" for paginating.", | ||
"required": true | ||
}, | ||
"phone": { | ||
"type": "string" | ||
"chunk": { | ||
"type": "array", | ||
"description": "An array of events.", | ||
"required": true, | ||
"items": { | ||
"$ref": "Event" | ||
} | ||
} | ||
} | ||
}, | ||
"Event": { | ||
"id": "Event", | ||
"properties": { | ||
"event_id": { | ||
"type": "string", | ||
"description": "An ID which uniquely identifies this event.", | ||
"required": true | ||
}, | ||
"userStatus": { | ||
"type": "integer", | ||
"format": "int32", | ||
"description": "User Status", | ||
"enum": [ | ||
"1-registered", | ||
"2-active", | ||
"3-closed" | ||
] | ||
"room_id": { | ||
"type": "string", | ||
"description": "The room in which this event occurred.", | ||
"required": true | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.