3 unstable releases

Uses old Rust 2015

0.1.1 Oct 17, 2017
0.1.0 Oct 17, 2017
0.0.0 Oct 16, 2017

#10 in #api-interface

MIT license

37KB
947 lines

travis Build Status

rust and travis, sittin' in a tree

Doug Tangren (softprops) 2017


lib.rs:

Rust bindings for the Travis (v3) API

Examples

Travis hosts a CI enironments for OSS projects and for private projects (travis pro). The travis client exposes two iterfaces for to accomidate these: Client::oss and Client::pro

Depending on your usecase, you'll typically create one shared instance of a Client within your application. If needed you may clone instances.

// travis interfaces
extern crate travis;
// tokio async io
extern crate tokio_core;

use tokio_core::reactor::Core;
use travis::{Client, Credential};

fn main() {
  let mut core = Core::new().unwrap();
  let travis = Client::oss(
    Some(Credential::Github(
      String::from("gh-access-token")
    )),
    &mut core
  );
}

Cargo features

This crate has one Cargo feature, tls, which adds HTTPS support via the Client::{oss,pro} constructors. This feature is enabled by default.

Dependencies

~14–25MB
~389K SLoC