lib/client.js
function Client(dispatcher, options) {
  options = options || {};
  /**
   * The internal dispatcher. This is mostly used by the resources but provided
   * for custom requests to the API or API features that have not yet been added
   * to the client.
   * @type {Dispatcher}
   */
  this.dispatcher = dispatcher;
  /**
   * An instance of the Attachments resource.
   * @type {Attachments}
   */
  this.attachments = new resources.Attachments(this.dispatcher);
  /**
   * An instance of the CustomFieldSettings resource.
   * @type {CustomFieldSettings}
   */
  this.customFieldSettings = new resources.CustomFieldSettings(this.dispatcher);
  /**
   * An instance of the CustomFields resource.
   * @type {CustomFields}
   */
  this.customFields = new resources.CustomFields(this.dispatcher);
  /**
   * An instance of the Events resource.
   * @type {Events}
   */
  this.events = new resources.Events(this.dispatcher);
  /**
   * An instance of the OrganizationExports resource.
   * @type {Events}
   */
  this.organizationExports = new resources.OrganizationExports(this.dispatcher);
  /**
   * An instance of the Projects resource.
   * @type {Projects}
   */
  this.projects = new resources.Projects(this.dispatcher);
  /**
   * An instance of the ProjectMemberships resource.
   * @type {ProjectMemberships}
   */
  this.projectMemberships = new resources.ProjectMemberships(this.dispatcher);
  /**
   * An instance of the ProjectStatuses resource.
   * @type {ProjectStatuses}
   */
  this.projectStatuses = new resources.ProjectStatuses(this.dispatcher);
  /**
   * An instance of the Sections resource.
   * @type {Sections}
   */
  this.sections = new resources.Sections(this.dispatcher);
  /**
   * An instance of the Stories resource.
   * @type {Stories}
   */
  this.stories = new resources.Stories(this.dispatcher);
  /**
   * An instance of the Tags resource.
   * @type {Tags}
   */
  this.tags = new resources.Tags(this.dispatcher);
  /**
   * An instance of the Tasks resource.
   * @type {Tasks}
   */
  this.tasks = new resources.Tasks(this.dispatcher);
  /**
   * An instance of the Teams resource.
   * @type {Teams}
   */
  this.teams = new resources.Teams(this.dispatcher);
  /**
   * An instance of the Users resource.
   * @type {Users}
   */
  this.users = new resources.Users(this.dispatcher);
  /**
   * An instance of the Workspaces resource.
   * @type {Workspaces}
   */
  this.workspaces = new resources.Workspaces(this.dispatcher);
  /**
   * An instance of the Webhooks resource.
   * @type {Webhooks}
   */
  this.webhooks = new resources.Webhooks(this.dispatcher);

  // Store off Oauth info.
  this.app = new App(options);
}
function Client(dispatcher, options) {
  options = options || {};
  /**
   * The internal dispatcher. This is mostly used by the resources but provided
   * for custom requests to the API or API features that have not yet been added
   * to the client.
   * @type {Dispatcher}
   */
  this.dispatcher = dispatcher;
  /**
   * An instance of the Attachments resource.
   * @type {Attachments}
   */
  this.attachments = new resources.Attachments(this.dispatcher);
  /**
   * An instance of the CustomFieldSettings resource.
   * @type {CustomFieldSettings}
   */
  this.customFieldSettings = new resources.CustomFieldSettings(this.dispatcher);
  /**
   * An instance of the CustomFields resource.
   * @type {CustomFields}
   */
  this.customFields = new resources.CustomFields(this.dispatcher);
  /**
   * An instance of the Events resource.
   * @type {Events}
   */
  this.events = new resources.Events(this.dispatcher);
  /**
   * An instance of the OrganizationExports resource.
   * @type {Events}
   */
  this.organizationExports = new resources.OrganizationExports(this.dispatcher);
  /**
   * An instance of the Projects resource.
   * @type {Projects}
   */
  this.projects = new resources.Projects(this.dispatcher);
  /**
   * An instance of the ProjectMemberships resource.
   * @type {ProjectMemberships}
   */
  this.projectMemberships = new resources.ProjectMemberships(this.dispatcher);
  /**
   * An instance of the ProjectStatuses resource.
   * @type {ProjectStatuses}
   */
  this.projectStatuses = new resources.ProjectStatuses(this.dispatcher);
  /**
   * An instance of the Sections resource.
   * @type {Sections}
   */
  this.sections = new resources.Sections(this.dispatcher);
  /**
   * An instance of the Stories resource.
   * @type {Stories}
   */
  this.stories = new resources.Stories(this.dispatcher);
  /**
   * An instance of the Tags resource.
   * @type {Tags}
   */
  this.tags = new resources.Tags(this.dispatcher);
  /**
   * An instance of the Tasks resource.
   * @type {Tasks}
   */
  this.tasks = new resources.Tasks(this.dispatcher);
  /**
   * An instance of the Teams resource.
   * @type {Teams}
   */
  this.teams = new resources.Teams(this.dispatcher);
  /**
   * An instance of the Users resource.
   * @type {Users}
   */
  this.users = new resources.Users(this.dispatcher);
  /**
   * An instance of the Workspaces resource.
   * @type {Workspaces}
   */
  this.workspaces = new resources.Workspaces(this.dispatcher);
  /**
   * An instance of the Webhooks resource.
   * @type {Webhooks}
   */
  this.webhooks = new resources.Webhooks(this.dispatcher);

  // Store off Oauth info.
  this.app = new App(options);
}
function Client ( dispatcher , options ) { options = options || { } ; /**
   * The internal dispatcher. This is mostly used by the resources but provided
   * for custom requests to the API or API features that have not yet been added
   * to the client.
   * @type {Dispatcher}
   */ this . dispatcher = dispatcher ; /**
   * An instance of the Attachments resource.
   * @type {Attachments}
   */ this . attachments = new resources . Attachments ( this . dispatcher ) ; /**
   * An instance of the CustomFieldSettings resource.
   * @type {CustomFieldSettings}
   */ this . customFieldSettings = new resources . CustomFieldSettings ( this . dispatcher ) ; /**
   * An instance of the CustomFields resource.
   * @type {CustomFields}
   */ this . customFields = new resources . CustomFields ( this . dispatcher ) ; /**
   * An instance of the Events resource.
   * @type {Events}
   */ this . events = new resources . Events ( this . dispatcher ) ; /**
   * An instance of the OrganizationExports resource.
   * @type {Events}
   */ this . organizationExports = new resources . OrganizationExports ( this . dispatcher ) ; /**
   * An instance of the Projects resource.
   * @type {Projects}
   */ this . projects = new resources . Projects ( this . dispatcher ) ; /**
   * An instance of the ProjectMemberships resource.
   * @type {ProjectMemberships}
   */ this . projectMemberships = new resources . ProjectMemberships ( this . dispatcher ) ; /**
   * An instance of the ProjectStatuses resource.
   * @type {ProjectStatuses}
   */ this . projectStatuses = new resources . ProjectStatuses ( this . dispatcher ) ; /**
   * An instance of the Sections resource.
   * @type {Sections}
   */ this . sections = new resources . Sections ( this . dispatcher ) ; /**
   * An instance of the Stories resource.
   * @type {Stories}
   */ this . stories = new resources . Stories ( this . dispatcher ) ; /**
   * An instance of the Tags resource.
   * @type {Tags}
   */ this . tags = new resources . Tags ( this . dispatcher ) ; /**
   * An instance of the Tasks resource.
   * @type {Tasks}
   */ this . tasks = new resources . Tasks ( this . dispatcher ) ; /**
   * An instance of the Teams resource.
   * @type {Teams}
   */ this . teams = new resources . Teams ( this . dispatcher ) ; /**
   * An instance of the Users resource.
   * @type {Users}
   */ this . users = new resources . Users ( this . dispatcher ) ; /**
   * An instance of the Workspaces resource.
   * @type {Workspaces}
   */ this . workspaces = new resources . Workspaces ( this . dispatcher ) ; /**
   * An instance of the Webhooks resource.
   * @type {Webhooks}
   */ this . webhooks = new resources . Webhooks ( this . dispatcher ) ; // Store off Oauth info. this . app = new App ( options ) ; }
Constructs a Client with instances of all the resources using the dispatcher.
It also keeps a reference to the dispatcher so that way the end user can have
access to it.
@class
@classdesc A wrapper for the Asana API which is authenticated for one user
@param {Dispatcher} dispatcher The request dispatcher to use
@param {Object} options        Options to configure the client
@param {String} [clientId]     ID of the client, required for Oauth
@param {String} [clientSecret] Secret key, for some Oauth flows
@param {String} [redirectUri]  Default redirect URI for this client
@param {String} [asanaBaseUrl] Base URL for Asana, for debugging
Constructs a Client with instances of all the resources using the dispatcher . It also keeps a reference to the dispatcher so that way the end user can have access to it .