CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

GhostLoginManager 0.5.0

GhostLoginManager 0.5.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Feb 2016
SPMSupports SPM

Maintained by Kerr Marin Miller.



  • By
  • Kerr Marin Miller

GhostLoginManager

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 GhostLoginClient, then create an instance of a class that conforms to GhostLoginTokenParser (e.g. GhostLoginTokenJSONParser) and an instance of a class that conforms to GhostLoginSessionManager (e.g. GhostLoginJSONSessionManager). Use these objects to create a login client:

self.client = GhostLoginClient(manager: manager, parser: parser)
self.client!.loginWithUsername(email, password: password) { (token, error) -> Void in
    guard error == nil else {
        //Error
        return
    }                                                                         
    //Token is valid here
}

Requirements

This project requires the latest iOS, iOS 9.0. It also has a dependency on Alamofire version 3.

Installation

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

pod "GhostLoginManager"

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, [email protected]

License

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