En este documento se describen los servicios expuestos por el modulo core de la plataforma.
El login nos dara un JWT (Json web token) para se utilizado en las subsiguientes llamadas.
| library(testthat) | |
| calculateConnections <- function(layers) { | |
| l <- length(layers) | |
| total <- 0 | |
| for(i in 1:(l-1)) { | |
| total <- total + layers[i] * layers[i+1] | |
| } | |
| return(total) | |
| } |
| function userUpdate(userId, user, fetch = getFetch()) { | |
| // /api/v1/users/username/eroskisuperclaves/ | |
| // dev.auth.olympiaviajes.es | |
| const url = `http://${process.env.OAUTH_APP_URL}/api/v1/users/${userId}`; | |
| console.initTime('', 'OAuthUserUpdate'); | |
| return fetch(url, { | |
| method: 'PUT', | |
| headers: { | |
| Accept: 'application/json', | |
| 'Content-Type': 'application/json', |
| function userUpdate(userId, user, fetch = getFetch()) { | |
| // /api/v1/users/username/eroskisuperclaves/ | |
| // dev.auth.olympiaviajes.es | |
| const url = `http://${process.env.OAUTH_APP_URL}/api/v1/users/${userId}`; | |
| console.initTime('', 'OAuthUserUpdate'); | |
| return fetch(url, { | |
| method: 'PUT', | |
| headers: { | |
| Accept: 'application/json', | |
| 'Content-Type': 'application/json', |
| let p1 = new Promise((resolve, reject) => { | |
| setTimeout(resolve, 1000, "Everything OK in Promise 1"); | |
| }); | |
| let p2 = new Promise((resolve, reject) => { | |
| setTimeout(resolve, 2000, "Everything OK in Promise 2"); | |
| }); | |
| let p3 = new Promise((resolve, reject) => { | |
| setTimeout(reject, 2500, new Error("Something went wrong in Promise 3!")); | |
| }); |
| { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "colorCielo": { | |
| "type": "string" | |
| }, | |
| "route": { |
| var cswConfig = [ | |
| [ | |
| OWS_1_0_0, | |
| DC_1_1, | |
| DCT, | |
| XLink_1_0, | |
| SMIL_2_0, | |
| SMIL_2_0_Language, | |
| GML_3_1_1, | |
| GML_3_2_0, |
| var app = angular.module('suriWebClientApp'); | |
| // http://angular-tips.com/blog/2013/09/experiment-decorating-directives/ | |
| app.config(function($provide){ | |
| $provide.decorator('mdTabsDirective', function($delegate) { | |
| var directive = $delegate[0]; | |
| directive.template = '<section ng-hide="true" class="md-header" ng-class="{\'md-paginating\': pagination.active}"><button class="md-paginator md-prev" ng-if="pagination.active && pagination.hasPrev" ng-click="pagination.clickPrevious()" aria-hidden="true"><md-icon md-svg-icon="tabs-arrow"></md-icon></button><div class="md-header-items-container" md-tabs-pagination><div class="md-header-items"><md-tabs-ink-bar></md-tabs-ink-bar></div></div><button class="md-paginator md-next" ng-if="pagination.active && pagination.hasNext" ng-click="pagination.clickNext()" aria-hidden="true"><md-icon md-svg-icon="tabs-arrow"></md-icon></button></section><section class="md-tabs-content"></section>' | |
| return $delegate; | |
| }); | |
| }); |
| document.addEventListener("deviceready", | |
| function() { | |
| angular.element(document).ready( | |
| function () { | |
| // retrieve the DOM element that had the ng-app attribute | |
| var domElement = document.getElementById('appElement'); | |
| angular.bootstrap(domElement, ["angularAppName"]); | |
| }); | |
| }, false); |