@esri/arcgis-rest-places
Advanced tools
Comparing version 1.0.0 to 1.0.1
/* @preserve | ||
* @esri/arcgis-rest-places - v4.0.0 - Apache-2.0 | ||
* @esri/arcgis-rest-places - v1.0.0 - Apache-2.0 | ||
* Copyright (c) 2017-2023 Esri, Inc. | ||
* Thu May 04 2023 19:07:08 GMT+0000 (Coordinated Universal Time) | ||
* Tue Jun 27 2023 16:16:59 GMT+0000 (Coordinated Universal Time) | ||
*/ | ||
@@ -10,4 +10,4 @@ import { appendCustomParams, request } from '@esri/arcgis-rest-request'; | ||
function hasNextPage(response) { | ||
var _a; | ||
return !!((_a = response === null || response === void 0 ? void 0 : response.links) === null || _a === void 0 ? void 0 : _a.next); | ||
var _a, _b; | ||
return !!((_a = response === null || response === void 0 ? void 0 : response.links) === null || _a === void 0 ? void 0 : _a.next) || !!((_b = response === null || response === void 0 ? void 0 : response.pagination) === null || _b === void 0 ? void 0 : _b.nextUrl); | ||
} | ||
@@ -14,0 +14,0 @@ function getNextPageParams(currentOffset = 0, currentPageSize = 10) { |
/* @preserve | ||
* @esri/arcgis-rest-places - v4.0.0 - Apache-2.0 | ||
* @esri/arcgis-rest-places - v1.0.0 - Apache-2.0 | ||
* Copyright (c) 2017-2023 Esri, Inc. | ||
* Thu May 04 2023 19:07:08 GMT+0000 (Coordinated Universal Time) | ||
* Tue Jun 27 2023 16:16:59 GMT+0000 (Coordinated Universal Time) | ||
*/ | ||
import{appendCustomParams as e,request as t}from"@esri/arcgis-rest-request";const s="https://places-api.arcgis.com/arcgis/rest/services/places-service/v1";function n(e){var t;return!!(null===(t=null==e?void 0:e.links)||void 0===t?void 0:t.next)}function c(e=0,t=10){return{offset:e+t,pageSize:t}}function i(a){const r=e(a,["x","y","radius","categoryIds","pageSize","offset","searchText"],Object.assign({},a));return t(`${s}/places/near-point`,Object.assign(Object.assign({},r),{httpMethod:"GET"})).then((e=>{const t=Object.assign({},e);return n(e)&&(t.nextPage=()=>i(Object.assign(Object.assign({},a),c(a.offset,a.pageSize)))),t}))}function a(i){const r=e(i,["xmin","ymin","xmax","ymax","categoryIds","pageSize","offset","searchText"],Object.assign({},i));return t(`${s}/places/within-extent`,Object.assign(Object.assign({},r),{httpMethod:"GET"})).then((e=>{const t=Object.assign({},e);return n(e)&&(t.nextPage=()=>a(Object.assign(Object.assign({},i),c(i.offset,i.pageSize)))),t}))}function r(n){const{placeId:c}=n,i=e(n,["requestedFields"],Object.assign({},n));return t(`${s}/places/${c}`,Object.assign(Object.assign({},i),{httpMethod:"GET"}))}function o(n){const c=e(n,["filter"],Object.assign({},n));return t(`${s}/categories`,Object.assign(Object.assign({},c),{httpMethod:"GET"}))}function g(n){const{categoryId:c}=n,i=e(n,[],Object.assign({},n));return t(`${s}/categories/${c}`,Object.assign(Object.assign({},i),{httpMethod:"GET"}))}export{i as findPlacesNearPoint,a as findPlacesWithinExtent,o as getCategories,g as getCategory,r as getPlaceDetails}; | ||
import{appendCustomParams as e,request as t}from"@esri/arcgis-rest-request";const s="https://places-api.arcgis.com/arcgis/rest/services/places-service/v1";function n(e){var t,s;return!!(null===(t=null==e?void 0:e.links)||void 0===t?void 0:t.next)||!!(null===(s=null==e?void 0:e.pagination)||void 0===s?void 0:s.nextUrl)}function i(e=0,t=10){return{offset:e+t,pageSize:t}}function c(a){const r=e(a,["x","y","radius","categoryIds","pageSize","offset","searchText"],Object.assign({},a));return t(`${s}/places/near-point`,Object.assign(Object.assign({},r),{httpMethod:"GET"})).then((e=>{const t=Object.assign({},e);return n(e)&&(t.nextPage=()=>c(Object.assign(Object.assign({},a),i(a.offset,a.pageSize)))),t}))}function a(c){const r=e(c,["xmin","ymin","xmax","ymax","categoryIds","pageSize","offset","searchText"],Object.assign({},c));return t(`${s}/places/within-extent`,Object.assign(Object.assign({},r),{httpMethod:"GET"})).then((e=>{const t=Object.assign({},e);return n(e)&&(t.nextPage=()=>a(Object.assign(Object.assign({},c),i(c.offset,c.pageSize)))),t}))}function r(n){const{placeId:i}=n,c=e(n,["requestedFields"],Object.assign({},n));return t(`${s}/places/${i}`,Object.assign(Object.assign({},c),{httpMethod:"GET"}))}function o(n){const i=e(n,["filter"],Object.assign({},n));return t(`${s}/categories`,Object.assign(Object.assign({},i),{httpMethod:"GET"}))}function g(n){const{categoryId:i}=n,c=e(n,[],Object.assign({},n));return t(`${s}/categories/${i}`,Object.assign(Object.assign({},c),{httpMethod:"GET"}))}export{c as findPlacesNearPoint,a as findPlacesWithinExtent,o as getCategories,g as getCategory,r as getPlaceDetails}; | ||
//# sourceMappingURL=places.esm.min.js.map |
/* @preserve | ||
* @esri/arcgis-rest-places - v4.0.0 - Apache-2.0 | ||
* @esri/arcgis-rest-places - v1.0.0 - Apache-2.0 | ||
* Copyright (c) 2017-2023 Esri, Inc. | ||
* Thu May 04 2023 19:07:08 GMT+0000 (Coordinated Universal Time) | ||
* Tue Jun 27 2023 16:16:59 GMT+0000 (Coordinated Universal Time) | ||
*/ | ||
@@ -14,4 +14,4 @@ (function (global, factory) { | ||
function hasNextPage(response) { | ||
var _a; | ||
return !!((_a = response === null || response === void 0 ? void 0 : response.links) === null || _a === void 0 ? void 0 : _a.next); | ||
var _a, _b; | ||
return !!((_a = response === null || response === void 0 ? void 0 : response.links) === null || _a === void 0 ? void 0 : _a.next) || !!((_b = response === null || response === void 0 ? void 0 : response.pagination) === null || _b === void 0 ? void 0 : _b.nextUrl); | ||
} | ||
@@ -18,0 +18,0 @@ function getNextPageParams(currentOffset = 0, currentPageSize = 10) { |
/* @preserve | ||
* @esri/arcgis-rest-places - v4.0.0 - Apache-2.0 | ||
* @esri/arcgis-rest-places - v1.0.0 - Apache-2.0 | ||
* Copyright (c) 2017-2023 Esri, Inc. | ||
* Thu May 04 2023 19:07:08 GMT+0000 (Coordinated Universal Time) | ||
* Tue Jun 27 2023 16:16:59 GMT+0000 (Coordinated Universal Time) | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@esri/arcgis-rest-request")):"function"==typeof define&&define.amd?define(["exports","@esri/arcgis-rest-request"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).arcgisRest=e.arcgisRest||{},e.arcgisRest)}(this,(function(e,t){"use strict";const s="https://places-api.arcgis.com/arcgis/rest/services/places-service/v1";function n(e){var t;return!!(null===(t=null==e?void 0:e.links)||void 0===t?void 0:t.next)}function a(e=0,t=10){return{offset:e+t,pageSize:t}}e.findPlacesNearPoint=function e(i){const c=t.appendCustomParams(i,["x","y","radius","categoryIds","pageSize","offset","searchText"],Object.assign({},i));return t.request(`${s}/places/near-point`,Object.assign(Object.assign({},c),{httpMethod:"GET"})).then((t=>{const s=Object.assign({},t);return n(t)&&(s.nextPage=()=>e(Object.assign(Object.assign({},i),a(i.offset,i.pageSize)))),s}))},e.findPlacesWithinExtent=function e(i){const c=t.appendCustomParams(i,["xmin","ymin","xmax","ymax","categoryIds","pageSize","offset","searchText"],Object.assign({},i));return t.request(`${s}/places/within-extent`,Object.assign(Object.assign({},c),{httpMethod:"GET"})).then((t=>{const s=Object.assign({},t);return n(t)&&(s.nextPage=()=>e(Object.assign(Object.assign({},i),a(i.offset,i.pageSize)))),s}))},e.getCategories=function(e){const n=t.appendCustomParams(e,["filter"],Object.assign({},e));return t.request(`${s}/categories`,Object.assign(Object.assign({},n),{httpMethod:"GET"}))},e.getCategory=function(e){const{categoryId:n}=e,a=t.appendCustomParams(e,[],Object.assign({},e));return t.request(`${s}/categories/${n}`,Object.assign(Object.assign({},a),{httpMethod:"GET"}))},e.getPlaceDetails=function(e){const{placeId:n}=e,a=t.appendCustomParams(e,["requestedFields"],Object.assign({},e));return t.request(`${s}/places/${n}`,Object.assign(Object.assign({},a),{httpMethod:"GET"}))},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@esri/arcgis-rest-request")):"function"==typeof define&&define.amd?define(["exports","@esri/arcgis-rest-request"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).arcgisRest=e.arcgisRest||{},e.arcgisRest)}(this,(function(e,t){"use strict";const s="https://places-api.arcgis.com/arcgis/rest/services/places-service/v1";function n(e){var t,s;return!!(null===(t=null==e?void 0:e.links)||void 0===t?void 0:t.next)||!!(null===(s=null==e?void 0:e.pagination)||void 0===s?void 0:s.nextUrl)}function i(e=0,t=10){return{offset:e+t,pageSize:t}}e.findPlacesNearPoint=function e(a){const c=t.appendCustomParams(a,["x","y","radius","categoryIds","pageSize","offset","searchText"],Object.assign({},a));return t.request(`${s}/places/near-point`,Object.assign(Object.assign({},c),{httpMethod:"GET"})).then((t=>{const s=Object.assign({},t);return n(t)&&(s.nextPage=()=>e(Object.assign(Object.assign({},a),i(a.offset,a.pageSize)))),s}))},e.findPlacesWithinExtent=function e(a){const c=t.appendCustomParams(a,["xmin","ymin","xmax","ymax","categoryIds","pageSize","offset","searchText"],Object.assign({},a));return t.request(`${s}/places/within-extent`,Object.assign(Object.assign({},c),{httpMethod:"GET"})).then((t=>{const s=Object.assign({},t);return n(t)&&(s.nextPage=()=>e(Object.assign(Object.assign({},a),i(a.offset,a.pageSize)))),s}))},e.getCategories=function(e){const n=t.appendCustomParams(e,["filter"],Object.assign({},e));return t.request(`${s}/categories`,Object.assign(Object.assign({},n),{httpMethod:"GET"}))},e.getCategory=function(e){const{categoryId:n}=e,i=t.appendCustomParams(e,[],Object.assign({},e));return t.request(`${s}/categories/${n}`,Object.assign(Object.assign({},i),{httpMethod:"GET"}))},e.getPlaceDetails=function(e){const{placeId:n}=e,i=t.appendCustomParams(e,["requestedFields"],Object.assign({},e));return t.request(`${s}/places/${n}`,Object.assign(Object.assign({},i),{httpMethod:"GET"}))},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=places.umd.min.js.map |
@@ -6,4 +6,4 @@ "use strict"; | ||
function hasNextPage(response) { | ||
var _a; | ||
return !!((_a = response === null || response === void 0 ? void 0 : response.links) === null || _a === void 0 ? void 0 : _a.next); | ||
var _a, _b; | ||
return !!((_a = response === null || response === void 0 ? void 0 : response.links) === null || _a === void 0 ? void 0 : _a.next) || !!((_b = response === null || response === void 0 ? void 0 : response.pagination) === null || _b === void 0 ? void 0 : _b.nextUrl); | ||
} | ||
@@ -10,0 +10,0 @@ exports.hasNextPage = hasNextPage; |
export const baseUrl = "https://places-api.arcgis.com/arcgis/rest/services/places-service/v1"; | ||
export function hasNextPage(response) { | ||
var _a; | ||
return !!((_a = response === null || response === void 0 ? void 0 : response.links) === null || _a === void 0 ? void 0 : _a.next); | ||
var _a, _b; | ||
return !!((_a = response === null || response === void 0 ? void 0 : response.links) === null || _a === void 0 ? void 0 : _a.next) || !!((_b = response === null || response === void 0 ? void 0 : response.pagination) === null || _b === void 0 ? void 0 : _b.nextUrl); | ||
} | ||
@@ -6,0 +6,0 @@ export function getNextPageParams(currentOffset = 0, currentPageSize = 10) { |
{ | ||
"name": "@esri/arcgis-rest-places", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Wrapper for the places services for @esri/arcgis-rest-js", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
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 not supported yet
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 not supported yet
346843
2673