diff --git a/docs/topics/api.rst b/docs/topics/api.rst index 820702b25c..357e5fcbdf 100644 --- a/docs/topics/api.rst +++ b/docs/topics/api.rst @@ -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. diff --git a/docs/topics/api/misc.rst b/docs/topics/api/misc.rst index 74f2a87ab7..5b7ac4da7c 100644 --- a/docs/topics/api/misc.rst +++ b/docs/topics/api/misc.rst @@ -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 ` of :ref:`apps `. + :status 200: sucessfully completed. Categories ========== diff --git a/mkt/account/api.py b/mkt/account/api.py index 635e6dcfef..7551bd06f5 100644 --- a/mkt/account/api.py +++ b/mkt/account/api.py @@ -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): diff --git a/mkt/account/tests/test_api.py b/mkt/account/tests/test_api.py index e41920ac7c..1f40baacb9 100644 --- a/mkt/account/tests/test_api.py +++ b/mkt/account/tests/test_api.py @@ -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):