Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
The GitHub Book
Preface
Who You Are
What You Will Learn
First Class Languages You Need to Know
Who This Book is Not For
Conventions Used in This Book
Using Code Examples
Safari® Books Online
How to Contact Us
Acknowledgments
1. Introduction
cURL: a starting point for API exploration
Breadcrumbs to Successive API Paths
The JavaScript Object Notation (JSON) Format
Parsing JSON from the Command Line
Debugging Switches for cURL
All The Headers and Data
Authentication
Username and Password Authentication
Benefits of Username Authentication
Downsides to Username Authentication
oAuth
Scopes: specified actions tied to authentication tokens
Scope Limitations
Scope Escalation
Simplified oAuth Flow
Status Codes
Success (200 or 201)
Naughty JSON (400)
Improper JSON (422)
Successful Creation (201)
Nothing Has Changed (304)
Conditional Requests to Avoid Rate Limitations
GitHub API Rate Limits
Reading Your Rate Limits
Accessing Content from the Web
JSON-P
CORS Support
Specifying Response Content Format
Retrieving Formatted Content
GitHub Has Amazing API Documentation
Summary
2. Gists and the Gist API
Gists are repositories
Embedding Gists Inside HTML
Embedding Inside Jekyll blogs
Gist from the command line
Gists as fully functioning apps
Gists that render Gists
Going deeper into the Gist API
Summary
3. Gollum
“The Story of Smeagol…”
Repository Linked Wikis
Markup and Structure
Links
Inserting Images
Code Snippets
Gollum Structural Components
No Styling or JavaScript
Moving Gollum to Your Laptop
Alternative Editing Options
Editing with the Command Line
Adding Authentication
Building a Gollum Editor
Hacking Gollum
Wireframe Review Tool
Programmatically Handling Images
Leveraging the Rugged Library
Optimizing for Image Storage
Reviewing on GitHub
Improving Revision Navigation
Summary
4. Python and the Search API
General Principles
Authentication
Result Format
Search Operators and Qualifiers
Sorting
Search APIs in Detail
Repository Search
Code Search
Issue Search
User Search
Our example application
User flow
Python
AGitHub
WxPython
PyInstaller
The Code
Git credential helper
Windowing and interface
GitHub login
GitHub search
Displaying results
Packaging
Summary
5. DotNet and the Commit Status API
The API
Raw statuses
Combined status
Creating a status
Let’s write an app
Libraries
Following along
Visual Studio
Xamarin Studio
First steps
OAuth flow
Status handler
Summary
6. Ruby and Jekyll
The Harmless Brew that Spawned Jekyll
(Less Than) Evil Scientist Parents
Operating Jekyll Locally
A Jekyll Blog in 15 Minutes
YFM: YAML Front Matter
Jekyll markup
Using the jekyll command
Privacy Levels with Jekyll
Themes
Publishing on GitHub
Using a GitHub.io Jekyll Blog
Hosting On Your Own Domain
The gh-pages branch
The CNAME file
DNS Settings
Importing from other blogs
From Wordpress
Importing with direct database access
Importing from the Wordpress XML
Exporting from Wordpress alternatives
Scraping Sites into Jekyll
Jekyll Scraping Tactics
Writing our Parser
Scraper Library Installation
Parser Runner
Implementing Our Page Iterator
Generating Markdown
Customizing Styling
Grabbing Original Images
Mapping Integration
Inviting Contributions with GitHub “Fork”
Publishing our blog to GitHub
Summary
About the Authors
Copyright
← Prev
Back
Next →
← Prev
Back
Next →