Class: User

Defined in: src/user.coffee

Overview

A representation of the user we are logged in as.

Instance Method Summary

Constructor Details

- (void) constructor(service, )

Save references to the service, as well as extracting the user's preferences from the options.

Parameters:

  • service (intermine.Service) the connection to the webservice
  • options (Object) The data used to instantiate this object

Options Hash: (options):

  • username (String) The user's log-in name
  • preferences (Object) A key-value mapping of the preferences this user has set.

Instance Method Details

- (Deferred) setPreference(key, value, cb) (bound)

Set a given preference.

Parameters:

  • key (String) The key to set.
  • value (String) The value to set.

Returns:

  • (Deferred) — a promise to set a preference.

- (void) setPreferences(prefs, cb) (bound)

Set one or more preferences, provided as an object.

- (void) clearPreference(key, cb) (bound)

Clear a preference.

- (void) clearPreferences(cb) (bound)

Clear all preferences.

- (void) refresh(cb) (bound)

- (void) createToken(type = 'day', message, cb)

- (void) fetchCurrentTokens(cb)

- (void) revokeAllTokens(cb)

- (void) revokeToken(token, cb)