Crate travis [−] [src]
Rust bindings for the Travis (v3) API
Examples
Travis hosts a ci in two domains, one for OSS projects and one
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 in 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 Tokens::new
constructor. 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::Error's |