Interface ILinkHelper

Contains functionality to build and parse links.

Namespace: StylelabsStylelabs.MSdkWebClientContracts
Assembly: Stylelabs.M.Sdk.WebClient.dll
Syntax
RequestResponse
public interface ILinkHelper

Methods

CommandToLinkAsync(string, string)

Generates a link to a command.

Declaration
RequestResponse
Task<Link> CommandToLinkAsync(string @namespace, string command)
Parameters
TypeNameDescription
stringnamespace

The namespace.

stringcommand

The command.

Returns
TypeDescription
Task<>Link

A Link.

CopyEntityToLinkAsync(long)

Creates a link to the copy entity endpoint.

Declaration
RequestResponse
Task<Link> CopyEntityToLinkAsync(long id)
Parameters
TypeNameDescription
longid

The entity id.

Returns
TypeDescription
Task<>Link

A Link.

CreateUploadToLinkAsync()

Generates a link to create an upload.

Declaration
RequestResponse
Task<Link> CreateUploadToLinkAsync()
Returns
TypeDescription
Task<>Link

A Link.

DataSourcesLinkAsync()

Creates a link to the data sources endpoint.

Declaration
RequestResponse
Task<Link> DataSourcesLinkAsync()
Returns
TypeDescription
Task<>Link

A Link.

DataSourceToLinkAsync(string)

Creates a link to the datasource with the specified name.

Declaration
RequestResponse
Task<Link> DataSourceToLinkAsync(string name)
Parameters
TypeNameDescription
stringname

The name of the datasource to link to.

Returns
TypeDescription
Task<>Link

A link to the datasource with the specified name.

DefinitionsToLinksAsync(IEnumerable<long>, long?, long?, bool?)

Creates links to the specified entity definitions by id.

Declaration
RequestResponse
Task<Link> DefinitionsToLinksAsync(IEnumerable<long> ids, long? skip = null, long? take = null, bool? includeConditionalMembers = null)
Parameters
TypeNameDescription
IEnumerable<>longids

The ids of the entity definitions to include in the result.

longskip

Number of results to skip.

longtake

Number or results to fetch.

boolincludeConditionalMembers

Optionally include conditional members.

Returns
TypeDescription
Task<>Link

Links to the entity definitions with the specified ids.

DefinitionsToLinksAsync(IEnumerable<string>, long?, long?, bool?)

Creates links to the specified entity definitions by name.

Declaration
RequestResponse
Task<Link> DefinitionsToLinksAsync(IEnumerable<string> names, long? skip = null, long? take = null, bool? includeConditionalMembers = null)
Parameters
TypeNameDescription
IEnumerable<>stringnames

The names of the entity definitions to include in the result.

longskip

Number of results to skip.

longtake

Number or results to fetch.

boolincludeConditionalMembers

Optionally include conditional members.

Returns
TypeDescription
Task<>Link

Links to the entity definitions with the specified names.

DefinitionsToLinksAsync(long?, long?, bool?)

Creates a link to the entity definitions endpoint.

Declaration
RequestResponse
Task<Link> DefinitionsToLinksAsync(long? skip = null, long? take = null, bool? includeConditionalMembers = null)
Parameters
TypeNameDescription
longskip

Number of results to skip.

longtake

Number or results to fetch.

boolincludeConditionalMembers

Optionally include conditional members.

Returns
TypeDescription
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
RequestResponse
Task<Link> DefinitionToLinkAsync(long id, bool? includeConditionalMembers = null)
Parameters
TypeNameDescription
longid

The id of the entity definition to link to.

boolincludeConditionalMembers

Optionally include conditional members.

Returns
TypeDescription
Task<>Link

A link to the entity definition with the specified id.

DefinitionToLinkAsync(string, bool?)

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

Declaration
RequestResponse
Task<Link> DefinitionToLinkAsync(string name, bool? includeConditionalMembers = null)
Parameters
TypeNameDescription
stringname

