@esri/arcgis-rest-places
Advanced tools
Comparing version 1.0.1 to 1.0.2
/* @preserve | ||
* @esri/arcgis-rest-places - v1.0.0 - Apache-2.0 | ||
* Copyright (c) 2017-2023 Esri, Inc. | ||
* Tue Jun 27 2023 16:16:59 GMT+0000 (Coordinated Universal Time) | ||
* @esri/arcgis-rest-places - v1.0.1 - Apache-2.0 | ||
* Copyright (c) 2017-2024 Esri, Inc. | ||
* Sat Jun 15 2024 00:37:55 GMT+0000 (Coordinated Universal Time) | ||
*/ | ||
@@ -38,7 +38,5 @@ import { appendCustomParams, request } from '@esri/arcgis-rest-request'; | ||
* As this request can return many results, pagination is supported. | ||
* Regardless of paging, the maximum number of places that can be returned | ||
* by a single query is `200`. When a query results in more than `200` | ||
* places, the response will contain the property | ||
* `"maxResultsExceeded":true` in addition to place results. If `maxResultsExceeded` | ||
* is true an additional method `response.nextPage()` can be used to get the next page of results. | ||
* When a query results in more than [pageSize] places, the response will contain the property | ||
* `pagination` in addition to place results. If `pagination` exists, an additional method | ||
* `response.nextPage()` can be used to get the next page of results. | ||
* | ||
@@ -90,7 +88,5 @@ * ```js | ||
* As this request can return many results, pagination is supported. | ||
* Regardless of paging, the maximum number of places that can be returned | ||
* by a single query is `200`. When a query results in more than `200` | ||
* places, the response will contain the property | ||
* `"maxResultsExceeded":true` in addition to place results. If `maxResultsExceeded` | ||
* is true an additional method `response.nextPage()` can be used to get the next page of results. | ||
* When a query results in more than [pageSize] places, the response will contain the property | ||
* `pagination` in addition to place results. If `pagination` exists, an additional method | ||
* `response.nextPage()` can be used to get the next page of results. | ||
* | ||
@@ -107,3 +103,3 @@ * ``` | ||
* categoryIds: ["13002"], | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY"); | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
* }); | ||
@@ -159,3 +155,3 @@ * | ||
* placeId: "e78051acc722c55ab11ba930d8dd7772", | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY"); | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
* }); | ||
@@ -208,3 +204,3 @@ * | ||
* categoryId: "10000", | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY"); | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
* }); | ||
@@ -211,0 +207,0 @@ * |
/* @preserve | ||
* @esri/arcgis-rest-places - v1.0.0 - Apache-2.0 | ||
* Copyright (c) 2017-2023 Esri, Inc. | ||
* Tue Jun 27 2023 16:16:59 GMT+0000 (Coordinated Universal Time) | ||
* @esri/arcgis-rest-places - v1.0.1 - Apache-2.0 | ||
* Copyright (c) 2017-2024 Esri, Inc. | ||
* Sat Jun 15 2024 00:37:55 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,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 - v1.0.0 - Apache-2.0 | ||
* Copyright (c) 2017-2023 Esri, Inc. | ||
* Tue Jun 27 2023 16:16:59 GMT+0000 (Coordinated Universal Time) | ||
* @esri/arcgis-rest-places - v1.0.1 - Apache-2.0 | ||
* Copyright (c) 2017-2024 Esri, Inc. | ||
* Sat Jun 15 2024 00:37:55 GMT+0000 (Coordinated Universal Time) | ||
*/ | ||
@@ -42,7 +42,5 @@ (function (global, factory) { | ||
* As this request can return many results, pagination is supported. | ||
* Regardless of paging, the maximum number of places that can be returned | ||
* by a single query is `200`. When a query results in more than `200` | ||
* places, the response will contain the property | ||
* `"maxResultsExceeded":true` in addition to place results. If `maxResultsExceeded` | ||
* is true an additional method `response.nextPage()` can be used to get the next page of results. | ||
* When a query results in more than [pageSize] places, the response will contain the property | ||
* `pagination` in addition to place results. If `pagination` exists, an additional method | ||
* `response.nextPage()` can be used to get the next page of results. | ||
* | ||
@@ -94,7 +92,5 @@ * ```js | ||
* As this request can return many results, pagination is supported. | ||
* Regardless of paging, the maximum number of places that can be returned | ||
* by a single query is `200`. When a query results in more than `200` | ||
* places, the response will contain the property | ||
* `"maxResultsExceeded":true` in addition to place results. If `maxResultsExceeded` | ||
* is true an additional method `response.nextPage()` can be used to get the next page of results. | ||
* When a query results in more than [pageSize] places, the response will contain the property | ||
* `pagination` in addition to place results. If `pagination` exists, an additional method | ||
* `response.nextPage()` can be used to get the next page of results. | ||
* | ||
@@ -111,3 +107,3 @@ * ``` | ||
* categoryIds: ["13002"], | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY"); | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
* }); | ||
@@ -163,3 +159,3 @@ * | ||
* placeId: "e78051acc722c55ab11ba930d8dd7772", | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY"); | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
* }); | ||
@@ -212,3 +208,3 @@ * | ||
* categoryId: "10000", | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY"); | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
* }); | ||
@@ -215,0 +211,0 @@ * |
/* @preserve | ||
* @esri/arcgis-rest-places - v1.0.0 - Apache-2.0 | ||
* Copyright (c) 2017-2023 Esri, Inc. | ||
* Tue Jun 27 2023 16:16:59 GMT+0000 (Coordinated Universal Time) | ||
* @esri/arcgis-rest-places - v1.0.1 - Apache-2.0 | ||
* Copyright (c) 2017-2024 Esri, Inc. | ||
* Sat Jun 15 2024 00:37:55 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,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 |
@@ -24,7 +24,5 @@ "use strict"; | ||
* As this request can return many results, pagination is supported. | ||
* Regardless of paging, the maximum number of places that can be returned | ||
* by a single query is `200`. When a query results in more than `200` | ||
* places, the response will contain the property | ||
* `"maxResultsExceeded":true` in addition to place results. If `maxResultsExceeded` | ||
* is true an additional method `response.nextPage()` can be used to get the next page of results. | ||
* When a query results in more than [pageSize] places, the response will contain the property | ||
* `pagination` in addition to place results. If `pagination` exists, an additional method | ||
* `response.nextPage()` can be used to get the next page of results. | ||
* | ||
@@ -31,0 +29,0 @@ * ```js |
@@ -23,7 +23,5 @@ "use strict"; | ||
* As this request can return many results, pagination is supported. | ||
* Regardless of paging, the maximum number of places that can be returned | ||
* by a single query is `200`. When a query results in more than `200` | ||
* places, the response will contain the property | ||
* `"maxResultsExceeded":true` in addition to place results. If `maxResultsExceeded` | ||
* is true an additional method `response.nextPage()` can be used to get the next page of results. | ||
* When a query results in more than [pageSize] places, the response will contain the property | ||
* `pagination` in addition to place results. If `pagination` exists, an additional method | ||
* `response.nextPage()` can be used to get the next page of results. | ||
* | ||
@@ -40,3 +38,3 @@ * ``` | ||
* categoryIds: ["13002"], | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY"); | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
* }); | ||
@@ -43,0 +41,0 @@ * |
@@ -15,3 +15,3 @@ "use strict"; | ||
* categoryId: "10000", | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY"); | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
* }); | ||
@@ -18,0 +18,0 @@ * |
@@ -28,3 +28,3 @@ "use strict"; | ||
* placeId: "e78051acc722c55ab11ba930d8dd7772", | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY"); | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
* }); | ||
@@ -31,0 +31,0 @@ * |
@@ -34,7 +34,5 @@ import { IRequestOptions } from "@esri/arcgis-rest-request"; | ||
* As this request can return many results, pagination is supported. | ||
* Regardless of paging, the maximum number of places that can be returned | ||
* by a single query is `200`. When a query results in more than `200` | ||
* places, the response will contain the property | ||
* `"maxResultsExceeded":true` in addition to place results. If `maxResultsExceeded` | ||
* is true an additional method `response.nextPage()` can be used to get the next page of results. | ||
* When a query results in more than [pageSize] places, the response will contain the property | ||
* `pagination` in addition to place results. If `pagination` exists, an additional method | ||
* `response.nextPage()` can be used to get the next page of results. | ||
* | ||
@@ -41,0 +39,0 @@ * ```js |
@@ -21,7 +21,5 @@ import { request, appendCustomParams } from "@esri/arcgis-rest-request"; | ||
* As this request can return many results, pagination is supported. | ||
* Regardless of paging, the maximum number of places that can be returned | ||
* by a single query is `200`. When a query results in more than `200` | ||
* places, the response will contain the property | ||
* `"maxResultsExceeded":true` in addition to place results. If `maxResultsExceeded` | ||
* is true an additional method `response.nextPage()` can be used to get the next page of results. | ||
* When a query results in more than [pageSize] places, the response will contain the property | ||
* `pagination` in addition to place results. If `pagination` exists, an additional method | ||
* `response.nextPage()` can be used to get the next page of results. | ||
* | ||
@@ -28,0 +26,0 @@ * ```js |
@@ -33,7 +33,5 @@ import { IRequestOptions } from "@esri/arcgis-rest-request"; | ||
* As this request can return many results, pagination is supported. | ||
* Regardless of paging, the maximum number of places that can be returned | ||
* by a single query is `200`. When a query results in more than `200` | ||
* places, the response will contain the property | ||
* `"maxResultsExceeded":true` in addition to place results. If `maxResultsExceeded` | ||
* is true an additional method `response.nextPage()` can be used to get the next page of results. | ||
* When a query results in more than [pageSize] places, the response will contain the property | ||
* `pagination` in addition to place results. If `pagination` exists, an additional method | ||
* `response.nextPage()` can be used to get the next page of results. | ||
* | ||
@@ -50,3 +48,3 @@ * ``` | ||
* categoryIds: ["13002"], | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY"); | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
* }); | ||
@@ -53,0 +51,0 @@ * |
@@ -20,7 +20,5 @@ import { request, appendCustomParams } from "@esri/arcgis-rest-request"; | ||
* As this request can return many results, pagination is supported. | ||
* Regardless of paging, the maximum number of places that can be returned | ||
* by a single query is `200`. When a query results in more than `200` | ||
* places, the response will contain the property | ||
* `"maxResultsExceeded":true` in addition to place results. If `maxResultsExceeded` | ||
* is true an additional method `response.nextPage()` can be used to get the next page of results. | ||
* When a query results in more than [pageSize] places, the response will contain the property | ||
* `pagination` in addition to place results. If `pagination` exists, an additional method | ||
* `response.nextPage()` can be used to get the next page of results. | ||
* | ||
@@ -37,3 +35,3 @@ * ``` | ||
* categoryIds: ["13002"], | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY"); | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
* }); | ||
@@ -40,0 +38,0 @@ * |
@@ -25,3 +25,3 @@ import { IRequestOptions } from "@esri/arcgis-rest-request"; | ||
* categoryId: "10000", | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY"); | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
* }); | ||
@@ -28,0 +28,0 @@ * |
@@ -12,3 +12,3 @@ import { request, appendCustomParams } from "@esri/arcgis-rest-request"; | ||
* categoryId: "10000", | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY"); | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
* }); | ||
@@ -15,0 +15,0 @@ * |
@@ -38,3 +38,3 @@ import { IRequestOptions } from "@esri/arcgis-rest-request"; | ||
* placeId: "e78051acc722c55ab11ba930d8dd7772", | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY"); | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
* }); | ||
@@ -41,0 +41,0 @@ * |
@@ -25,3 +25,3 @@ import { request, appendCustomParams } from "@esri/arcgis-rest-request"; | ||
* placeId: "e78051acc722c55ab11ba930d8dd7772", | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY"); | ||
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
* }); | ||
@@ -28,0 +28,0 @@ * |
{ | ||
"name": "@esri/arcgis-rest-places", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Wrapper for the places services for @esri/arcgis-rest-js", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
[![npm version][npm-img]][npm-url] | ||
[![build status][travis-img]][travis-url] | ||
[![gzip bundle size][gzip-image]][npm-url] | ||
@@ -9,4 +8,2 @@ [![Coverage Status][coverage-img]][coverage-url] | ||
[npm-url]: https://www.npmjs.com/package/@esri/arcgis-rest-places | ||
[travis-img]: https://img.shields.io/travis/Esri/arcgis-rest-js/master.svg?style=flat-square | ||
[travis-url]: https://travis-ci.org/Esri/arcgis-rest-js | ||
[gzip-image]: https://img.badgesize.io/https://unpkg.com/@esri/arcgis-rest-places/dist/bundled/places.umd.min.js?compression=gzip | ||
@@ -28,12 +25,11 @@ [coverage-img]: https://codecov.io/gh/Esri/arcgis-rest-js/branch/master/graph/badge.svg | ||
```js | ||
import { ApiKeyManager } from "@esri/arcgis-rest-request; | ||
import { findPlacesNearPoint | ||
} from "@esri/arcgis-rest-places" | ||
import { ApiKeyManager } from "@esri/arcgis-rest-request"; | ||
import { findPlacesNearPoint } from "@esri/arcgis-rest-places"; | ||
const { places } = await findPlacesNearPoint({ | ||
x: -3.1883, | ||
y: 55.9533, | ||
categoryIds: ["13002"], | ||
authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
}); | ||
x: -3.1883, | ||
y: 55.9533, | ||
categoryIds: ["13002"], | ||
authentication: ApiKeyManager.fromKey("YOUR_API_KEY") | ||
}); | ||
@@ -43,3 +39,3 @@ console.log(places[0].name); | ||
### [API Reference](https://esri.github.io/arcgis-rest-js/api/places/) | ||
### [API Reference](https://developers.arcgis.com/arcgis-rest-js/api-reference/arcgis-rest-places/) | ||
@@ -46,0 +42,0 @@ @TODO |
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
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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
366273
2830
86
1