Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1486c97
commit 78c665d
Showing
24 changed files
with
888 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
/** | ||
* This file is auto-generated by the `asana-api-meta` NodeJS package. | ||
* We try to keep the generated code pretty clean but there will be lint | ||
* errors that are just not worth fixing (like unused requires). | ||
* TODO: maybe we can just disable those specifically and keep this code | ||
* pretty lint-free too! | ||
*/ | ||
/* jshint ignore:start */ | ||
var Resource = require('../resource'); | ||
var util = require('util'); | ||
var _ = require('lodash'); | ||
|
||
/** | ||
* A _job_ represents a process that handles asynchronous work. | ||
* | ||
* Jobs are created when an endpoint requests an action that will be handled asynchronously. | ||
* Such as project or task duplication. | ||
* @class | ||
* @param {Dispatcher} dispatcher The API dispatcher | ||
*/ | ||
function Jobs(dispatcher) { | ||
Resource.call(this, dispatcher); | ||
} | ||
util.inherits(Jobs, Resource); | ||
|
||
|
||
/** | ||
* Returns the complete job record for a single job. | ||
* @param {Gid} job The job to get. | ||
* @param {Object} [params] Parameters for the request | ||
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request | ||
* @return {Promise} The requested resource | ||
*/ | ||
Jobs.prototype.findById = function( | ||
job, | ||
params, | ||
dispatchOptions | ||
) { | ||
var path = util.format('/jobs/%s', job); | ||
|
||
return this.dispatchGet(path, params, dispatchOptions); | ||
}; | ||
|
||
|
||
module.exports = Jobs; | ||
/* jshint ignore:end */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
|
||
/** | ||
* This file is auto-generated by the `asana-api-meta` NodeJS package. | ||
* We try to keep the generated code pretty clean but there will be lint | ||
* errors that are just not worth fixing (like unused requires). | ||
* TODO: maybe we can just disable those specifically and keep this code | ||
* pretty lint-free too! | ||
*/ | ||
/* jshint ignore:start */ | ||
var Resource = require('../resource'); | ||
var util = require('util'); | ||
var _ = require('lodash'); | ||
|
||
/** | ||
* This object determines if a user is a member of a portfolio. | ||
* @class | ||
* @param {Dispatcher} dispatcher The API dispatcher | ||
*/ | ||
function PortfolioMemberships(dispatcher) { | ||
Resource.call(this, dispatcher); | ||
} | ||
util.inherits(PortfolioMemberships, Resource); | ||
|
||
|
||
/** | ||
* Returns the compact portfolio membership records for the portfolio. You must | ||
* specify `portfolio`, `portfolio` and `user`, or `workspace` and `user`. | ||
* @param {Object} [params] Parameters for the request | ||
* @param {Gid} [params.portfolio] The portfolio for which to fetch memberships. | ||
* @param {Gid} [params.workspace] The workspace for which to fetch memberships. | ||
* @param {String} [params.user] The user to filter the memberships to. | ||
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request | ||
* @return {Promise} The response from the API | ||
*/ | ||
PortfolioMemberships.prototype.findAll = function( | ||
params, | ||
dispatchOptions | ||
) { | ||
var path = util.format('/portfolio_memberships'); | ||
|
||
return this.dispatchGetCollection(path, params, dispatchOptions); | ||
}; | ||
|
||
/** | ||
* Returns the compact portfolio membership records for the portfolio. | ||
* @param {Gid} portfolio The portfolio for which to fetch memberships. | ||
* @param {Object} [params] Parameters for the request | ||
* @param {String} [params.user] If present, the user to filter the memberships to. | ||
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request | ||
* @return {Promise} The response from the API | ||
*/ | ||
PortfolioMemberships.prototype.findByPortfolio = function( | ||
portfolio, | ||
params, | ||
dispatchOptions | ||
) { | ||
var path = util.format('/portfolios/%s/portfolio_memberships', portfolio); | ||
|
||
return this.dispatchGetCollection(path, params, dispatchOptions); | ||
}; | ||
|
||
/** | ||
* Returns the portfolio membership record. | ||
* @param {Gid} portfolio_membership Globally unique identifier for the portfolio membership. | ||
* @param {Object} [params] Parameters for the request | ||
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request | ||
* @return {Promise} The requested resource | ||
*/ | ||
PortfolioMemberships.prototype.findById = function( | ||
portfolioMembership, | ||
params, | ||
dispatchOptions | ||
) { | ||
var path = util.format('/portfolio_memberships/%s', portfolioMembership); | ||
|
||
return this.dispatchGet(path, params, dispatchOptions); | ||
}; | ||
|
||
|
||
module.exports = PortfolioMemberships; | ||
/* jshint ignore:end */ |
Oops, something went wrong.