Galleries A-Z list not sorted properly
starsirius opened this issue · 3 comments
Reported in Slack.
The galleries A-Z page is supposed to sort the partners in alphabetical order with sortable_id
. However, the order in each section isn't actually guaranteed and I think it depends on the order of completion of parallel requests that fetch all partners.
hey @starsirius,
I'm trying to get the list of partners, but I don't have access to the API URL. Currently, I'm receiving four pieces of data (in the screenshot), but it's not the same data I'm seeing on the production version on artsy.net. I understand that it's supposed to hit https://stagingapi.artsy.net/api/v1/partners, but I get an "Unauthorized" user error. I've tried using the ARTSY_ID/CLIENT_ID and the ARTSY_SECRET/CLIENT_SECRET values from env, but neither worked. Any tips?
@ckong1792 Welcome to Force and thanks for contributing!
There was a data issue in our staging server. I've re-indexed the partners and you should be able to see the full list of partners on that page.
Re authentication on stagingapi.artsy.net, you can find more doc on developers.artsy.net. For this specific API call, you can follow the 2 steps to authenticate with an XAPP token.
-
Get an XAPP token with the
CLIENT_ID
andCLIENT_SECRET
(in code). For example,https://stagingapi.artsy.net/api/v1/xapp_token?client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>
-
Fetch partners with the XAPP token (in code). For example,
https://stagingapi.artsy.net/api/v1/partners?xapp_token=<XAPP_TOKEN>
And the partners endpoint accepts params to filter the result.
Let me know if I can help clarify anything!
cc: @jordanchart