add explicit /mine/ on to the end (bug 859357)

This commit is contained in:
Andy McKay 2013-04-08 10:43:55 -07:00
Родитель b320ed5124
Коммит 35f2569ae8
4 изменённых файлов: 11 добавлений и 6 удалений

Просмотреть файл

@ -184,8 +184,10 @@ This follows the order of the `django-tastypie`_ REST verbs.
* ``PUT`` replaces a resource, so this alters all the data on an existing
resource.
* ``PATCH`` alters some parts of an existing resource.
* ``DELETE`` deletes an object.
A ``GET`` accepts query string parameters for filtering.
A ``GET`` that accesses a standard listing object, also accepts the parameters
in the query string for filtering the result set down.
A ``POST``, ``PUT`` and ``PATCH`` accept parameters as a JSON document in the
body of the request.

Просмотреть файл

@ -48,6 +48,9 @@ Home page and featured apps
Account
=======
The account API, makes use of the term `mine`. This is an explicit variable to
lookup the logged in user account id.
.. http:get:: /api/v1/account/settings/mine/
Returns data on the currently logged in user.
@ -64,8 +67,7 @@ Account
}
The same information is also accessible at the canoncial `resource_uri`
`/api/v1/account/settings/1/`. The `/api/v1/account/mine/` URL is provided as
a convenience for users who don't know their full URL ahead of time.
`/api/v1/account/settings/1/`.
To update account information:
@ -85,7 +87,7 @@ Fields that can be updated:
* *display_name*
.. http:get:: /api/v1/account/installed/
.. http:get:: /api/v1/account/installed/mine/
Returns a list of the installed apps for the currently logged in user. This
ignores any reviewer or developer installed apps.
@ -100,6 +102,7 @@ Fields that can be updated:
:param meta: :ref:`meta-response-label`.
:param objects: A :ref:`listing <objects-response-label>` of :ref:`apps <app-response-label>`.
:status 200: sucessfully completed.
Categories
==========

Просмотреть файл

@ -56,7 +56,7 @@ class InstalledResource(AppResource):
authorization = OwnerAuthorization()
detail_allowed_methods = []
list_allowed_methods = ['get']
resource_name = 'installed'
resource_name = 'installed/mine/'
slug_lookup = None
def obj_get_list(self, request=None, **kwargs):

Просмотреть файл

@ -93,7 +93,7 @@ class TestInstalled(BaseOAuth):
def setUp(self):
super(TestInstalled, self).setUp(api_name='account')
self.list_url = list_url('installed')
self.list_url = list_url('installed/mine/')
self.user = UserProfile.objects.get(pk=2519)
def test_verbs(self):