Reputation: 57
I am looking for a good getting started guide for using version one java Script SDK.I am using eclipse IDE.Please suggest the project structure for a webapp project using it.
here is a link that i got which has some info.
Also suggest the documentation for the version one java script SDK.
Upvotes: 1
Views: 149
Reputation: 574
I have created a article, http://walkerrandolphsmith.com/blog/v1sdk/, that describes a minimal setup to start using the SDK. In brief the application is a Node app that requires two dependencies: The v1sdk and a AJAX library.
In case the link becomes stale I will condense the article.
npm init --yes
npm install --save v1sdk axios
Create a file server.js
const axios = require('axios');
const v1sdk = require('v1sdk/dist/index');
const sdk = v1sdk.default;
const axiosConnector = v1sdk.axiosConnector;
const axiosConnectedSdk = axiosConnector(axios)(sdk);
const v1 = axiosConnectedSdk('V1Host', 'v1Instance')
.withCreds('v1User', 'v1Password');
v1.query({
'from': 'PrimaryWorkitem',
'select': [
'Name'
]
}).then(assets => {
console.log(assets);
});
From the command line run, node server.js
Upvotes: 1