This repository was archived by the owner on Dec 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 315
OCTClient Methods
iRare Media edited this page Sep 22, 2013
·
4 revisions
This is the designated initializer for the OCTClient class. Initializes the receiver to make requests to the given GitHub server.
- (id)initWithServer:(OCTServer *)server;
When using this initializer, the user property will not be set. +authenticatedClientWithUser:token: or +unauthenticatedClientWithUser: should typically be used instead.
Parameters
-
server- The GitHub server to connect to. This argument must not be nil.
Creates a client which will attempt to authenticate as the given user, using the given authorization token.
+ (instancetype)authenticatedClientWithUser:(OCTUser *)user token:(NSString *)token;
Note that this method does not actually perform a login or make a request to the server – it only sets an authorization header for future requests.
Parameters
-
user- The user to authenticate as. Theuserproperty of the returned client will be set to this object. This argument must not be nil. -
token- The authorization token for the given user.
Return Value
A new client.
Creates a client which can access any endpoints that don't require authentication.
+ (instancetype)unauthenticatedClientWithUser:(OCTUser *)user;
Parameters
-
userThe active user. Theuserproperty of the returned client will be set to this object. This argument must not be nil.
Return Value
A new client.