Class: Mypreferences

Mypreferences

new Mypreferences()

Mypreferences Provide preferences of the currently logged in user.

Properties:
Name Type Description
connector IConnector

the jira connector instance

Source:

Methods

getPreference(options, callbackopt) → {Promise.<any>}

Returns preference of the currently logged in user. Preference key must be provided as input parameter (key). The value is returned exactly as it is. If key parameter is not provided or wrong - status code 404. If value is found - status code 200.- key of the preference to be returned.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
key string

key - key of the preference to be returned.

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

removePreference(options, callbackopt) → {Promise.<any>}

Removes preference of the currently logged in user. Preference key must be provided as input parameters (key). If key parameter is not provided or wrong - status code 404. If preference is unset - status code 204.- key of the preference to be removed.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
key string

key - key of the preference to be removed.

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

setPreference(options, callbackopt) → {Promise.<any>}

Sets preference of the currently logged in user. Preference key must be provided as input parameters (key). Value must be provided as post body. If key or value parameter is not provided - status code 404. If preference is set

  • status code 204.- key of the preference to be set.
Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
key string

key - key of the preference to be set.

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>