|
|
|
@ -2294,19 +2294,19 @@ function addDropZone(position="0 1.4 -0.6", callback=setFeedbackHUD, radius=0.11 |
|
|
|
|
return el |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var swaggerclient // global scope to play with it from the console or in jxr |
|
|
|
|
AFRAME.registerComponent('issues-from-swagger', { |
|
|
|
|
init:function(){ |
|
|
|
|
let generatorName = this.attrName |
|
|
|
|
var specUrl = 'swagger.v1.json' // from 'https://git.benetou.fr/swagger.v1.json' but copied to bypass CORS |
|
|
|
|
var swaggerClient = new SwaggerClient(specUrl) |
|
|
|
|
let specUrl = 'swagger.v1.json' // from 'https://git.benetou.fr/swagger.v1.json' but copied to bypass CORS |
|
|
|
|
let swaggerClient = new SwaggerClient(specUrl) |
|
|
|
|
.then(function (swaggerClient) { |
|
|
|
|
myclient = swaggerClient |
|
|
|
|
swaggerclient = swaggerClient |
|
|
|
|
return swaggerClient.apis.issue.issueListIssues({owner: "utopiah", repo: "text-code-xr-engine"}) |
|
|
|
|
}, function (reason) { |
|
|
|
|
console.error("failed to load the spec" + reason) |
|
|
|
|
}) |
|
|
|
|
.then(function(issuesResult) { |
|
|
|
|
console.log(issuesResult.obj) |
|
|
|
|
res = issuesResult.obj |
|
|
|
|
res.slice(0,maxItemsFromSources).map( (n,i) => addNewNote( n.title, "0 "+(1+i/10)+" -1.8", ".1 .1 .1", null, generatorName ) ) |
|
|
|
|
}, function (reason) { |
|
|
|
|