Latest 1.0.1
Homepage https://github.com/legoless/TravisKit
License MIT
Platforms ios 7.0, requires ARC
Frameworks Foundation, UIKit, CoreGraphics
Authors

Full unofficial native block based Travis CI API Wrapper for iOS / OS X based on AFNetworking 2.x and JSONModel mapping.

Installation

The easiest way to setup TravisKit is with CocoaPods.

pod TravisKit, '~> 1.0'

Alternatively, you can drag & drop the TravisKit folder into your project. Note that you need to install AFNetworking and JSONModel as well, as TravisKit will not work without them.

Authentication

Travis CI uses authentication tokens from GitHub, which can be obtained with:

Or a personal access token can be generated on user’s specific page. Note that OctoKit uses AFNetworking 1.x, which is incompatible with TravisKit.

Usage

To use TravisKit, we must first create a client and specify to which server we will connect to (open source or private).
After our client is initialized, we must authenticate to Travis with GitHub.

TKClient* client = [[TKClient alloc] initWithServer:TKOpenSourceServer];

[client authenticateWithGitHubToken:@"<GITHUB_TOKEN>" success:nil failure:nil;

After our client is authenticated, we can create requests for specific data:

[client recentRepositoriesWithSuccess:^(NSArray* repositories)
{
    // Do something with repositories here
}
failure:^(NSError* error)
{
    // Handle error
}];

See Demo project for more example calls and check out the header file for expressive documentation. Travis CI API documentation can also help.

Subspecs

TravisKit is divided into two Subspecs on CocoaPods:

  • Model contains all Travis CI models (TravisKit/Model) and routines to get them
  • Log contains all functionality to stream build logs in realtime (TravisKit/Log)

You may use both or each of them separately.

Contact

Dal Rupnik

License

TravisKit is available under the MIT license. See LICENSE file for more information.

Latest podspec

{
    "name": "TravisKit",
    "version": "1.0.1",
    "summary": "Travis CI iOS/OS X API Wrapper",
    "homepage": "https://github.com/legoless/TravisKit",
    "license": "MIT",
    "authors": {
        "Dal Rupnik": "[email protected]"
    },
    "source": {
        "git": "https://github.com/legoless/TravisKit.git",
        "tag": "1.0.1"
    },
    "platforms": {
        "ios": "7.0"
    },
    "frameworks": [
        "Foundation",
        "UIKit",
        "CoreGraphics"
    ],
    "requires_arc": true,
    "subspecs": [
        {
            "name": "Log",
            "source_files": "TravisKit/Log/*.{h,m}",
            "dependencies": [
                "libPusher"
            ]
        },
        {
            "name": "Model",
            "source_files": "TravisKit/Model/*.{h,m}",
            "dependencies": {
                "AFNetworking": [
                    "~> 2.0"
                ],
                "JSONModel": []
            }
        }
    ]
}

Pin It on Pinterest

Share This