Skip to content

Instantly share code, notes, and snippets.

@engincancan
Created March 21, 2018 09:34
Show Gist options
  • Save engincancan/d29278e47597d2c138ca4a19d94fa548 to your computer and use it in GitHub Desktop.
Save engincancan/d29278e47597d2c138ca4a19d94fa548 to your computer and use it in GitHub Desktop.
Android Code Challenge

Summary

Create an Android application that displays information received from network request.

Prerequisites

Details

The server at the following url responds with JSON formatted data:

(GET) https://api.github.com/orgs/googlesamples/repos

The response will have a list of “Repo” objects:

[
  {
    "id": 19383958,
    "name": "calendar-sync",
    "full_name": "googlesamples/calendar-sync",
    "description": "A set of samples that demonstrate how to utilize sync tokens and etags in the calendar API to sync resources more efficiently.",
    "stargazers_count": 48,
    "html_url": "https://github.com/googlesamples/calendar-sync",
    "owner": {
        "avatar_url": "https://avatars3.githubusercontent.com/u/7378196?v=4",
        … <more properties>
    },
     … <more properties>
  },
  … <more objects>
]

Milestones

Spend no more than two hours completing as many of these steps as possible.

  1. Retrieve and print out the data received from the url above.

  2. Parse the data retrieved from the server into a list of objects (You don't have to map all properties just map properties what you need)

  3. Display your objects in a RecyclerView

    • Should display the name, description, stargazers_count, and html_url
  4. Bonus point for to have your view display the image located at each owner object’s avatar_url property.

Please be aware of rate limit of the Github Api. If you need an access token you can create personal token without any personal permission using this tokens link and you can add either using query parameter or header property shown as OAuth2 token section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment