Interface ILinkHelper
Contains functionality to build and parse links.
Namespace: StylelabsStylelabs.MSdkWebClientContracts
Assembly: Stylelabs.M.Sdk.WebClient.dll
Syntax
public interface ILinkHelper
Methods
CommandToLinkAsync(string, string)
Generates a link to a command.
Declaration
Task<Link> CommandToLinkAsync(string @namespace, string command)
Parameters
Type | Name | Description |
---|---|---|
string | namespace |
The namespace. |
string | command |
The command. |
Returns
CopyEntityToLinkAsync(long)
Creates a link to the copy entity endpoint.
Declaration
Task<Link> CopyEntityToLinkAsync(long id)
Parameters
Type | Name | Description |
---|---|---|
long | id |
The entity id. |
Returns
CreateUploadToLinkAsync()
Generates a link to create an upload.
Declaration
Task<Link> CreateUploadToLinkAsync()
Returns
DataSourcesLinkAsync()
Creates a link to the data sources endpoint.
Declaration
Task<Link> DataSourcesLinkAsync()
Returns
DataSourceToLinkAsync(string)
Creates a link to the datasource with the specified name
.
Declaration
Task<Link> DataSourceToLinkAsync(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
The name of the datasource to link to. |
Returns
Type | Description |
---|---|
Task<>Link |
A link to the datasource with the specified |
DefinitionsToLinksAsync(IEnumerable<long>, long?, long?, bool?)
Creates links to the specified entity definitions by id.
Declaration
Task<Link> DefinitionsToLinksAsync(IEnumerable<long> ids, long? skip = null, long? take = null, bool? includeConditionalMembers = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<>long | ids |
The ids of the entity definitions to include in the result. |
long | skip |
Number of results to skip. |
long | take |
Number or results to fetch. |
bool | includeConditionalMembers |
Optionally include conditional members. |
Returns
Type | Description |
---|---|
Task<>Link |
Links to the entity definitions with the specified |
DefinitionsToLinksAsync(IEnumerable<string>, long?, long?, bool?)
Creates links to the specified entity definitions by name.
Declaration
Task<Link> DefinitionsToLinksAsync(IEnumerable<string> names, long? skip = null, long? take = null, bool? includeConditionalMembers = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<>string | names |
The names of the entity definitions to include in the result. |
long | skip |
Number of results to skip. |
long | take |
Number or results to fetch. |
bool | includeConditionalMembers |
Optionally include conditional members. |
Returns
Type | Description |
---|---|
Task<>Link |
Links to the entity definitions with the specified |
DefinitionsToLinksAsync(long?, long?, bool?)
Creates a link to the entity definitions endpoint.
Declaration
Task<Link> DefinitionsToLinksAsync(long? skip = null, long? take = null, bool? includeConditionalMembers = null)
Parameters
Type | Name | Description |
---|---|---|
long | skip |
Number of results to skip. |
long | take |
Number or results to fetch. |
bool | includeConditionalMembers |
Optionally include conditional members. |
Returns
Type | Description |
---|---|
Task<>Link |
Links to the entity definitions included in this batch. |
DefinitionToLinkAsync(long, bool?)
Creates a link to the entity definition with the specified id
.
Declaration
Task<Link> DefinitionToLinkAsync(long id, bool? includeConditionalMembers = null)
Parameters
Type | Name | Description |
---|---|---|
long | id |
The id of the entity definition to link to. |
bool | includeConditionalMembers |
Optionally include conditional members. |
Returns
Type | Description |
---|---|
Task<>Link |
A link to the entity definition with the specified |
DefinitionToLinkAsync(string, bool?)
Creates a link to the entity definition with the specified name
.
Declaration
Task<Link> DefinitionToLinkAsync(string name, bool? includeConditionalMembers = null)
Parameters
Type | Name | Description |
---|---|---|
string | name |
The name of the entity definition to link to. |
bool | includeConditionalMembers |
Optionally include conditional members. |
Returns
Type | Description |
---|---|
Task<>Link |
A link to the entity definition with the specified |
DefinitionToLinkV2Async(string, bool?)
Creates a link to the entity definition with the specified name
.
Declaration
Task<Link> DefinitionToLinkV2Async(string name, bool? includeConditionalMembers = null)
Parameters
Type | Name | Description |
---|---|---|
string | name |
The name of the entity definition to link to. |
bool | includeConditionalMembers |
Optionally include conditional members. |
Returns
Type | Description |
---|---|
Task<>Link |
A link to the entity definition with the specified |
DownloadOrderToLinkAsync(long)
Generates a link to send a download order.
Declaration
Task<Link> DownloadOrderToLinkAsync(long downloadOrderId)
Parameters
Type | Name | Description |
---|---|---|
long | downloadOrderId |
The download order id. |
Returns
EntitiesLinkAsync()
Creates a link to the entities endpoint.
Declaration
Task<Link> EntitiesLinkAsync()
Returns
EntitiesToLinksAsync(IEnumerable<long>)
Creates links to the entities with the specified ids
.
Declaration
Task<IList<Link>> EntitiesToLinksAsync(IEnumerable<long> ids)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<>long | ids |
The ids of the entities to link to. |
Returns
Type | Description |
---|---|
Task<>IList<>Link |
Link to the entities with the specified |
EntityToLinkAsync(long, CultureInfo)
Creates a link to the entity with the specified id
.
Declaration
Task<Link> EntityToLinkAsync(long id, CultureInfo culture = null)
Parameters
Type | Name | Description |
---|---|---|
long | id |
The id of the entity to link to. |
CultureInfo | culture |
Optional culture for the entity. |
Returns
Type | Description |
---|---|
Task<>Link |
A link to the entity with the specified |
EntityToLinkAsync(string)
Creates a link to the entity with the specified identifier
.
Declaration
Task<Link> EntityToLinkAsync(string identifier)
Parameters
Type | Name | Description |
---|---|---|
string | identifier |
The identifier of the entity to link to. |
Returns
Type | Description |
---|---|
Task<>Link |
A link to the entity with the specified |
ExecuteScriptToLinkAsync(string)
Gets the link to execute a script with specified identifier
.
Declaration
Task<Link> ExecuteScriptToLinkAsync(string identifier)
Parameters
Type | Name | Description |
---|---|---|
string | identifier |
The identifier of the script. |
Returns
ExplainUserPermissionsForEntityToLinkAsync(long, long)
Returns a user's permissions for an entity.
Declaration
Task<Link> ExplainUserPermissionsForEntityToLinkAsync(long id, long userId)
Parameters
Type | Name | Description |
---|---|---|
long | id |
The identifier of the entity. |
long | userId |
The identifier of the user. |
Returns
FetchJobsToLinkAsync()
Gets the link to the fetch jobs.
Declaration
Task<Link> FetchJobsToLinkAsync()
Returns
Type | Description |
---|---|
Task<>Link |
The fetch job endpoint link. |
FinalizeUploadToLinkAsync()
Generates a link to finalize an upload.
Declaration
Task<Link> FinalizeUploadToLinkAsync()
Returns
IdentifierFromEntityAsync(Link)
Extracts the identifier of an entity from the specified link
.
Declaration
Task<string> IdentifierFromEntityAsync(Link link)
Parameters
Type | Name | Description |
---|---|---|
Link | link |
The link to extract the identifier from. |
Returns
Type | Description |
---|---|
Task<>string |
The identifier as extracted from the link. If the link doesn't contain an identifier, null is returned. |
IdFromDownloadOrderAsync(Link)
Gets the download order id from the specified link.
Declaration
Task<long?> IdFromDownloadOrderAsync(Link link)
Parameters
Type | Name | Description |
---|---|---|
Link | link |
The link. |
Returns
Type | Description |
---|---|
Task<>long |
Download order id. |
IdFromEntityAsync(Link)
Extracts the id of an entity from the specified link
.
Declaration
Task<long?> IdFromEntityAsync(Link link)
Parameters
Type | Name | Description |
---|---|---|
Link | link |
The link to extract the name from. |
Returns
Type | Description |
---|---|
Task<>long |
The id as extracted from the link. If the link doesn't contain an id, null is returned. |
IdFromFetchJobsAsync(Link)
Extracts the id from a FetchJobs with the specified link
.
Declaration
Task<long?> IdFromFetchJobsAsync(Link link)
Parameters
Type | Name | Description |
---|---|---|
Link | link |
The link to extract the id from. |
Returns
Type | Description |
---|---|
Task<>long |
The id as extracted from the link. If the link doesn't contain an id, null is returned. |
IdFromPolicyAsync(Link)
Extracts the id from a policy with the specified link
.
Declaration
Task<long?> IdFromPolicyAsync(Link link)
Parameters
Type | Name | Description |
---|---|---|
Link | link |
The link to extract the id from. |
Returns
Type | Description |
---|---|
Task<>long |
The id as extracted from the link. If the link doesn't contain an id, null is returned. |
IdsFromEntitiesAsync(IEnumerable<Link>)
Extracts the id of entities from the specified links
.
Declaration
Task<IList<long>> IdsFromEntitiesAsync(IEnumerable<Link> links)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<>Link | links |
The links to extract the names from. |
Returns
Type | Description |
---|---|
Task<>IList<>long |
The ids as extracted from the links. |
NameFromDataSourceAsync(Link)
Extracts the name of a datasource from the specified link
.
Declaration
Task<string> NameFromDataSourceAsync(Link link)
Parameters
Type | Name | Description |
---|---|---|
Link | link |
The link to extract the name from. |
Returns
Type | Description |
---|---|
Task<>string |
The name as extracted from the link. If the link doesn't contain a name, null is returned. |
NameFromDefinitionAsync(Link)
Extracts the name of an entity definition from the specified link
.
Declaration
Task<string> NameFromDefinitionAsync(Link link)
Parameters
Type | Name | Description |
---|---|---|
Link | link |
The link to extract the name from. |
Returns
Type | Description |
---|---|
Task<>string |
The name as extracted from the link. If the link doesn't contain a name, null is returned. |
NamesFromDefinitionsAsync(IEnumerable<Link>)
Extracts the names of the specified entity definition links.
Declaration
Task<IList<string>> NamesFromDefinitionsAsync(IEnumerable<Link> links)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<>Link | links |
The links to extract the names from. |
Returns
Type | Description |
---|---|
Task<>IList<>string |
The names as extracted from the links. If the link doesn't contain a name, null is returned. |
PackageLinkAsync()
Gets the link to the package endpoint.
Declaration
Task<Link> PackageLinkAsync()
Returns
PermissionsForEntityToLinkAsync(long)
Creates a link to the permissions for entity endpoint.
Declaration
Task<Link> PermissionsForEntityToLinkAsync(long id)
Parameters
Type | Name | Description |
---|---|---|
long | id |
The entity id. |
Returns
PolicyToLinkAsync(long)
Generates a link to the policy.
Declaration
Task<Link> PolicyToLinkAsync(long id)
Parameters
Type | Name | Description |
---|---|---|
long | id |
The policy id. |
Returns
ResetPasswordToLinkAsync(long)
Gets the link to reset the password of the specified user.
Declaration
Task<Link> ResetPasswordToLinkAsync(long userId)
Parameters
Type | Name | Description |
---|---|---|
long | userId |
Id of the user. |
Returns
SendConfirmationMailToLinkAsync(long)
Generates a link to send a confirmation mail.
Declaration
Task<Link> SendConfirmationMailToLinkAsync(long userId)
Parameters
Type | Name | Description |
---|---|---|
long | userId |
The user id. |
Returns
SendNotificationToLinkAsync(string)
Generates a link to send a notification.
Declaration
Task<Link> SendNotificationToLinkAsync(string notificationType)
Parameters
Type | Name | Description |
---|---|---|
string | notificationType |
The notification type. |
Returns
SetUserPasswordToLinkAsync(long)
Gets the link to set the password of the specified user.
Declaration
Task<Link> SetUserPasswordToLinkAsync(long userId)
Parameters
Type | Name | Description |
---|---|---|
long | userId |
Id of the user. |