TeamCity client for TypeScript (Node.js). Uses got to make requests, and date-fns to transform dates to and from the TeamCity required format.
WIP. Currently only contains GET requests for functionality I needed for a project.
The bones are there to add more functionality though, so feel free to make a PR if you'd like to add something.
yarn add teamcity-ts
or
npm install teamcity-ts
Use the TeamCityAPI
class to initalize a new API client.
Parameters:
host
- The hostname of the TeamCity server, without a http:// or https:// prefix. Requiredtoken
- An Access Token from the TeamCity server. Make sure it has the permissions you need. Requiredversion
- The version of the TeamCity API to use. Don't set this unless you know what you are doing. Defaults tolatest
, optional.
Example:
const teamCityAPI = new TeamCityAPI({host: "myteamcityserver.com", token: "mysecrettoken"})
const builds = teamCityAPI.GetBuilds({locator: {project: "myteamcityproject"}, paginate: false})
See the methods available on TeamCityAPI for different requests, or look at the source