1. Stylelabs.M.Sdk.WebClient.Contracts

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

TypeNameDescription
stringnamespaceThe namespace.
stringcommandThe command.

Returns

TypeDescription
Task<>LinkA Link.

CopyEntityToLinkAsync(long)

Creates a link to the copy entity endpoint.

Declaration

Task<Link> CopyEntityToLinkAsync(long id)

Parameters

TypeNameDescription
longidThe entity id.

Returns

TypeDescription
Task<>LinkA Link.

CreateUploadToLinkAsync()

Generates a link to create an upload.

Declaration

Task<Link> CreateUploadToLinkAsync()

Returns

TypeDescription
Task<>LinkA Link.

DataSourcesLinkAsync()

Creates a link to the data sources endpoint.

Declaration

Task<Link> DataSourcesLinkAsync()

Returns

TypeDescription
Task<>LinkA Link.

DataSourceToLinkAsync(string)

Creates a link to the datasource with the specified name.

Declaration

Task<Link> DataSourceToLinkAsync(string name)

Parameters

TypeNameDescription
stringnameThe name of the datasource to link to.

Returns

TypeDescription
Task<>LinkA link to the datasource with the specified name.

DefinitionsToLinksAsync(IEnumerable, 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

TypeNameDescription
IEnumerable<>longidsThe ids of the entity definitions to include in the result.
longskipNumber of results to skip.
longtakeNumber or results to fetch.
boolincludeConditionalMembersOptionally include conditional members.

Returns

TypeDescription
Task<>LinkLinks to the entity definitions with the specified ids.

DefinitionsToLinksAsync(IEnumerable, 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

TypeNameDescription
IEnumerable<>stringnamesThe names of the entity definitions to include in the result.
longskipNumber of results to skip.
longtakeNumber or results to fetch.
boolincludeConditionalMembersOptionally include conditional members.

Returns

TypeDescription
Task<>LinkLinks to the entity definitions with the specified names.

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

TypeNameDescription
longskipNumber of results to skip.
longtakeNumber or results to fetch.
boolincludeConditionalMembersOptionally include conditional members.

Returns

TypeDescription
Task<>LinkLinks 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

TypeNameDescription
longidThe id of the entity definition to link to.
boolincludeConditionalMembersOptionally include conditional members.

Returns

TypeDescription
Task<>LinkA link to the entity definition with the specified id.

DefinitionToLinkAsync(string, bool?)

Creates a link to the entity definition with the specified name.

Declaration

Task<Link> DefinitionToLinkAsync(string name, bool? includeConditionalMembers = null)

Parameters

TypeNameDescription
stringnameThe name of the entity definition to link to.
boolincludeConditionalMembersOptionally include conditional members.

Returns

TypeDescription
Task<>LinkA link to the entity definition with the specified name.

DefinitionToLinkV2Async(string, bool?)

Creates a link to the entity definition with the specified name.

Declaration

Task<Link> DefinitionToLinkV2Async(string name, bool? includeConditionalMembers = null)

Parameters

TypeNameDescription
stringnameThe name of the entity definition to link to.
boolincludeConditionalMembersOptionally include conditional members.

Returns

TypeDescription
Task<>LinkA link to the entity definition with the specified name.

DownloadOrderToLinkAsync(long)

Generates a link to send a download order.

Declaration

Task<Link> DownloadOrderToLinkAsync(long downloadOrderId)

Parameters

TypeNameDescription
longdownloadOrderIdThe download order id.

Returns

TypeDescription
Task<>LinkA Link.

EntitiesLinkAsync()

Creates a link to the entities endpoint.

Declaration

Task<Link> EntitiesLinkAsync()

Returns

TypeDescription
Task<>LinkA Link.

EntitiesToLinksAsync(IEnumerable)

Creates links to the entities with the specified ids.

Declaration

Task<IList<Link>> EntitiesToLinksAsync(IEnumerable<long> ids)

Parameters

TypeNameDescription
IEnumerable<>longidsThe ids of the entities to link to.

Returns

TypeDescription
Task<>IList<>LinkLink to the entities with the specified ids.

EntityToLinkAsync(long, CultureInfo)

Creates a link to the entity with the specified id.

Declaration

Task<Link> EntityToLinkAsync(long id, CultureInfo culture = null)

Parameters

TypeNameDescription
longidThe id of the entity to link to.
CultureInfocultureOptional culture for the entity.

Returns

TypeDescription
Task<>LinkA link to the entity with the specified id.

EntityToLinkAsync(string)

Creates a link to the entity with the specified identifier.

Declaration

Task<Link> EntityToLinkAsync(string identifier)

Parameters

TypeNameDescription
stringidentifierThe identifier of the entity to link to.

Returns

TypeDescription
Task<>LinkA link to the entity with the specified identifier.

ExecuteScriptToLinkAsync(string)

Gets the link to execute a script with specified identifier.

Declaration

Task<Link> ExecuteScriptToLinkAsync(string identifier)

Parameters

TypeNameDescription
stringidentifierThe identifier of the script.

Returns

TypeDescription
Task<>LinkA Link.

ExplainUserPermissionsForEntityToLinkAsync(long, long)

Returns a user's permissions for an entity.

Declaration

Task<Link> ExplainUserPermissionsForEntityToLinkAsync(long id, long userId)

Parameters

TypeNameDescription
longidThe identifier of the entity.
longuserIdThe identifier of the user.

Returns

TypeDescription
Task<>LinkThe Link.

FetchJobsToLinkAsync()

Gets the link to the fetch jobs.

Declaration

Task<Link> FetchJobsToLinkAsync()

Returns

TypeDescription
Task<>LinkThe fetch job endpoint link.

FinalizeUploadToLinkAsync()

Generates a link to finalize an upload.

Declaration

Task<Link> FinalizeUploadToLinkAsync()

Returns

TypeDescription
Task<>LinkA Link.

Extracts the identifier of an entity from the specified link.

Declaration

Task<string> IdentifierFromEntityAsync(Link link)

Parameters

TypeNameDescription
LinklinkThe link to extract the identifier from.

Returns

TypeDescription
Task<>stringThe identifier as extracted from the link. If the link doesn't contain an identifier, null is returned.

Gets the download order id from the specified link.

Declaration

Task<long?> IdFromDownloadOrderAsync(Link link)

Parameters

TypeNameDescription
LinklinkThe link.

Returns

TypeDescription
Task<>longDownload order id.

Extracts the id of an entity from the specified link.

Declaration

Task<long?> IdFromEntityAsync(Link link)

Parameters

TypeNameDescription
LinklinkThe link to extract the name from.

Returns

TypeDescription
Task<>longThe id as extracted from the link. If the link doesn't contain an id, null is returned.

Extracts the id from a FetchJobs with the specified link.

Declaration

Task<long?> IdFromFetchJobsAsync(Link link)

Parameters

TypeNameDescription
LinklinkThe link to extract the id from.

Returns

TypeDescription
Task<>longThe id as extracted from the link. If the link doesn't contain an id, null is returned.

Extracts the id from a policy with the specified link.

Declaration

Task<long?> IdFromPolicyAsync(Link link)

Parameters

TypeNameDescription
LinklinkThe link to extract the id from.

Returns

TypeDescription
Task<>longThe id as extracted from the link. If the link doesn't contain an id, null is returned.

IdsFromEntitiesAsync(IEnumerable)

Extracts the id of entities from the specified links.

Declaration

Task<IList<long>> IdsFromEntitiesAsync(IEnumerable<Link> links)

Parameters

TypeNameDescription
IEnumerable<>LinklinksThe links to extract the names from.

Returns

TypeDescription
Task<>IList<>longThe ids as extracted from the links.

Extracts the name of a datasource from the specified link.

Declaration

Task<string> NameFromDataSourceAsync(Link link)

Parameters

TypeNameDescription
LinklinkThe link to extract the name from.

Returns

TypeDescription
Task<>stringThe name as extracted from the link. If the link doesn't contain a name, null is returned.

Extracts the name of an entity definition from the specified link.

Declaration

Task<string> NameFromDefinitionAsync(Link link)

Parameters

TypeNameDescription
LinklinkThe link to extract the name from.

Returns

TypeDescription
Task<>stringThe name as extracted from the link. If the link doesn't contain a name, null is returned.

NamesFromDefinitionsAsync(IEnumerable)

Extracts the names of the specified entity definition links.

Declaration

Task<IList<string>> NamesFromDefinitionsAsync(IEnumerable<Link> links)

Parameters

TypeNameDescription
IEnumerable<>LinklinksThe links to extract the names from.

Returns

TypeDescription
Task<>IList<>stringThe 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

TypeDescription
Task<>LinkA Link.

PermissionsForEntityToLinkAsync(long)

Creates a link to the permissions for entity endpoint.

Declaration

Task<Link> PermissionsForEntityToLinkAsync(long id)

Parameters

TypeNameDescription
longidThe entity id.

Returns

TypeDescription
Task<>LinkA Link.

PolicyToLinkAsync(long)

Generates a link to the policy.

Declaration

Task<Link> PolicyToLinkAsync(long id)

Parameters

TypeNameDescription
longidThe policy id.

Returns

TypeDescription
Task<>LinkA Link.

ResetPasswordToLinkAsync(long)

Gets the link to reset the password of the specified user.

Declaration

Task<Link> ResetPasswordToLinkAsync(long userId)

Parameters

TypeNameDescription
longuserIdId of the user.

Returns

TypeDescription
Task<>LinkA Link.

SendConfirmationMailToLinkAsync(long)

Generates a link to send a confirmation mail.

Declaration

Task<Link> SendConfirmationMailToLinkAsync(long userId)

Parameters

TypeNameDescription
longuserIdThe user id.

Returns

TypeDescription
Task<>LinkA Link.

SendNotificationToLinkAsync(string)

Generates a link to send a notification.

Declaration

Task<Link> SendNotificationToLinkAsync(string notificationType)

Parameters

TypeNameDescription
stringnotificationTypeThe notification type.

Returns

TypeDescription
Task<>LinkA Link.

SetUserPasswordToLinkAsync(long)

Gets the link to set the password of the specified user.

Declaration

Task<Link> SetUserPasswordToLinkAsync(long userId)

Parameters

TypeNameDescription
longuserIdId of the user.

Returns

TypeDescription
Task<>LinkA Link.
If you have suggestions for improving this article, let us know!