How to use the @esri/arcgis-rest-portal.updateGroup function in @esri/arcgis-rest-portal

To help you get started, we’ve selected a few @esri/arcgis-rest-portal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Esri / solution.js / packages / common / src / resourceHelpers.ts View on Github external
authentication: UserSession,
  isGroup: boolean = false
): Promise {
  const updateOptions: any = {
    params: {
      // Pass image in directly because item object is serialized, which discards a blob
      thumbnail: blob
    },
    authentication: authentication
  };
  updateOptions[isGroup ? "group" : "item"] = {
    id: itemId
  };

  return isGroup
    ? portal.updateGroup(updateOptions)
    : portal.updateItem(updateOptions);
}
github Esri / solution.js / packages / common / src / resourceHelpers.ts View on Github external
export function addThumbnailFromUrl(
  url: string,
  itemId: string,
  authentication: UserSession,
  isGroup: boolean = false
): Promise {
  const updateOptions: any = {
    authentication: authentication
  };
  updateOptions[isGroup ? "group" : "item"] = {
    id: itemId,
    thumbnailurl: url
  };
  return isGroup
    ? portal.updateGroup(updateOptions)
    : portal.updateItem(updateOptions);
}