Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

Latest commit

 

History

History
52 lines (34 loc) · 2.03 KB

README.md

File metadata and controls

52 lines (34 loc) · 2.03 KB

KMMGhostLoginClient

CI Status Version License Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

To login to a Ghost blog use the KMMGhostLoginClient, then create an instance of a class that conforms to KMMGhostLoginTokenParser (e.g. KMMGhostLoginTokenJSONParser) and an instance of a class that conforms to KMMGhostLoginSessionManager (e.g. KMMGhostLoginJSONSessionManager). Use these objects to create a login client:

KMMGhostLoginClient *client = [[KMMGhostLoginClient alloc] initWithManager:manager parser:parser];
[client loginWithUsername:@"username"
                 password:@"password"
                 complete:^(KMMGhostLoginToken *__nullable token, NSError *__nullable error) {
    if(error) {
        NSLog(@"An error occurred");
    } else {
        //Use token here to get your auth token
        NSString *accessToken = token.accessToken;
    }
}];

Requirements

This project requires the latest iOS, iOS 8.4. It also has a dependency on AFNetworking version 2.6.

Installation

GhostLoginClient is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "KMMGhostLoginClient"

Alternatively, although I discourage this approach, clone the project and copy all the files under the Pod folder into your project.

Author

Kerr Marin Miller, @kerrmarin, www.kerrmarin.com

License

GhostLoginClient is available under the MIT license. See the LICENSE file for more info.