The name of the entity definition to link to.

boolincludeConditionalMembers

Optionally include conditional members.

Returns
TypeDescription
Task<>Link

A link to the entity definition with the specified name.

DefinitionToLinkV2Async(string, bool?)

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

Declaration
RequestResponse
Task<Link> DefinitionToLinkV2Async(string name, bool? includeConditionalMembers = null)
Parameters
TypeNameDescription
stringname

The name of the entity definition to link to.

boolincludeConditionalMembers

Optionally include conditional members.

Returns
TypeDescription
Task<>Link

A link to the entity definition with the specified name.

DownloadOrderToLinkAsync(long)

Generates a link to send a download order.

Declaration
RequestResponse
Task<Link> DownloadOrderToLinkAsync(long downloadOrderId)
Parameters
TypeNameDescription
longdownloadOrderId

The download order id.

Returns
TypeDescription
Task<>Link

A Link.

EntitiesLinkAsync()

Creates a link to the entities endpoint.

Declaration
RequestResponse
Task<Link> EntitiesLinkAsync()
Returns
TypeDescription
Task<>Link

A Link.

EntitiesToLinksAsync(IEnumerable<long>)

Creates links to the entities with the specified ids.

Declaration
RequestResponse
Task<IList<Link>> EntitiesToLinksAsync(IEnumerable<long> ids)
Parameters
TypeNameDescription
IEnumerable<>longids

The ids of the entities to link to.

Returns
TypeDescription
Task<>IList<>Link

Link to the entities with the specified ids.

EntityToLinkAsync(long, CultureInfo)

Creates a link to the entity with the specified id.

Declaration
RequestResponse
Task<Link> EntityToLinkAsync(long id, CultureInfo culture = null)
Parameters
TypeNameDescription
longid

The id of the entity to link to.

CultureInfoculture

Optional culture for the entity.

Returns
TypeDescription
Task<>Link

A link to the entity with the specified id.

EntityToLinkAsync(string)

Creates a link to the entity with the specified identifier.

Declaration
RequestResponse
Task<Link> EntityToLinkAsync(string identifier)
Parameters
TypeNameDescription
stringidentifier

The identifier of the entity to link to.

Returns
TypeDescription
Task<>Link

A link to the entity with the specified identifier.

ExecuteScriptToLinkAsync(string)

Gets the link to execute a script with specified identifier.

Declaration
RequestResponse
Task<Link> ExecuteScriptToLinkAsync(string identifier)
Parameters
TypeNameDescription
stringidentifier

The identifier of the script.

Returns
TypeDescription
Task<>Link

A Link.

ExplainUserPermissionsForEntityToLinkAsync(long, long)

Returns a user's permissions for an entity.

Declaration
RequestResponse
Task<Link> ExplainUserPermissionsForEntityToLinkAsync(long id, long userId)
Parameters
TypeNameDescription
longid

The identifier of the entity.

longuserId

The identifier of the user.

Returns
TypeDescription
Task<>Link

The Link.

FetchJobsToLinkAsync()

Gets the link to the fetch jobs.

Declaration
RequestResponse
Task<Link> FetchJobsToLinkAsync()
Returns
TypeDescription
Task<>Link

The fetch job endpoint link.

FinalizeUploadToLinkAsync()

Generates a link to finalize an upload.

Declaration
RequestResponse
Task<Link> FinalizeUploadToLinkAsync()
Returns
TypeDescription
Task<>Link

A Link.

Extracts the identifier of an entity from the specified link.

Declaration
RequestResponse
Task<string> IdentifierFromEntityAsync(Link link)
Parameters
TypeNameDescription
Linklink

The link to extract the identifier from.

Returns
TypeDescription
Task<>string

The 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
RequestResponse
Task<long?> IdFromDownloadOrderAsync(Link link)
Parameters
TypeNameDescription
Linklink

