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

An iOS client library to log into an installation of Ghost

License

Notifications You must be signed in to change notification settings

kerrmarin/KMMGhostLoginClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

An iOS client library to log into an installation of Ghost

Resources

License

Stars

Watchers

Forks

Packages

No packages published