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

Fetch data eager #2

Open
brunodles opened this issue Aug 5, 2018 · 3 comments
Open

Fetch data eager #2

brunodles opened this issue Aug 5, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@brunodles
Copy link
Owner

Currently the data is fetch during a method call.

Provide a way to fetch it when the page is parsed.

@brunodles brunodles added the enhancement New feature or request label Aug 5, 2018
@ram2012k
Copy link

like to work on it

@brunodles
Copy link
Owner Author

brunodles commented Oct 14, 2018

Hey @ram2012k, be welcome!

To work on it, you will need to fork the project.
Currently the project use proxies and reflection to fetch data and discovery what to parse.
Just like these steps (fetch steps):

  1. fetch page
  2. create a proxy with page content inside, this proxy is a model-like structure created by the lib's user.

When user tries to get some info, the lib will (field steps):

  1. find the wanted sub-content from initial proxy
  2. Transform this result as described by proxy's interface
  3. return data to the user

The idea for this issue is to figure out a way to parse the page entirely in fetch steps steps.
We can use a hashmap like structure to store data, as we do to avoid reloads.

@brunodles
Copy link
Owner Author

This also may be done by using a new proxy just to fetch all field recursively.

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

2 participants