This repository has been archived by the owner on Mar 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #737 from RocketChat/feature/rest-username-suggestion
[NEW] Add REST endpoint to get username suggestion
- Loading branch information
Showing
5 changed files
with
51 additions
and
17 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 |
---|---|---|
|
@@ -343,6 +343,7 @@ | |
- getAvatar | ||
- getPresence | ||
- get-preferences | ||
- getUsernameSuggestion | ||
- info | ||
- list | ||
- register | ||
|
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
30 changes: 30 additions & 0 deletions
30
developer-guides/rest-api/users/getusernamesuggestion/README.md
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# User Get Username Suggestion | ||
|
||
Gets a suggestion a new username to user. | ||
|
||
| URL | Requires Auth | HTTP Method | | ||
| :--- | :--- | :--- | | ||
| `/api/v1/users.getUsernameSuggestion` | `yes` | `GET` | | ||
|
||
## Other Users Example Call | ||
|
||
```bash | ||
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \ | ||
-H "X-User-Id: aobEdbYhXfu5hkeqG" \ | ||
http://localhost:3000/api/v1/users.getUsernameSuggestion | ||
``` | ||
|
||
## Example Result | ||
|
||
```json | ||
{ | ||
"result": "rocket.cat", | ||
"success": true | ||
} | ||
``` | ||
|
||
## Change Log | ||
|
||
| Version | Description | | ||
| :--- | :--- | | ||
| 0.65.0 | Added | |