Book Image

Swift Essentials - Second Edition

By : Alex Blewitt
Book Image

Swift Essentials - Second Edition

By: Alex Blewitt

Overview of this book

Swift was considered one of the biggest innovations last year, and certainly with Swift 2 announced at WWDC in 2015, this segment of the developer space will continue to be hot and dominating. This is a fast-paced guide to provide an overview of Swift programming and then walks you through in detail how to write iOS applications. Progress through chapters on custom views, networking, parsing and build a complete application as a Git repository, all by using Swift as the core language
Table of Contents (17 chapters)
Swift Essentials Second Edition
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

An overview of the GitHub API


The GitHub API provides a REST-based interface using JSON to return information about users and repositories. Version 3 of the API is documented at https://developer.github.com/v3/ and is the version used in this book.

Tip

The API is rate limited; at the time of writing, anonymous requests can be made up to sixty times per hour, while logged in users have a higher limit. The code repository for this book has sample responses that can be used for testing and development purposes.

Root endpoint

The main entry point to GitHub is the root endpoint. For the main GitHub site, this is https://api.github.com, and for GitHub Enterprise installations, it will be of the form https://hostname.example.org/api/v3/ along with user credentials. The endpoint provides a collection of URLs that can be used to find specific resources:

{
 ...
  "issue_search_url": "https://api.github.com/search/issues?q={query}{&page,per_page,sort,order}",
  "issues_url": "https://api.github.com...