Inherits from NSObject
Declared in GHKGitHub.h
GHKGitHub.m

Overview

A GitHub REST API v3 Client

Tasks

Other Methods

Initialization

Authentication

Network

Properties

accessToken

Access Token

@property (nonatomic, strong) NSString *accessToken

Declared In

GHKGitHub.h

callbackUrl

Callback URL

@property (nonatomic, strong) NSString *callbackUrl

Declared In

GHKGitHub.h

clientId

Client ID

@property (nonatomic, strong) NSString *clientId

Declared In

GHKGitHub.h

secret

Secret Key

@property (nonatomic, strong) NSString *secret

Declared In

GHKGitHub.h

Instance Methods

handleOpenURL:completionHandler:

Returns YES if the URL is auth dialog callback.

- (BOOL)handleOpenURL:(NSURL *)URL completionHandler:(void ( ^ ) ( GHKAPIResponse *res ))completionHandler

Discussion

@params URL the URL @params completionHandler Callbacks when received access token

Declared In

GHKGitHub.h

initWithClientId:secret:callbackUrl:

Initialize new instance

- (id)initWithClientId:(NSString *)clientId secret:(NSString *)secret callbackUrl:(NSString *)callbackUrl

Parameters

clientId

The Client ID

secret

The Secret Key

callbackUrl

The Callback URL

Declared In

GHKGitHub.h

isLoginFormURL:

Returns is the URL a part of GitHub login form.

- (BOOL)isLoginFormURL:(NSURL *)URL

Declared In

GHKGitHub.h

loginURLWithScope:

Returns auth dialog URL

- (NSURL *)loginURLWithScope:(NSArray *)scope

Parameters

scope

The scopes http://developer.github.com/v3/oauth/#scopes

Declared In

GHKGitHub.h

logout

Revokes the access token

- (void)logout

Declared In

GHKGitHub.h

sendAsynchronousRequest:completionHandler:

Performs an asynchronous request

- (void)sendAsynchronousRequest:(GHKAPIRequest *)request completionHandler:(void ( ^ ) ( GHKAPIResponse *res ))completionHandler

Parameters

request

The request to load

completionHandler

The handler block to execute

Declared In

GHKGitHub.h