The link.

Returns
TypeDescription
Task<>long

Download order id.

Extracts the id of an entity from the specified link.

Declaration
RequestResponse
Task<long?> IdFromEntityAsync(Link link)
Parameters
TypeNameDescription
Linklink

The link to extract the name from.

Returns
TypeDescription
Task<>long

The 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
RequestResponse
Task<long?> IdFromFetchJobsAsync(Link link)
Parameters
TypeNameDescription
Linklink

The link to extract the id from.

Returns
TypeDescription
Task<>long

The 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
RequestResponse
Task<long?> IdFromPolicyAsync(Link link)
Parameters
TypeNameDescription
Linklink

The link to extract the id from.

Returns
TypeDescription
Task<>long

The id as extracted from the link. If the link doesn't contain an id, null is returned.

Extracts the id of entities from the specified links.

Declaration
RequestResponse
Task<IList<long>> IdsFromEntitiesAsync(IEnumerable<Link> links)
Parameters
TypeNameDescription
IEnumerable<>Linklinks

The links to extract the names from.

Returns
TypeDescription
Task<>IList<>long

The ids as extracted from the links.

Extracts the name of a datasource from the specified link.

Declaration
RequestResponse
Task<string> NameFromDataSourceAsync(Link link)
Parameters
TypeNameDescription
Linklink

The link to extract the name from.

Returns
TypeDescription
Task<>string

The 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
RequestResponse
Task<string> NameFromDefinitionAsync(Link link)
Parameters
TypeNameDescription
Linklink

The link to extract the name from.

Returns
TypeDescription
Task<>string

The name as extracted from the link. If the link doesn't contain a name, null is returned.

Extracts the names of the specified entity definition links.

Declaration
RequestResponse
Task<IList<string>> NamesFromDefinitionsAsync(IEnumerable<Link> links)
Parameters
TypeNameDescription
IEnumerable<>Linklinks

The links to extract the names from.

Returns
TypeDescription
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
RequestResponse
Task<Link> PackageLinkAsync()
Returns
TypeDescription
Task<>Link

A Link.

PermissionsForEntityToLinkAsync(long)

Creates a link to the permissions for entity endpoint.

Declaration
RequestResponse
Task<Link> PermissionsForEntityToLinkAsync(long id)
Parameters
TypeNameDescription
longid

The entity id.

Returns
TypeDescription
Task<>Link

A Link.

PolicyToLinkAsync(long)

Generates a link to the policy.

Declaration
RequestResponse
Task<Link> PolicyToLinkAsync(long id)
Parameters
TypeNameDescription
longid

The policy id.

Returns
TypeDescription
Task<>Link

A Link.

ResetPasswordToLinkAsync(long)

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

Declaration
RequestResponse
Task<Link> ResetPasswordToLinkAsync(long userId)
Parameters
TypeNameDescription
longuserId

Id of the user.

Returns
TypeDescription
Task<>Link

A Link.

SendConfirmationMailToLinkAsync(long)

Generates a link to send a confirmation mail.

Declaration
RequestResponse
Task<Link> SendConfirmationMailToLinkAsync(long userId)
Parameters
TypeNameDescription
longuserId

The user id.

Returns
TypeDescription
Task<>Link

A Link.

SendNotificationToLinkAsync(string)

Generates a link to send a notification.

Declaration
RequestResponse
Task<Link> SendNotificationToLinkAsync(string notificationType)
Parameters
TypeNameDescription
stringnotificationType

The notification type.

Returns
TypeDescription
Task<>Link

A Link.

SetUserPasswordToLinkAsync(long)

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

Declaration
RequestResponse
Task<Link> SetUserPasswordToLinkAsync(long userId)
Parameters
TypeNameDescription
longuserId

Id of the user.

Returns
TypeDescription
Task<>Link

A Link.

Do you have some feedback for us?

If you have suggestions for improving this article,