Create an iOS application written in either Objective-C or Swift that fetches JSON data from a Guidebook API endpoint and displays it using a table view. You may use any 3rd party libraries to build the application.
Note: As you will be uploading your solution to GitHub, please do do not include the word “Guidebook” in your code.
The following endpoint responds with JSON data, representing a list of upcoming guides.
More specifically, the value for the data
key is an array of JSON objects where
each object contains key-value information about a specific guide.
URL:
GET https://builder.guidebook.com/service/v2/upcomingGuides/
Sample Response:
{
"total":"1",
"data":[
{
"startDate":"Jan 23, 2015",
"endDate":"Jan 25, 2015",
"name":"PAX South 2015",
"url":"/guide/27558",
"venue":{
"city":"San Antonio",
"state":"TX"
},
"objType":"guide",
"icon":"https://s3.amazonaws.com/media.guidebook.com/service/ghuQSj9675C8zKbaXtUTAMWxsVGkJf4r/logo.png"
}
]
}
- Create an iOS XCode project or workspace for this application in a new git repo.
- Asynchronously fetch and print (NSLog) the response data received from the API endpoint described above.
- Parse the retrieved JSON data into an array of objects of class
Guide
- Display the
Guide
objects in a UITableView or UICollectionView. Each cell represents oneGuide
object and should display it's name, city, state, and end date.
- Group the cells within UITableView or UICollectionView Sections by the
startDate
attribute.- The sections should be displayed in ascending
startDate
order. - The section header titles should be the
startDate
value in the sample format: "Jan 23, 2015"
- The sections should be displayed in ascending
Example of cells:
You may customize the design however you like!