# Class: MyPreferencesClient

## MyPreferencesClient

## Constructor

#### new MyPreferencesClient(jiraClient)

Used to access Jira REST endpoints in '/rest/api/2/mypreferences'

##### Parameters:

Name | Type | Description
--- | --- | ---
`jiraClient` | JiraClient |

Source:
  - api/myPreferences.js, line 5

### Methods

#### deletePreference(opts, callback)

Removes preference of the currently logged in user. Preference key must be provided as input parameters (key).

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` |  | The request options send to the Jira API. ###### Properties
Name | Type | Description
--- | --- | ---
`key` |  | Key of the preference to be deleted.
`callback` |  | Called when the preference has been deleted.

Source:
  - api/myPreferences.js, line 63

#### editPreference(opts, callback)

Sets preference of the currently logged in user. Preference key must be provided as input parameters (key).

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` |  | The request options send to the Jira API. ###### Properties
Name | Type | Description
--- | --- | ---
`key` |  | Key of the preference to be edited.
`value` |  | The new value to set for the preference.
`callback` |  | Called when the preference has been edited.

Source:
  - api/myPreferences.js, line 38

#### getPreference(opts, callback)

Gets preference of the currently logged in user. Preference key must be provided as input parameter (key). The value is returned exactly as it is.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` |  | The request options send to the Jira API. ###### Properties
Name | Type | Description
--- | --- | ---
`key` |  | Key of the preference to be returned.
`callback` |  | Called when the preference has been retrieved.

Source:
  - api/myPreferences.js, line 14