Class: MemberInfo

MemberInfo(idopt, nameopt, mentionNameopt)

Represents information about a Shortcut member/user. Handles member data management including caching and retrieval.

Constructor

new MemberInfo(idopt, nameopt, mentionNameopt)

Creates a new MemberInfo instance.

Parameters:
Name Type Attributes Default Description
id string <optional>
""

The unique identifier for the member

name string <optional>
""

The full name of the member

mentionName string <optional>
""

The mention name/username of the member

Source:

Extends

Classes

MemberInfo
MemberInfo

Members

client

The Shortcut API client instance used for making API requests

Overrides:
Source:

context

The VS Code extension context

Overrides:
Source:

id

Unique identifier for the member

Source:

id :string

Unique identifier for the member

Type:
  • string
Source:

mention_name

Username/mention handle of the member

Source:

mention_name :string

Username/mention handle of the member

Type:
  • string
Source:

name

Full name of the member

Source:

name :string

Full name of the member

Type:
  • string
Source:

Methods

(static) cacheKey(workspaceName) → {string}

Generates a cache key for storing member information.

Parameters:
Name Type Description
workspaceName string

Name of the workspace

Source:
Returns:

The generated cache key

Type
string

(static) cacheKey(workspaceName) → {string}

Generates a cache key for storing member information.

Parameters:
Name Type Description
workspaceName string

Name of the workspace

Source:
Returns:

The generated cache key

Type
string

(static) deleteCache(workspaceName)

Deletes cached member information for a workspace.

Parameters:
Name Type Description
workspaceName string

Name of the workspace

Source:

(static) deleteCache(workspaceName)

Deletes cached member information for a workspace.

Parameters:
Name Type Description
workspaceName string

Name of the workspace

Source:

(async, static) fetch(workspace) → {Promise.<MemberInfo>}

Fetches current member information from the Shortcut API.

Parameters:
Name Type Description
workspace Workspace

The current workspace

Source:
Returns:

A promise that resolves to a MemberInfo instance

Type
Promise.<MemberInfo>

(async, static) fetch(workspace) → {Promise.<MemberInfo>}

Fetches current member information from the Shortcut API.

Parameters:
Name Type Description
workspace Workspace

The current workspace

Source:
Returns:

A promise that resolves to a MemberInfo instance

Type
Promise.<MemberInfo>

(static) fetchFromCache(workspaceName) → {MemberInfo|null}

Retrieves cached member information for a workspace.

Parameters:
Name Type Description
workspaceName string

Name of the workspace

Source:
Returns:

The cached MemberInfo instance or null if not found

Type
MemberInfo | null

(static) fetchFromCache(workspaceName) → {MemberInfo|null}

Retrieves cached member information for a workspace.

Parameters:
Name Type Description
workspaceName string

Name of the workspace

Source:
Returns:

The cached MemberInfo instance or null if not found

Type
MemberInfo | null

(static) fromJson(json) → {MemberInfo}

Creates a MemberInfo instance from JSON data.

Parameters:
Name Type Description
json any

The JSON data containing member information

Source:
Returns:

A new MemberInfo instance

Type
MemberInfo

(static) fromJson(json) → {MemberInfo}

Creates a MemberInfo instance from JSON data.

Parameters:
Name Type Description
json any

The JSON data containing member information

Source:
Returns:

A new MemberInfo instance

Type
MemberInfo

(async, static) get(workspace) → {Promise.<MemberInfo>}

Gets member information, first trying cache then falling back to API.

Parameters:
Name Type Description
workspace Workspace

The current workspace

Source:
Returns:

A promise that resolves to a MemberInfo instance

Type
Promise.<MemberInfo>

(async, static) get(workspace) → {Promise.<MemberInfo>}

Gets member information, first trying cache then falling back to API.

Parameters:
Name Type Description
workspace Workspace

The current workspace

Source:
Returns:

A promise that resolves to a MemberInfo instance

Type
Promise.<MemberInfo>

(async, static) saveToCache(workspaceName, memberInfo)

Saves member information to the cache.

Parameters:
Name Type Description
workspaceName string

Name of the workspace

memberInfo MemberInfo

The member information to cache

Source:

(async, static) saveToCache(workspaceName, memberInfo)

Saves member information to the cache.

Parameters:
Name Type Description
workspaceName string

Name of the workspace

memberInfo MemberInfo

The member information to cache

Source:

toObject() → {object}

Converts the MemberInfo instance to a plain JavaScript object.

Source:
Returns:

A plain object representation of the member info

Type
object

toObject() → {object}

Converts the MemberInfo instance to a plain JavaScript object.

Source:
Returns:

A plain object representation of the member info

Type
object