Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stefanjudis/travalizit
Node.js Travis API
https://github.com/stefanjudis/travalizit
Last synced: about 1 month ago
JSON representation
Node.js Travis API
- Host: GitHub
- URL: https://github.com/stefanjudis/travalizit
- Owner: stefanjudis
- Created: 2013-06-06T11:29:44.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-07-12T16:41:51.000Z (over 11 years ago)
- Last Synced: 2024-10-02T06:29:44.445Z (about 1 month ago)
- Language: JavaScript
- Size: 289 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
travalizit
==========Node.js Travis API
Install
-----------```
npm install travalizit
```Builds API
-----------### create a new builds object
**Description:** Create a new travalizit builds object. Make sure you set either repoId or name and owner, if not the return will be false.
```
var travalizit = require( 'travalizit' ),
builds = ravalizit.Builds();
``````
var travalizit = require( 'travalizit' ),
builds = travalizit.Builds( options );
```**options -** config options object **[ default: {} ]**
**options.host -** Change the travis API host, if you want **[ default: 'https://api.travis-ci.org/' ]**
**options.repoId -** Set a repository id to retrieve information about it **[ default: undefined ]**
**options.owner -** Set the repository owner to retrieve information about it **[ default: undefined ]**
**options.name -** Set the repository name to retrieve information about it **[ default: undefined ]**
*Example:*
```
builds = travalizit.Builds( {
repoId : '123456'
} );
``````
builds = travalizit.Builds( {
owner : 'stefanjudis',
name : 'travalizit
} );
``````
builds = travalizit.Builds( {} ); // false
```### fetch builds
**Description:** Fetch build data from Travis.
```
builds.all( callback );
```**callback -** callback function( error, response, body ) for error and response handling
*Example:*
```
builds.all( function( error, response, body ) {
// do something here
} );
```