The API for Profile is very erratic. The scraper holds the data, but makes no attempt to structure the data beyond a basic hash with concentration of data. The API needs to be refactored to consider a Profile, League, etc.
Thoughts on improved API:
ProfileScraper returns a Profile object. Profile has:
swarm_levels
achievements
leagues
match_history
Calls to these, unless already retrieved, will scrape the relevant page(s). In addition, give ProfileScraper an option to eager-scrape these subsections. This removes the need to have BnetScraper::Starcraft2.full_scrape and provides a better use-case for the library.
The API for Profile is very erratic. The scraper holds the data, but makes no attempt to structure the data beyond a basic hash with concentration of data. The API needs to be refactored to consider a Profile, League, etc.
Thoughts on improved API:
ProfileScraper returns a Profile object. Profile has:
swarm_levels
achievements
leagues
match_history
Calls to these, unless already retrieved, will scrape the relevant page(s). In addition, give ProfileScraper an option to eager-scrape these subsections. This removes the need to have
BnetScraper::Starcraft2.full_scrape
and provides a better use-case for the library.