A blogging platform stores the following information that is available through separate API endpoints:
- user accounts
- blog posts for each user
- comments for each blog post
The organization needs to identify the 3 most engaging bloggers on the platform. Using only Swift and the Foundation library, output the top 3 users with the highest average number of comments per post in the following format:
[name]
- [id]
, Score: [average_comments]
Instead of connecting to a remote API, we are providing this data in form of JSON files, which have been made accessible through a custom Resource enum with a data
method that provides the contents of the file.
- How you choose to model your data
- How you transform the provided JSON data to your data model
- How you use your models to calculate this average value
- How you use this data point to sort the users
- Fork our repo to your own Github account and make private
- Invite user
fuelebot
to collaborate on that repo - Address each step of the problem above and commit as necessary
- Once you are finished, open a PR on your work and assign
fueledbot
as the reviewer