Crate travis [] [src]

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.

Reexports

pub use error::Error;
pub use error::Result;

Modules

builds

interfaces for interacting with travis builds

env

interfaces for interacting with travis envs

error

Travis error types

jobs

interfaces for interacting with travis jobs

repos

Interfaces for interacting with travis repositories

Structs

Branch

A git branch ref

Client

Entry point for all travis operations

Owner

A Github owner

Enums

Credential

Representation of types of API credentials used to authenticate the client

State

Enumeration of Travis Build/Job states

Type Definitions

Future

A type alias for Futures that may return travis::Errors

Stream

A type alias for Streams that may result in travis::Errors