Operator shelf lists only 10 apps since the API request is sent with &limit=10

VERIFIED FIXED in 2015-01-06

Status

Marketplace
Consumer Pages
--
major
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: krupa, Assigned: sdevaney)

Tracking

2015-01-06
x86
Gonk (Firefox OS)
Points:
---

Details

(URL)

(Reporter)

Description

3 years ago
steps to reproduce:
1. Load marketplace prod with region=japan and carrier=kddi on your flame device.
2. click on the op shelf link to load the apps

expected behavior:
All the featured apps for the operator shelf are listed

actual behavior:
Only 10 apps are listed since the api request is sent with &limit=10

https://marketplace.firefox.com/api/v2/fireplace/feed/shelves/au/?carrier=kddi&dev=firefoxos&lang=en-US&limit=10&pro=7fffffffffff0.51.6&region=jp
It sounds like this is working as intended...

-> scott to verify the featured app list
Assignee: nobody → sdevaney
I don't think this is working as intended.

The limit param should influence the count of the list of resources, not the count of properties of the resource. In this case, the operator shelf is the resource, and the app list is a property.

I've found the code that's enforcing this, and have an open question to the developer who added that code.
(Assignee)

Comment 3

3 years ago
Thanks, all. This should be a priority fix, as KDDI has already reached out to me asking why all their apps aren't showing. I will reach out to them and explain this issue. Is it reasonable that we can fold this fix into the Jan 13 push?
(Reporter)

Updated

3 years ago
Target Milestone: --- → 2015-01-06
I talked it through with ngoke, and I think I'm comfortable merging this fix:

https://github.com/mozilla/zamboni/compare/2e339ea95be7...f2d41d921d02

STR:
1) Use the curation tools to create and publish an operator shelf containing 12 apps without applicable platform, region, or capability restrictions.
2) Using Firefox OS, load the detail page of that shelf. Observe the API request, and grab the URL.
3) Load that URL in the browser, ensuring that it contains limit=10.
4) Count the length of the apps object. It should be 10.
5) Change the value of the limit querystring param to 20.
6) Count the length of the apps object. It should be 12.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Sorry, those were bad STR. I conflated two things in my head.

1) Use the curation tools to create and publish an operator shelf containing 12 apps without applicable platform, region, or capability restrictions.
2) Using Firefox OS, load the detail page of that shelf. Observe the API request, and grab the URL.
3) Load that URL in the browser, ensuring that it contains limit=10.
4) Count the length of the apps object. It should be 12.
5) Go to /api/v2/feed/shelves/?limit=10
6) Ensure that the length of the `objects` object is 10.
You need to log in before you can comment on or make changes to this bug.