forked from jamescooke/restapidocs
-
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.
- Loading branch information
1 parent
8bcafab
commit d89d8f4
Showing
2 changed files
with
47 additions
and
1 deletion.
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
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,46 @@ | ||
# Show Current User | ||
|
||
Get the details of the currently Authenticated User along with basic | ||
subscription information. | ||
|
||
**URL** : `/api/user/` | ||
|
||
**Method** : `GET` | ||
|
||
**Auth required** : YES | ||
|
||
**Permissions required** : None | ||
|
||
## Success Response | ||
|
||
**Code** : `200 OK` | ||
|
||
**Content examples** | ||
|
||
For a User with ID 1234 on the local database where that User has saved an | ||
email address and name information. | ||
|
||
```json | ||
{ | ||
"id": 1234, | ||
"first_name": "Joe", | ||
"last_name": "Bloggs", | ||
"email": "[email protected]" | ||
} | ||
``` | ||
|
||
For a user with ID 4321 on the local database but no details have been set yet. | ||
|
||
```json | ||
{ | ||
"id": 4321, | ||
"first_name": "", | ||
"last_name": "", | ||
"email": "" | ||
} | ||
``` | ||
|
||
## Notes | ||
|
||
* If the User does not have a `UserInfo` instance when requested then one will | ||
be created for them. |