-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add user_directory #1096
add user_directory #1096
Changes from 2 commits
9744519
1f7d4cd
b80f38e
d219cbc
605510e
3d8fe6e
784adad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Copyright 2016 OpenMarket Ltd | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
swagger: '2.0' | ||
info: | ||
title: "Matrix Client-Server Profile API" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not the profile api |
||
version: "1.0.0" | ||
host: localhost:8008 | ||
schemes: | ||
- https | ||
- http | ||
basePath: /_matrix/client/%CLIENT_MAJOR_VERSION% | ||
consumes: | ||
- application/json | ||
produces: | ||
- application/json | ||
securityDefinitions: | ||
$ref: definitions/security.yaml | ||
paths: | ||
"/user_directory/search": | ||
post: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as Travis says, this is missing its There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
summary: Searches the user directory. | ||
description: |- | ||
This API paginates over search results of the user directory. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this emphasises the pagination too strongly. Not least because aiui pagination isn't currently supported. How about "Performs a server-side search over all users registered on the server". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you also give some details about how the search works. Is it case-sensitive? Does it search displayname, mxid, both? |
||
security: | ||
- accessToken: [] | ||
parameters: | ||
- in: body | ||
name: body | ||
schema: | ||
type: object | ||
properties: | ||
search_term: | ||
type: string | ||
description: The term to search for | ||
example: "foo" | ||
limit: | ||
type: number | ||
description: The maximum number of results to return | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if this is optional, what's the behaviour when it's omitted? |
||
example: 10 | ||
required: ["search_term"] | ||
responses: | ||
200: | ||
description: The results of the paginated search. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. erm, "the paginated results of the search", surely. Or probably just "The results of the search". |
||
examples: | ||
application/json: { | ||
"results": [ | ||
{ | ||
"user_id": "@foo:bar.com", | ||
"display_name": "Foo", | ||
"avatar_url": "mxc://bar.com/foo" | ||
} | ||
], | ||
"limited": false | ||
} | ||
schema: | ||
type: object | ||
required: ["results", "limited"] | ||
properties: | ||
results: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we know anything about the ordering of the results? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. vaguely, seems implementation specific |
||
type: array | ||
items: | ||
title: User | ||
type: object | ||
properties: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is |
||
user_id: | ||
type: string | ||
example: "@foo:bar.com" | ||
display_name: | ||
type: string | ||
example: "Foo" | ||
avatar_url: | ||
type: string | ||
example: "mxc://bar.com/foo" | ||
limited: | ||
type: boolean | ||
description: Indicates if the result list has been truncated by the limit. | ||
429: | ||
description: This request was rate-limited. | ||
schema: | ||
"$ref": "definitions/error.yaml" | ||
tags: | ||
- User data |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,9 @@ r0.3.0 | |
- ``GET /media/{version}/preview_url`` | ||
(`#1064 <https://github.com/matrix-org/matrix-doc/pull/1064>`_). | ||
|
||
- ``POST /user_directory/search`` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs to go under 'unreleased changes', please. |
||
(`#1096 <https://github.com/matrix-org/matrix-doc/pull/1096>`_). | ||
|
||
- Spec clarifications: | ||
|
||
- Add endpoints and logic for invites and third-party invites to the federation | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1335,6 +1335,13 @@ Listing rooms | |
|
||
{{list_public_rooms_cs_http_api}} | ||
|
||
|
||
Users | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it might be worth merging this and profiles into a generic |
||
----- | ||
|
||
{{users_cs_http_api}} | ||
|
||
|
||
Profiles | ||
-------- | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not 2016, and you don't work for openmarket. (you may be after New Vector Ltd or Michael Telatynski, depending which hat you feel like wearing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the woes of Copying entire files and my IDE collapsing the header and never actually seeing this