Skip to content
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

API v1 cleanup #4415

Merged
merged 2 commits into from
Jul 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions docs/api/v1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -403,22 +403,20 @@ User
.. sourcecode:: js

{
"first_name": "",
"id": "1",
"last_login": "2010-10-28T13:38:13.022687",
"last_name": "",
"resource_uri": "/api/v1/user/1/",
"id": "1",
"resource_uri": "/api/v1/user/1/",
"username": "testuser"
}

:>json string first_name: First name.
:>json string id: User id.
:>json string last_login: Timestamp of last login.
:>json string last_name: Last name.
:>json string resource_uri: URI for this user.
:>json string username: User name.



.. important::

This API was changed after the initial release to remove private fields.


Versions
--------
.. http:get:: /api/v1/version/
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class UserResource(ModelResource):
class Meta(object):
allowed_methods = ['get']
queryset = User.objects.all()
fields = ['username', 'first_name', 'last_name', 'last_login', 'id']
fields = ['username', 'id']
filtering = {
'username': 'exact',
}
Expand Down