![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
vso-node-api
Advanced tools
Integrate with Visual Studio Team Services from your Node.js apps.
npm install vso-node-api --save
6.3.2 has been released and is out of preview. This release contains the latest generated 4.0 VSTS/TFS api contracts. It also consumes the latest typed-rest-client.
Note: as of released 6.3.2 version, the web api create methods need to be async so you must use await. For example, note the await
in this sample
See samples for complete coding examples
npm install vso-node-api --save
let vsts = require('vso-node-api');
// your collection url
let collectionUrl = "https://fabrikam.visualstudio.com/defaultcollection";
// ideally from config
let token: string = "cbdeb34vzyuk5l4gxc4qfczn3lko3avfkfqyb47etahq6axpcqha";
let authHandler = vsts.getPersonalAccessTokenHandler(token);
let connect = new vsts.WebApi(collectionUrl, authHandler);
import * as ba from 'vso-node-api/BuildApi';
let vstsBuild: ba.IBuildApi = connection.getBuildApi();
These clients are available in the new 6.x preview API (npm install vso-node-api@preview
)
Coding is easy using linear coding with async/await in typescript
import * as bi from 'vso-node-api/interfaces/BuildInterfaces';
async function run() {
let project: string = 'myProject';
let defs: bi.DefinitionReference[] = await vstsBuild.getDefinitions(project);
defs.forEach((defRef: bi.DefinitionReference) => {
console.log(defRef.name + ' (' + defRef.id + ')');
});
}
run();
To see what APIs are available, see the appropriate client interface. For example, GitApi.ts
Pre-reqs: Node >= 4.4.7 LTS and typescript (tsc) >= 1.8
Run npm install
first
Set environment variables using set or export:
API_URL=https://fabrikam.visualstudio.com/defaultcollection
// use your token
API_TOKEN=cbdeb34vzyuk5l4gxc4qfczn3lko3avfkfqyb47etahq6axpcqha
API_PROJECT=myProject
Run samples:
$ npm run samples
Run a specific sample:
$ npm run samples -- http
To contribute to this repository, see the contribution guide
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
FAQs
Node client for Visual Studio Online/TFS REST APIs
The npm package vso-node-api receives a total of 1,171 weekly downloads. As such, vso-node-api popularity was classified as popular.
We found that vso-node-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.