@esri/hub-discussions
Advanced tools
Comparing version 22.1.1 to 22.1.2
import { __rest } from "tslib"; | ||
/* tslint:disable unified-signatures */ | ||
import { cloneObject } from "@esri/hub-common"; | ||
import { request } from "../request"; | ||
@@ -13,5 +12,4 @@ /** | ||
export function searchPosts(options) { | ||
var _a; | ||
const url = `/posts`; | ||
const opts = cloneObject(options); | ||
opts.httpMethod = "GET"; | ||
// need to serialize geometry and featureGeometry since this | ||
@@ -21,4 +19,5 @@ // is a GET request. we should consider requiring this to be | ||
// will exceed URL character limits | ||
const data = ["geometry", "featureGeometry"].reduce((acc, property) => (acc === null || acc === void 0 ? void 0 : acc[property]) ? Object.assign(Object.assign({}, acc), { [property]: JSON.stringify(acc[property]) }) : acc, opts.data); | ||
return request(url, Object.assign(Object.assign({}, opts), { data })); | ||
const data = ["geometry", "featureGeometry"].reduce((acc, property) => acc[property] | ||
? Object.assign(Object.assign({}, acc), { [property]: JSON.stringify(acc[property]) }) : acc, Object.assign({}, ((_a = options.data) !== null && _a !== void 0 ? _a : {}))); | ||
return request(url, Object.assign(Object.assign({}, options), { data, httpMethod: "GET" })); | ||
} | ||
@@ -25,0 +24,0 @@ /** |
@@ -6,3 +6,2 @@ "use strict"; | ||
/* tslint:disable unified-signatures */ | ||
const hub_common_1 = require("@esri/hub-common"); | ||
const request_1 = require("../request"); | ||
@@ -17,5 +16,4 @@ /** | ||
function searchPosts(options) { | ||
var _a; | ||
const url = `/posts`; | ||
const opts = hub_common_1.cloneObject(options); | ||
opts.httpMethod = "GET"; | ||
// need to serialize geometry and featureGeometry since this | ||
@@ -25,4 +23,5 @@ // is a GET request. we should consider requiring this to be | ||
// will exceed URL character limits | ||
const data = ["geometry", "featureGeometry"].reduce((acc, property) => (acc === null || acc === void 0 ? void 0 : acc[property]) ? Object.assign(Object.assign({}, acc), { [property]: JSON.stringify(acc[property]) }) : acc, opts.data); | ||
return request_1.request(url, Object.assign(Object.assign({}, opts), { data })); | ||
const data = ["geometry", "featureGeometry"].reduce((acc, property) => acc[property] | ||
? Object.assign(Object.assign({}, acc), { [property]: JSON.stringify(acc[property]) }) : acc, Object.assign({}, ((_a = options.data) !== null && _a !== void 0 ? _a : {}))); | ||
return request_1.request(url, Object.assign(Object.assign({}, options), { data, httpMethod: "GET" })); | ||
} | ||
@@ -29,0 +28,0 @@ exports.searchPosts = searchPosts; |
{ | ||
"name": "@esri/hub-discussions", | ||
"version": "22.1.1", | ||
"version": "22.1.2", | ||
"description": "Module to interact with ArcGIS Hub Discussions API in Node.js and modern browsers.", | ||
@@ -5,0 +5,0 @@ "main": "dist/node/index.js", |
Sorry, the diff of this file is not supported yet
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
176495
3592