Closed
Bug 911382
Opened 11 years ago
Closed 11 years ago
Collections API should also allow filtering on ids for region/carrier/category
Categories
(Marketplace Graveyard :: API, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
2013-09-10
People
(Reporter: basta, Assigned: mat)
References
Details
(Whiteboard: [qa-])
https://marketplace-dev.allizom.org/api/v1/rocketfuel/collections/?cat®ion=2&carrier=0
You can see that this list of results contains collections that have regions other than "2".
Specifying `cat=None` (and other values) does not seem to show only collections for the homepage.
Assignee | ||
Comment 1•11 years ago
|
||
The filtering stuff is because you need to use slugs, not ids.
https://marketplace-dev.allizom.org/api/v1/rocketfuel/collections/?cat®ion=us&carrier=carrierless works
Not sure about cat=None yet, I'll have to look into it.
Reporter | ||
Comment 2•11 years ago
|
||
Mmmm. Can you update the docs, then?
http://firefox-marketplace-api.readthedocs.org/en/latest/topics/rocketfuel.html#get--api-v1-rocketfuel-collections-
Assignee | ||
Comment 3•11 years ago
|
||
Oops, my bad, I will. Unless you need IDs? In which case I can try to fix it to really accept both.
Assignee: nobody → mpillard
Reporter | ||
Comment 4•11 years ago
|
||
We're using IDs for everything now, but I'll change it to use slugs.
Assignee | ||
Comment 5•11 years ago
|
||
Ok. For what it's worth, I switched to slug to be compatible with what the App Search API does. I expected IDs to still work, but there must be some django-filter weirdness I had not anticipated.
Reporter | ||
Comment 6•11 years ago
|
||
It's a little wonky that you filter with slugs bug the category/region/carrier fields in the collection objects return IDs.
Comment 7•11 years ago
|
||
I'd be really happy if we could take slugs or IDs anywhere.
Updated•11 years ago
|
Blocks: mkt-publishtool-api
Target Milestone: --- → 2013-09-03
Updated•11 years ago
|
Target Milestone: 2013-09-03 → 2013-09-10
Updated•11 years ago
|
Summary: Collections API does not seem to be filtering collections. → Collections API does not seem to be filtering collections
Assignee | ||
Comment 8•11 years ago
|
||
Updated description. I opened https://bugzilla.mozilla.org/show_bug.cgi?id=911414 for the filtering on category=''.
Priority: -- → P2
Summary: Collections API does not seem to be filtering collections → Collections API should also allow filtering on ids for region/carrier/category
Assignee | ||
Comment 9•11 years ago
|
||
PR to allow filtering on null and ids: https://github.com/mozilla/zamboni/pull/1082
Status: NEW → ASSIGNED
Assignee | ||
Comment 10•11 years ago
|
||
Fixed in https://github.com/mozilla/zamboni/commit/e2e71c7579fc1ef0f32de896c0c2d6b7f453fcdf
We now allow filtering on both slugs and ids for region/carrier/cat.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•