HubSiteManager
Implements
Methods
Method | Returns | Notes |
---|---|---|
|
HubSiteManager |
Factory function to construct a new HubProjectManager instance. Note: Used so that we could do async actions in the ctor. |
|
Promise<IHubSite> |
Create and store a new Site This also registers the item for oAuth and registers domain names with the hub Domain system Sites are stored as Items in the Sharing API |
|
Promise<void> |
Destroy a Site This permanently removes the backing Item, and clears the domain entries for it. |
|
Promise<IHubSite> |
Fetch a Site via Id, slug or domain This function does not require a user to be
authenticated, but it does require an |
|
Promise<IHubSite> |
Convert a Hub Project Item to a IHubProject |
|
Promise<ISearchResponse<IHubSite>> |
Search for Sites |
|
Promise<IHubSite> |
Update a Site |
|
Promise<IHubSite> |
Set the thumbnail for the Site |
init
StaticParameters
Parameter | Type | Default | Notes |
---|---|---|---|
contextOrManager Required | ArcGISContextManager | IArcGISContext |
Returns
Note: Used so that we could do async actions in the ctor.
create
Create and store a new Site
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
site Required | Partial<IHubSite> | ||
requestOptions Optional | IHubRequestOptions |
Returns
This also registers the item for oAuth and registers domain names with the hub Domain system
Sites are stored as Items in the Sharing API
destroy
Destroy a Site This permanently removes the backing Item, and clears the domain entries for it.
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
id Required | string | ||
requestOptions Optional | IHubRequestOptions |
Returns
fetch
Fetch a Site via Id, slug or domain
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
identifier Required | string | ||
requestOptions Optional | IHubRequestOptions |
Returns
This function does not require a user to be
authenticated, but it does require an IRequestOptions
which contains the portal instance to communicate with
search
Search for Sites
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
query Required | string | IQuery | ||
options Required | IHubSearchOptions |
Returns
update
Update a Site
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
site Required | IHubSite | ||
requestOptions Optional | IHubRequestOptions |
Returns
updateThumbnail
Set the thumbnail for the Site
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
site Required | IHubSite | ||
file Required | any | ||
filename Required | string | ||
requestOptions Optional | IUserRequestOptions |
Returns
Class defined in common/src/sites/HubSiteManager.ts:27
Factory function to construct a new HubProjectManager instance.