Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When was seller last active #12

Open
RVRX opened this issue Oct 22, 2020 · 1 comment
Open

When was seller last active #12

RVRX opened this issue Oct 22, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@RVRX
Copy link
Owner

RVRX commented Oct 22, 2020

this could help with next expected drop feature. if the # is negative by a decent amount, and the seller hasn't updated any posts recently, then the negative # could instead be replaced with text about the seller being inactive.

View (via API of course, unless user is on tier page) their profile by newest, pull the last updated date from that. Difficulty would be in using (maybe their Algolia API?) to run a search through the API....

@RVRX RVRX added the enhancement New feature or request label Oct 22, 2020
@RVRX
Copy link
Owner Author

RVRX commented Oct 22, 2020

From a quick look:
starts with: https://www.grailed.com/api/searches, with request header ex:

{"index_name":"Listing_by_date_added_production","query":"","filters":{"designer_names":[],"strata":[]}}

which returns JSON with param uuid | "kk6lNgtKXw", which appears to be the search hash or something, might differ by profile?

We've also got a query to the Algolia API:

{"requests":[{"indexName":"Listing_by_low_price_production","params":"highlightPreTag=%3Cais-highlight-0000000000%3E&highlightPostTag=%3C%2Fais-highlight-0000000000%3E&hitsPerPage=40&filters=user.id%3A585715&page=0&maxValuesPerFacet=100&query=&facets=%5B%22category_size%22%2C%22category_path%22%2C%22designers.name%22%2C%22price_i%22%2C%22condition%22%2C%22location%22%2C%22badges%22%2C%22strata%22%5D&tagFilters=&numericFilters=%5B%22price_i%3E%3D0%22%2C%22price_i%3C%3D99999%22%5D"},{"indexName":"Listing_by_low_price_production","params":"highlightPreTag=%3Cais-highlight-0000000000%3E&highlightPostTag=%3C%2Fais-highlight-0000000000%3E&hitsPerPage=1&filters=user.id%3A585715&page=0&maxValuesPerFacet=100&query=&attributesToRetrieve=%5B%5D&attributesToHighlight=%5B%5D&attributesToSnippet=%5B%5D&tagFilters=&analytics=false&clickAnalytics=false&facets=price_i"}]}

^ might just be able to use the above details with the userid changing between requests, pulling only 1 hitsPerPage, and reading info from that object (ReturnedJSON[0]["bumped_at]).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant