-
Notifications
You must be signed in to change notification settings - Fork 105
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
Showing
34 changed files
with
1,091 additions
and
230 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 |
---|---|---|
@@ -1,23 +1,35 @@ | ||
|
||
class _CustomFieldSettings: | ||
"""Custom fields are attached to a particular project with the Custom | ||
Field Settings resource. This resource both represents the many-to-many join | ||
of the Custom Field and Project as well as stores information that is relevant to that | ||
particular pairing; for instance, the `is_important` property determines | ||
some possible application-specific handling of that custom field (see below) | ||
"""Custom fields are applied to a particular project or portfolio with the | ||
Custom Field Settings resource. This resource both represents the | ||
many-to-many join of the Custom Field and Project or Portfolio as well as | ||
stores information that is relevant to that particular pairing; for instance, | ||
the `is_important` property determines some possible application-specific | ||
handling of that custom field and parent. | ||
""" | ||
|
||
def __init__(self, client=None): | ||
self.client = client | ||
|
||
def find_by_project(self, project, params={}, **options): | ||
"""Returns a list of all of the custom fields settings on a project, in compact form. Note that, as in all queries to collections which return compact representation, `opt_fields` and `opt_expand` can be used to include more data than is returned in the compact representation. See the getting started guide on [input/output options](/developers/documentation/getting-started/input-output-options) for more information. | ||
"""Returns a list of all of the custom fields settings on a project. | ||
Parameters | ||
---------- | ||
project : {Id} The ID of the project for which to list custom field settings | ||
project : {Gid} The ID of the project for which to list custom field settings | ||
[params] : {Object} Parameters for the request | ||
""" | ||
path = "/projects/%s/custom_field_settings" % (project) | ||
return self.client.get_collection(path, params, **options) | ||
|
||
def find_by_portfolio(self, portfolio, params={}, **options): | ||
"""Returns a list of all of the custom fields settings on a portfolio. | ||
Parameters | ||
---------- | ||
portfolio : {Gid} The ID of the portfolio for which to list custom field settings | ||
[params] : {Object} Parameters for the request | ||
""" | ||
path = "/portfolios/%s/custom_field_settings" % (portfolio) | ||
return self.client.get_collection(path, params, **options) | ||
|
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,22 @@ | ||
|
||
class _Jobs: | ||
"""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. | ||
""" | ||
|
||
def __init__(self, client=None): | ||
self.client = client | ||
|
||
def find_by_id(self, job, params={}, **options): | ||
"""Returns the complete job record for a single job. | ||
Parameters | ||
---------- | ||
job : {Gid} The job to get. | ||
[params] : {Object} Parameters for the request | ||
""" | ||
path = "/jobs/%s" % (job) | ||
return self.client.get(path, params, **options) | ||
|
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
Oops, something went wrong.