Last Comment Bug 867839 - API should surface the number of downloads and created date since these are sort parameters
: API should surface the number of downloads and created date since these are s...
Status: RESOLVED FIXED
p=1
:
Product: Marketplace
Classification: Server Software
Component: API (show other bugs)
: 1.5
: ARM Gonk (Firefox OS)
: P3 normal (vote)
: 2013-06-27
Assigned To: Mathieu Pillard [:mat]
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-01 17:49 PDT by Parul Mathur
Modified: 2013-07-02 11:48 PDT (History)
5 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Parul Mathur 2013-05-01 17:49:31 PDT
Steps to Reproduce:
Scenario #1
1. Call the API to search for apps on the Firefox Marketplace and sort by downloads.
https://marketplace.firefox.com/api/v1/apps/search/?sort=downloads
2. Examine the array of JSON objects returned to see exactly how many downloads for each app.

Expected Result:
The JSON object for the app should contain a name/value pair that indicates the number of downloads for the app.

Actual Result:
The JSON object for the app does not contain a name/value pair that indicates the number of downloads for the app.

Scenario #2
1. Call the API to search for apps on the Firefox Marketplace and sort by created date / time stamp.
https://marketplace.firefox.com/api/v1/apps/search/?sort=created
2. Examine the array of JSON objects returned to see the exact date / time stamp of creation for each app.

Expected Result:
The JSON object for the app should contain a name/value pair that indicates the exact date / time stamp of creation for the app.

Actual Result:
The JSON object for the app does not contain a name/value pair that indicates the exact date / time stamp of creation for the app.
Comment 1 Mathieu Pillard [:mat] 2013-06-24 04:21:48 PDT
Fixed in https://github.com/mozilla/zamboni/commit/e6e72f5be6fab5f6eade501a2d32d3f6a5b400ae

Steps to reproduce:
- Choose an app with public stats enabled
- Execute curl -s https://marketplace-dev.allizom.org/api/v1/apps/app/<slug>/ | python -m json.tool (replace <slug> by the app slug)
- You should see "weekly_downloads": <some number> and "created": <creation date> in the output

If you do the same thing with an app which has public stats disabled, weekly_downloads should be null.

Note You need to log in before you can comment on or make changes to this bug.