Skip to content

Commit

Permalink
Add GET user endpoint doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescooke committed Aug 15, 2015
1 parent 8bcafab commit d89d8f4
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ request. A Token can be acquired from the Login view above.
Each endpoint manipulates or displays information related to the User whose
Token is provided with the request:

* [TODO Show info](user/get.md) : `GET /api/user/`
* [Show info](user/get.md) : `GET /api/user/`
* [TODO Update info](user/put.md) : `PUT /api/user/`

### Account related
Expand Down
46 changes: 46 additions & 0 deletions examples/user/get.md
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.

0 comments on commit d89d8f4

Please sign in to comment.