How to use the @esri/arcgis-rest-portal.shareItemWithGroup 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 / restHelpers.ts View on Github external
return new Promise((resolve, reject) => {
    const shareOptions: portal.IGroupSharingOptions = {
      groupId,
      id,
      authentication: destinationAuthentication
    };

    portal.shareItemWithGroup(shareOptions).then(
      (shareResponse: any) => {
        resolve();
      },
      (e: any) => reject(generalHelpers.fail(e))
    );
  });
}
github Esri / ember-arcgis-portal-services / addon / services / sharing-service.js View on Github external
shareWithGroup (owner, itemId, groupId, confirmItemControl = false, portalOpts) {
    const args = this.addOptions({
      id: itemId,
      owner,
      groupId,
      confirmItemControl
    }, portalOpts);

    return shareItemWithGroup(args)
    .catch(handleError);
  },
  /**