AppVeyor Client for Node.js
This is an incomplete API client for the AppVeyor API.
Installation
npm install appveyor-js-client
Requirements
You must have an AppVeyor account. To run the client, you'll need your AppVeyor account name and API token, which you can get at https://ci.appveyor.com/api-token.
You may either pass your AppVeyor API token into the AppVeyor()
constructor or set it as an environment variable APPVEYOR_API_TOKEN
.
Usage
Create a client
var AppVeyor = require('appveyor-js-client'),
appveyor = new AppVeyor('account-name', 'api-token');
Get Projects
appveyor.getProjects(function(err, projects) {
console.log(projects);
});
Using Project API
Each project returned is an AppVeyorProject
object with the following functions:
getLastBuild(callback)
getLastBuildBranch(branch, callback)
getBuildByVersion(version, callback)
getHistory(options, callback)
getDeployments(callback)
getSettings(callback)
startBuildOfPullRequest(prId, callback)
Missing Features
Not all of the AppVeyor API is covered in this client. Feel free to add functionality in a pull request.
- TODO: http://www.appveyor.com/docs/api/projects-builds#get-project-settings-in-yaml
- TODO: http://www.appveyor.com/docs/api/projects-builds#add-project
- TODO: http://www.appveyor.com/docs/api/projects-builds#update-project
- TODO: http://www.appveyor.com/docs/api/projects-builds#update-project-settings-in-yaml
- TODO: http://www.appveyor.com/docs/api/projects-builds#delete-project
- TODO: http://www.appveyor.com/docs/api/projects-builds#start-build-of-specific-branch-commit