GHKGitHub Class Reference
Inherits from | NSObject |
Declared in | GHKGitHub.h GHKGitHub.m |
Tasks
Other Methods
-
accessToken
Access Token
property -
clientId
Client ID
property -
callbackUrl
Callback URL
property -
secret
Secret Key
property
Initialization
-
– initWithClientId:secret:callbackUrl:
Initialize new instance
Authentication
-
– isLoginFormURL:
Returns is the URL a part of GitHub login form.
-
– handleOpenURL:completionHandler:
Returns YES if the URL is auth dialog callback.
-
– loginURLWithScope:
Returns auth dialog URL
-
– logout
Revokes the access token
Network
-
– sendAsynchronousRequest:completionHandler:
Performs an asynchronous request
Properties
accessToken
Access Token
@property (nonatomic, strong) NSString *accessToken
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
Discussion
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
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