The RepositoryBrowser project
The client is a Master Detail application called RepositoryBrowser
. This sets up a template that can be used on a large device with a split view controller, or a navigator view controller on a small device. In addition, actions to add entries are created.
To build the APIs necessary to display content, several utility classes are needed:
The
URITemplate
class processes URI templates with a set of key/value pairsThe
Threads
class allows functions to be run in the background or in the main threadThe
NSURLExtensions
class provides easy parsing JSON objects from a URLThe
DictionaryExtensions
class provides a means of creating a Swift dictionary from a JSON objectThe
GitHubAPI
class provides access to the GitHub remote API
URI templates
URI templates are defined in RFC 6570 at https://tools.ietf.org/html/rfc6570. They can be used to replace sequences of text surrounded by {}
in a URI. Although GitHub's API uses optional values {?...}
, the example client presented in...