You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The search filters are not fetched using a network request, I believe they are pre-baked into the front end somehow (maybe server side rendering, but I'm not sure what the request would be). Either figure out a way to get these through an API request (rabbit hole) or go to the base search page and scrape (more costly during setup but really only needs to happen once per session).
Allow user input for keywords and different filters
Make a request to Lolibrary API using user input
Use returned JSON to build list of search results on the fly
Need to build components for search results. Start with a simple list item / flat list that shows image, name, category, and brand for each item.
Image
Details
Use index of list item to get full data from array instead and have this.state.searchResults store raw response body?
Individual items in the list can be tapped to go to full detail page. This page will also have a link to the main lolibrary page either as a button or as a "share" link
All of the information returned from lolibrary will be shown on the detail page.
The text was updated successfully, but these errors were encountered:
Future issues:
Getting filters for search. Lolibrary uses Laravel Nova to manage data. I want to programatically get the values for different filters (brand, color, tags, etc) rather than hardcoding them so that the app always has the same filters as the Lolibrary database.
Using data from the database requires making requests to the nova API, which requires logging in to lolibrary. Logging in can be done using a simple post request, but the post request requires a token which must be grabbed from the metadata of the database login page https://lolibrary.org/library/login. this token is expired upon use and must be fetched for each login attempt.
Login parameters are passed as form data, simply email, password, and _token. _token is the token from the login form mentioned above. Without the token, the login request will get a response that says the page has expired. I don't want to make any dubious requests so going through this process will likely be required. At a certain point, would it be possible to have a user login and use their credentials for this request? I am worried that using one account to request the filters may result in some rate limiting depending on implementation. The request for filters could be made once during app setup to prevent this, then cached?
The text was updated successfully, but these errors were encountered: