Interface ILinkHelper
Contains functionality to build and parse links.
Namespace: Stylelabs.M.Sdk.WebClient.Contracts
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 |
---|---|---|
System.String | namespace | |
System.String | command |
Returns
Type | Description |
---|---|
Task<Link> |
CreateUploadToLinkAsync()
Generates a link to create an upload.
Declaration
Task<Link> CreateUploadToLinkAsync()
Returns
Type | Description |
---|---|
Task<Link> |
DataSourcesLinkAsync()
Creates a link to the datasources endpoint.
Declaration
Task<Link> DataSourcesLinkAsync()
Returns
Type | Description |
---|---|
Task<Link> | Link |
DataSourceToLinkAsync(String)
Creates a link to the datasource with the specified name
.
Declaration
Task<Link> DataSourceToLinkAsync(string name)
Parameters
Type | Name | Description |
---|---|---|
System.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<Int64>, Nullable<Int64>, Nullable<Int64>, Nullable<Boolean>)
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<System.Int64> | ids | The ids of the entity definitions to include in the result. |
System.Nullable<System.Int64> | skip | Number of results to skip. |
System.Nullable<System.Int64> | take | Number or results to fetch. |
System.Nullable<System.Boolean> | includeConditionalMembers | Optionally include conditional members. |
Returns
Type | Description |
---|---|
Task<Link> | Links to the entity definitions with the specified |
DefinitionsToLinksAsync(IEnumerable<String>, Nullable<Int64>, Nullable<Int64>, Nullable<Boolean>)
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<System.String> | names | The names of the entity definitions to include in the result. |
System.Nullable<System.Int64> | skip | Number of results to skip. |
System.Nullable<System.Int64> | take | Number or results to fetch. |
System.Nullable<System.Boolean> | includeConditionalMembers | Optionally include conditional members. |
Returns
Type | Description |
---|---|
Task<Link> | Links to the entity definitions with the specified |
DefinitionsToLinksAsync(Nullable<Int64>, Nullable<Int64>, Nullable<Boolean>)
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 |
---|---|---|
System.Nullable<System.Int64> | skip | Number of results to skip. |
System.Nullable<System.Int64> | take | Number or results to fetch. |
System.Nullable<System.Boolean> | includeConditionalMembers | Optionally include conditional members. |
Returns
Type | Description |
---|---|
Task<Link> | Links to the entity definitions included in this batch. |
DefinitionToLinkAsync(Int64, Nullable<Boolean>)
Creates a link to the entity definition with the specified id
.
Declaration
Task<Link> DefinitionToLinkAsync(long id, bool? includeConditionalMembers = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | id | The id of the entity definition to link to. |
System.Nullable<System.Boolean> | includeConditionalMembers | Optionally include conditional members. |
Returns
Type | Description |
---|---|
Task<Link> | A link to the entity definition with the specified |
DefinitionToLinkAsync(String, Nullable<Boolean>)
Creates a link to the entity definition with the specified name
.
Declaration
Task<Link> DefinitionToLinkAsync(string name, bool? includeConditionalMembers = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the entity definition to link to. |
System.Nullable<System.Boolean> | includeConditionalMembers | Optionally include conditional members. |
Returns
Type | Description |
---|---|
Task<Link> | A link to the entity definition with the specified |
DefinitionToLinkV2Async(String, Nullable<Boolean>)
Creates a link to the entity definition with the specified name
.
Declaration
Task<Link> DefinitionToLinkV2Async(string name, bool? includeConditionalMembers = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the entity definition to link to. |
System.Nullable<System.Boolean> | includeConditionalMembers | Optionally include conditional members. |
Returns
Type | Description |
---|---|
Task<Link> | A link to the entity definition with the specified |
DownloadOrderToLinkAsync(Int64)
Generates a link to send a download order.
Declaration
Task<Link> DownloadOrderToLinkAsync(long downloadOrderId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | downloadOrderId |
Returns
Type | Description |
---|---|
Task<Link> |
EntitiesLinkAsync()
Creates a link to the entities endpoint.
Declaration
Task<Link> EntitiesLinkAsync()
Returns
Type | Description |
---|---|
Task<Link> | Link |
EntitiesToLinksAsync(IEnumerable<Int64>)
Creates links to the entities with the specified ids
.
Declaration
Task<IList<Link>> EntitiesToLinksAsync(IEnumerable<long> ids)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.Int64> | ids | The ids of the entities to link to. |
Returns
Type | Description |
---|---|
Task<IList<Link>> | Link to the entities with the specified |
EntityToLinkAsync(Int64, CultureInfo)
Creates a link to the entity with the specified id
.
Declaration
Task<Link> EntityToLinkAsync(long id, CultureInfo culture = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | 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 |
---|---|---|
System.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 |
---|---|---|
System.String | identifier | The identifier of the script. |
Returns
Type | Description |
---|---|
Task<Link> |
ExplainUserPermissionsForEntityToLinkAsync(Int64, Int64)
Returns a user's permissions for an entity
Declaration
Task<Link> ExplainUserPermissionsForEntityToLinkAsync(long id, long userId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | id | The identifier of the entity. |
System.Int64 | 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
Type | Description |
---|---|
Task<Link> |
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<System.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<System.Nullable<System.Int64>> | 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<System.Nullable<System.Int64>> | 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<System.Nullable<System.Int64>> | 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<System.Nullable<System.Int64>> | 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<System.Int64>> | 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<System.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<System.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<System.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
Type | Description |
---|---|
Task<Link> |
PermissionsForEntityToLinkAsync(Int64)
Creates a link to the permissions for entity endpoint.
Declaration
Task<Link> PermissionsForEntityToLinkAsync(long id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | id | The entity id. |
Returns
Type | Description |
---|---|
Task<Link> | Link |
PolicyToLinkAsync(Int64)
Generates a link to the policy.
Declaration
Task<Link> PolicyToLinkAsync(long id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | id | The policy id. |
Returns
Type | Description |
---|---|
Task<Link> |
ResetPasswordToLinkAsync(Int64)
Gets the link to reset the password of the specified user.
Declaration
Task<Link> ResetPasswordToLinkAsync(long userId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | userId | Id of the user. |
Returns
Type | Description |
---|---|
Task<Link> |
SendConfirmationMailToLinkAsync(Int64)
Generates a link to send a confirmation mail.
Declaration
Task<Link> SendConfirmationMailToLinkAsync(long userId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | userId |
Returns
Type | Description |
---|---|
Task<Link> |
SendNotificationToLinkAsync(String)
Generates a link to send a notification.
Declaration
Task<Link> SendNotificationToLinkAsync(string notificationType)
Parameters
Type | Name | Description |
---|---|---|
System.String | notificationType |
Returns
Type | Description |
---|---|
Task<Link> |
SetUserPasswordToLinkAsync(Int64)
Gets the link to set the password of the specified user.
Declaration
Task<Link> SetUserPasswordToLinkAsync(long userId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | userId | Id of the user. |
Returns
Type | Description |
---|---|
Task<Link> |
Can we improve this article ? Provide feedback