GHKGitHub Class Reference
| Inherits from | NSObject |
| Declared in | GHKGitHub.h GHKGitHub.m |
Tasks
Other Methods
-
accessTokenAccess Token
property -
clientIdClient ID
property -
callbackUrlCallback URL
property -
secretSecret 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
-
– logoutRevokes the access token
Network
-
– sendAsynchronousRequest:completionHandler:Performs an asynchronous request
Properties
accessToken
Access Token
@property (nonatomic, strong) NSString *accessTokenDeclared In
GHKGitHub.hInstance Methods
handleOpenURL:completionHandler:
Returns YES if the URL is auth dialog callback.
- (BOOL)handleOpenURL:(NSURL *)URL completionHandler:(void ( ^ ) ( GHKAPIResponse *res ))completionHandlerDiscussion
@params URL the URL @params completionHandler Callbacks when received access token
Declared In
GHKGitHub.hinitWithClientId:secret:callbackUrl:
Initialize new instance
- (id)initWithClientId:(NSString *)clientId secret:(NSString *)secret callbackUrl:(NSString *)callbackUrlParameters
- clientId
The Client ID
- secret
The Secret Key
- callbackUrl
The Callback URL
Discussion
Declared In
GHKGitHub.hisLoginFormURL:
Returns is the URL a part of GitHub login form.
- (BOOL)isLoginFormURL:(NSURL *)URLDeclared In
GHKGitHub.hloginURLWithScope:
Returns auth dialog URL
- (NSURL *)loginURLWithScope:(NSArray *)scopeParameters
- scope
The scopes http://developer.github.com/v3/oauth/#scopes
Declared In
GHKGitHub.hsendAsynchronousRequest:completionHandler:
Performs an asynchronous request
- (void)sendAsynchronousRequest:(GHKAPIRequest *)request completionHandler:(void ( ^ ) ( GHKAPIResponse *res ))completionHandlerParameters
- request
The request to load
- completionHandler
The handler block to execute
Declared In
GHKGitHub.h