@evergis/sp-api
Advanced tools
Comparing version 0.4.3 to 0.4.4
@@ -12,2 +12,8 @@ import { Crs } from "@evergis/sgis/Crs"; | ||
getProjectsList(properties: any): Promise<any>; | ||
getFavorites(properties: any): Promise<any>; | ||
addFavorites(data: any): Promise<any>; | ||
removeFavorites(data: any): Promise<any>; | ||
deleteProjects(data: any): Promise<any>; | ||
loadProject(name: any): Promise<any>; | ||
createProject(params: any): Promise<any>; | ||
downloadFile(url: any): void; | ||
@@ -14,0 +20,0 @@ operation(name: any, parameters: any, data: any): Promise<any>; |
@@ -38,5 +38,40 @@ import { ajaxp, parseJSON } from "./utils"; | ||
orderBy: properties.orderBy, | ||
owner: properties.owner | ||
owner: properties.owner, | ||
filterByFavorites: properties.filterByFavorites | ||
}); | ||
} | ||
getFavorites(properties) { | ||
return this._operation('favorites', { | ||
startFrom: properties.startFrom, | ||
take: properties.take, | ||
filter: properties.filter, | ||
}); | ||
} | ||
addFavorites(data) { | ||
return this._operation('favorites/add', {}, data); | ||
} | ||
removeFavorites(data) { | ||
return this._operation('favorites/remove', {}, data); | ||
} | ||
deleteProjects(data) { | ||
return this._operation('projects/remove', {}, data); | ||
} | ||
loadProject(name) { | ||
return this._operation('projects/load', { name: name }) | ||
.then((response) => { | ||
return response; | ||
}) | ||
.catch(err => { | ||
error(err); | ||
}); | ||
} | ||
createProject(params) { | ||
return this._operation('projects/create', params, {}) | ||
.then((response) => { | ||
return response; | ||
}) | ||
.catch(err => { | ||
error(err); | ||
}); | ||
} | ||
downloadFile(url) { | ||
@@ -43,0 +78,0 @@ this._frame.src = url; |
@@ -43,3 +43,3 @@ import { EventHandler } from "@evergis/sgis/EventHandler"; | ||
if (login && password) { | ||
let url = this.apiLoginUrl.replace('{login}', login).replace('{password}', password) + '&ts=' + Date.now(); | ||
let url = this.apiLoginUrl.replace('{login}', login).replace('{password}', password) + '&format=json&ts=' + Date.now(); | ||
ajax({ | ||
@@ -46,0 +46,0 @@ url: url, |
{ | ||
"name": "@evergis/sp-api", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/compilation/everGis.js", |
@@ -49,6 +49,47 @@ import {ajaxp, parseJSON} from "./utils"; | ||
orderBy: properties.orderBy, | ||
owner: properties.owner | ||
owner: properties.owner, | ||
filterByFavorites: properties.filterByFavorites | ||
}); | ||
} | ||
getFavorites(properties) { | ||
return this._operation('favorites', { | ||
startFrom: properties.startFrom, | ||
take: properties.take, | ||
filter: properties.filter, | ||
}); | ||
} | ||
addFavorites(data) { | ||
return this._operation('favorites/add', {}, data); | ||
} | ||
removeFavorites(data) { | ||
return this._operation('favorites/remove', {}, data); | ||
} | ||
deleteProjects(data) { | ||
return this._operation('projects/remove',{}, data) | ||
} | ||
loadProject(name) { | ||
return this._operation('projects/load', { name: name }) | ||
.then((response) => { | ||
return response; | ||
}) | ||
.catch(err => { | ||
error(err); | ||
}); | ||
} | ||
createProject(params) { | ||
return this._operation('projects/create', params, {}) | ||
.then((response) => { | ||
return response; | ||
}) | ||
.catch(err => { | ||
error(err); | ||
}); | ||
} | ||
downloadFile(url) { | ||
@@ -55,0 +96,0 @@ this._frame.src = url; |
@@ -71,3 +71,3 @@ import {EventHandler} from "@evergis/sgis/EventHandler"; | ||
if (login && password) { | ||
let url = this.apiLoginUrl.replace('{login}', login).replace('{password}', password) + '&ts=' + Date.now(); | ||
let url = this.apiLoginUrl.replace('{login}', login).replace('{password}', password) + '&format=json&ts=' + Date.now(); | ||
@@ -74,0 +74,0 @@ ajax({ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1696050
18478