asana 0.9.3 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.swagger-codegen-ignore +4 -0
  3. data/README.md +2 -2
  4. data/lib/asana/http_client.rb +8 -2
  5. data/lib/asana/resource_includes/collection.rb +5 -0
  6. data/lib/asana/resource_includes/resource.rb +0 -4
  7. data/lib/asana/resources/attachment.rb +2 -5
  8. data/lib/asana/resources/batch_api.rb +15 -0
  9. data/lib/asana/resources/custom_field_settings.rb +2 -5
  10. data/lib/asana/resources/custom_fields.rb +2 -5
  11. data/lib/asana/resources/events.rb +28 -0
  12. data/lib/asana/resources/gen/attachments_base.rb +56 -0
  13. data/lib/asana/resources/gen/batch_api_base.rb +30 -0
  14. data/lib/asana/resources/gen/custom_field_settings_base.rb +46 -0
  15. data/lib/asana/resources/gen/custom_fields_base.rb +124 -0
  16. data/lib/asana/resources/gen/events_base.rb +32 -0
  17. data/lib/asana/resources/gen/jobs_base.rb +30 -0
  18. data/lib/asana/resources/gen/organization_exports_base.rb +44 -0
  19. data/lib/asana/resources/gen/portfolio_memberships_base.rb +63 -0
  20. data/lib/asana/resources/gen/portfolios_base.rb +173 -0
  21. data/lib/asana/resources/gen/project_memberships_base.rb +46 -0
  22. data/lib/asana/resources/gen/project_statuses_base.rb +69 -0
  23. data/lib/asana/resources/gen/projects_base.rb +259 -0
  24. data/lib/asana/resources/gen/sections_base.rb +108 -0
  25. data/lib/asana/resources/gen/stories_base.rb +84 -0
  26. data/lib/asana/resources/gen/tags_base.rb +116 -0
  27. data/lib/asana/resources/gen/tasks_base.rb +424 -0
  28. data/lib/asana/resources/gen/team_memberships_base.rb +77 -0
  29. data/lib/asana/resources/gen/teams_base.rb +88 -0
  30. data/lib/asana/resources/gen/typeahead_base.rb +35 -0
  31. data/lib/asana/resources/gen/user_task_lists_base.rb +44 -0
  32. data/lib/asana/resources/gen/users_base.rb +88 -0
  33. data/lib/asana/resources/gen/webhooks_base.rb +70 -0
  34. data/lib/asana/resources/gen/workspace_memberships_base.rb +60 -0
  35. data/lib/asana/resources/gen/workspaces_base.rb +82 -0
  36. data/lib/asana/resources/job.rb +2 -3
  37. data/lib/asana/resources/organization_export.rb +2 -5
  38. data/lib/asana/resources/portfolio.rb +2 -5
  39. data/lib/asana/resources/portfolio_membership.rb +2 -5
  40. data/lib/asana/resources/project.rb +2 -5
  41. data/lib/asana/resources/project_membership.rb +2 -5
  42. data/lib/asana/resources/project_status.rb +2 -5
  43. data/lib/asana/resources/section.rb +18 -22
  44. data/lib/asana/resources/story.rb +2 -5
  45. data/lib/asana/resources/tag.rb +2 -5
  46. data/lib/asana/resources/task.rb +2 -5
  47. data/lib/asana/resources/team.rb +2 -5
  48. data/lib/asana/resources/team_membership.rb +26 -0
  49. data/lib/asana/resources/typeahead.rb +22 -0
  50. data/lib/asana/resources/user.rb +2 -5
  51. data/lib/asana/resources/user_task_list.rb +2 -5
  52. data/lib/asana/resources/webhook.rb +2 -5
  53. data/lib/asana/resources/workspace.rb +2 -6
  54. data/lib/asana/resources/workspace_membership.rb +32 -0
  55. data/lib/asana/version.rb +1 -1
  56. data/swagger_templates/api.mustache +41 -0
  57. data/swagger_templates/ruby-config.json +7 -0
  58. metadata +34 -2
@@ -0,0 +1,30 @@
1
+ ### WARNING: This file is auto-generated by our OpenAPI spec. Do not
2
+ ### edit it manually.
3
+
4
+ require_relative '../../resource_includes/response_helper'
5
+
6
+ module Asana
7
+ module Resources
8
+ class JobsBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Get a job by id
16
+ #
17
+ # job_gid - [str] (required) Globally unique identifier for the job.
18
+ # options - [Hash] the request I/O options
19
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
20
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
21
+ def get_job(client, job_gid: required("job_gid"), options: {})
22
+ path = "/jobs/{job_gid}"
23
+ path["{job_gid}"] = job_gid
24
+ Job.new(parse(client.get(path, options: options)).first, client: client)
25
+ end
26
+
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,44 @@
1
+ ### WARNING: This file is auto-generated by our OpenAPI spec. Do not
2
+ ### edit it manually.
3
+
4
+ require_relative '../../resource_includes/response_helper'
5
+
6
+ module Asana
7
+ module Resources
8
+ class OrganizationExportsBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Create an organization export request
16
+ #
17
+
18
+ # options - [Hash] the request I/O options
19
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
20
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
21
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
22
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
23
+ # data - [Hash] the attributes to POST
24
+ def create_organization_export(client, options: {}, **data)
25
+ path = "/organization_exports"
26
+ OrganizationExport.new(parse(client.post(path, body: data, options: options)).first, client: client)
27
+ end
28
+
29
+ # Get details on an org export request
30
+ #
31
+ # organization_export_gid - [str] (required) Globally unique identifier for the organization export.
32
+ # options - [Hash] the request I/O options
33
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
34
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
35
+ def get_organization_export(client, organization_export_gid: required("organization_export_gid"), options: {})
36
+ path = "/organization_exports/{organization_export_gid}"
37
+ path["{organization_export_gid}"] = organization_export_gid
38
+ OrganizationExport.new(parse(client.get(path, options: options)).first, client: client)
39
+ end
40
+
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,63 @@
1
+ ### WARNING: This file is auto-generated by our OpenAPI spec. Do not
2
+ ### edit it manually.
3
+
4
+ require_relative '../../resource_includes/response_helper'
5
+
6
+ module Asana
7
+ module Resources
8
+ class PortfolioMembershipsBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Get a portfolio membership
16
+ #
17
+ # portfolio_membership_gid - [str] (required)
18
+ # options - [Hash] the request I/O options
19
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
20
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
21
+ def get_portfolio_membership(client, portfolio_membership_gid: required("portfolio_membership_gid"), options: {})
22
+ path = "/portfolio_memberships/{portfolio_membership_gid}"
23
+ path["{portfolio_membership_gid}"] = portfolio_membership_gid
24
+ PortfolioMembership.new(parse(client.get(path, options: options)).first, client: client)
25
+ end
26
+
27
+ # Get multiple portfolio memberships
28
+ #
29
+
30
+ # portfolio - [str] The portfolio to filter results on.
31
+ # workspace - [str] The workspace to filter results on.
32
+ # user - [str] A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
33
+ # options - [Hash] the request I/O options
34
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
35
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
36
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
37
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
38
+ def get_portfolio_memberships(client, portfolio: nil, workspace: nil, user: nil, options: {})
39
+ path = "/portfolio_memberships"
40
+ params = { portfolio: portfolio, workspace: workspace, user: user }.reject { |_,v| v.nil? || Array(v).empty? }
41
+ Collection.new(parse(client.get(path, params: params, options: options)), type: PortfolioMembership, client: client)
42
+ end
43
+
44
+ # Get memberships from a portfolio
45
+ #
46
+ # portfolio_gid - [str] (required) Globally unique identifier for the portfolio.
47
+ # user - [str] A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
48
+ # options - [Hash] the request I/O options
49
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
50
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
51
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
52
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
53
+ def get_portfolio_memberships_for_portfolio(client, portfolio_gid: required("portfolio_gid"), user: nil, options: {})
54
+ path = "/portfolios/{portfolio_gid}/portfolio_memberships"
55
+ path["{portfolio_gid}"] = portfolio_gid
56
+ params = { user: user }.reject { |_,v| v.nil? || Array(v).empty? }
57
+ Collection.new(parse(client.get(path, params: params, options: options)), type: PortfolioMembership, client: client)
58
+ end
59
+
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,173 @@
1
+ ### WARNING: This file is auto-generated by our OpenAPI spec. Do not
2
+ ### edit it manually.
3
+
4
+ require_relative '../../resource_includes/response_helper'
5
+
6
+ module Asana
7
+ module Resources
8
+ class PortfoliosBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Add a custom field to a portfolio
16
+ #
17
+ # portfolio_gid - [str] (required) Globally unique identifier for the portfolio.
18
+ # options - [Hash] the request I/O options
19
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
20
+ # data - [Hash] the attributes to POST
21
+ def add_custom_field_setting_for_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {}, **data)
22
+ path = "/portfolios/{portfolio_gid}/addCustomFieldSetting"
23
+ path["{portfolio_gid}"] = portfolio_gid
24
+ parse(client.post(path, body: data, options: options)).first
25
+ end
26
+
27
+ # Add a portfolio item
28
+ #
29
+ # portfolio_gid - [str] (required) Globally unique identifier for the portfolio.
30
+ # options - [Hash] the request I/O options
31
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
32
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
33
+ # data - [Hash] the attributes to POST
34
+ def add_item_for_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {}, **data)
35
+ path = "/portfolios/{portfolio_gid}/addItem"
36
+ path["{portfolio_gid}"] = portfolio_gid
37
+ parse(client.post(path, body: data, options: options)).first
38
+ end
39
+
40
+ # Add users to a portfolio
41
+ #
42
+ # portfolio_gid - [str] (required) Globally unique identifier for the portfolio.
43
+ # options - [Hash] the request I/O options
44
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
45
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
46
+ # data - [Hash] the attributes to POST
47
+ def add_members_for_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {}, **data)
48
+ path = "/portfolios/{portfolio_gid}/addMembers"
49
+ path["{portfolio_gid}"] = portfolio_gid
50
+ parse(client.post(path, body: data, options: options)).first
51
+ end
52
+
53
+ # Create a portfolio
54
+ #
55
+
56
+ # options - [Hash] the request I/O options
57
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
58
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
59
+ # data - [Hash] the attributes to POST
60
+ def create_portfolio(client, options: {}, **data)
61
+ path = "/portfolios"
62
+ Portfolio.new(parse(client.post(path, body: data, options: options)).first, client: client)
63
+ end
64
+
65
+ # Delete a portfolio
66
+ #
67
+ # portfolio_gid - [str] (required) Globally unique identifier for the portfolio.
68
+ # options - [Hash] the request I/O options
69
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
70
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
71
+ def delete_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {})
72
+ path = "/portfolios/{portfolio_gid}"
73
+ path["{portfolio_gid}"] = portfolio_gid
74
+ parse(client.delete(path, options: options)).first
75
+ end
76
+
77
+ # Get portfolio items
78
+ #
79
+ # portfolio_gid - [str] (required) Globally unique identifier for the portfolio.
80
+ # options - [Hash] the request I/O options
81
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
82
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
83
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
84
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
85
+ def get_items_for_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {})
86
+ path = "/portfolios/{portfolio_gid}/items"
87
+ path["{portfolio_gid}"] = portfolio_gid
88
+ Collection.new(parse(client.get(path, options: options)), type: Project, client: client)
89
+ end
90
+
91
+ # Get a portfolio
92
+ #
93
+ # portfolio_gid - [str] (required) Globally unique identifier for the portfolio.
94
+ # options - [Hash] the request I/O options
95
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
96
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
97
+ def get_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {})
98
+ path = "/portfolios/{portfolio_gid}"
99
+ path["{portfolio_gid}"] = portfolio_gid
100
+ Portfolio.new(parse(client.get(path, options: options)).first, client: client)
101
+ end
102
+
103
+ # Get multiple portfolios
104
+ #
105
+
106
+ # workspace - [str] (required) The workspace or organization to filter portfolios on.
107
+ # owner - [str] (required) The user who owns the portfolio. Currently, API users can only get a list of portfolios that they themselves own.
108
+ # options - [Hash] the request I/O options
109
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
110
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
111
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
112
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
113
+ def get_portfolios(client, workspace: nil, owner: nil, options: {})
114
+ path = "/portfolios"
115
+ params = { workspace: workspace, owner: owner }.reject { |_,v| v.nil? || Array(v).empty? }
116
+ Collection.new(parse(client.get(path, params: params, options: options)), type: Portfolio, client: client)
117
+ end
118
+
119
+ # Remove a custom field from a portfolio
120
+ #
121
+ # portfolio_gid - [str] (required) Globally unique identifier for the portfolio.
122
+ # options - [Hash] the request I/O options
123
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
124
+ # data - [Hash] the attributes to POST
125
+ def remove_custom_field_setting_for_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {}, **data)
126
+ path = "/portfolios/{portfolio_gid}/removeCustomFieldSetting"
127
+ path["{portfolio_gid}"] = portfolio_gid
128
+ parse(client.post(path, body: data, options: options)).first
129
+ end
130
+
131
+ # Remove a portfolio item
132
+ #
133
+ # portfolio_gid - [str] (required) Globally unique identifier for the portfolio.
134
+ # options - [Hash] the request I/O options
135
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
136
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
137
+ # data - [Hash] the attributes to POST
138
+ def remove_item_for_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {}, **data)
139
+ path = "/portfolios/{portfolio_gid}/removeItem"
140
+ path["{portfolio_gid}"] = portfolio_gid
141
+ parse(client.post(path, body: data, options: options)).first
142
+ end
143
+
144
+ # Remove users from a portfolio
145
+ #
146
+ # portfolio_gid - [str] (required) Globally unique identifier for the portfolio.
147
+ # options - [Hash] the request I/O options
148
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
149
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
150
+ # data - [Hash] the attributes to POST
151
+ def remove_members_for_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {}, **data)
152
+ path = "/portfolios/{portfolio_gid}/removeMembers"
153
+ path["{portfolio_gid}"] = portfolio_gid
154
+ parse(client.post(path, body: data, options: options)).first
155
+ end
156
+
157
+ # Update a portfolio
158
+ #
159
+ # portfolio_gid - [str] (required) Globally unique identifier for the portfolio.
160
+ # options - [Hash] the request I/O options
161
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
162
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
163
+ # data - [Hash] the attributes to PUT
164
+ def update_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {}, **data)
165
+ path = "/portfolios/{portfolio_gid}"
166
+ path["{portfolio_gid}"] = portfolio_gid
167
+ Portfolio.new(parse(client.put(path, body: data, options: options)).first, client: client)
168
+ end
169
+
170
+ end
171
+ end
172
+ end
173
+ end
@@ -0,0 +1,46 @@
1
+ ### WARNING: This file is auto-generated by our OpenAPI spec. Do not
2
+ ### edit it manually.
3
+
4
+ require_relative '../../resource_includes/response_helper'
5
+
6
+ module Asana
7
+ module Resources
8
+ class ProjectMembershipsBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Get a project membership
16
+ #
17
+ # project_membership_gid - [str] (required)
18
+ # options - [Hash] the request I/O options
19
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
20
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
21
+ def get_project_membership(client, project_membership_gid: required("project_membership_gid"), options: {})
22
+ path = "/project_memberships/{project_membership_gid}"
23
+ path["{project_membership_gid}"] = project_membership_gid
24
+ ProjectMembership.new(parse(client.get(path, options: options)).first, client: client)
25
+ end
26
+
27
+ # Get memberships from a project
28
+ #
29
+ # project_gid - [str] (required) Globally unique identifier for the project.
30
+ # user - [str] A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
31
+ # options - [Hash] the request I/O options
32
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
33
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
34
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
35
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
36
+ def get_project_memberships_for_project(client, project_gid: required("project_gid"), user: nil, options: {})
37
+ path = "/projects/{project_gid}/project_memberships"
38
+ path["{project_gid}"] = project_gid
39
+ params = { user: user }.reject { |_,v| v.nil? || Array(v).empty? }
40
+ Collection.new(parse(client.get(path, params: params, options: options)), type: ProjectMembership, client: client)
41
+ end
42
+
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,69 @@
1
+ ### WARNING: This file is auto-generated by our OpenAPI spec. Do not
2
+ ### edit it manually.
3
+
4
+ require_relative '../../resource_includes/response_helper'
5
+
6
+ module Asana
7
+ module Resources
8
+ class ProjectStatusesBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Create a project status
16
+ #
17
+ # project_gid - [str] (required) Globally unique identifier for the project.
18
+ # options - [Hash] the request I/O options
19
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
20
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
21
+ # data - [Hash] the attributes to POST
22
+ def create_project_status_for_project(client, project_gid: required("project_gid"), options: {}, **data)
23
+ path = "/projects/{project_gid}/project_statuses"
24
+ path["{project_gid}"] = project_gid
25
+ ProjectStatus.new(parse(client.post(path, body: data, options: options)).first, client: client)
26
+ end
27
+
28
+ # Delete a project status
29
+ #
30
+ # project_status_gid - [str] (required) The project status update to get.
31
+ # options - [Hash] the request I/O options
32
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
33
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
34
+ def delete_project_status(client, project_status_gid: required("project_status_gid"), options: {})
35
+ path = "/project_statuses/{project_status_gid}"
36
+ path["{project_status_gid}"] = project_status_gid
37
+ parse(client.delete(path, options: options)).first
38
+ end
39
+
40
+ # Get a project status
41
+ #
42
+ # project_status_gid - [str] (required) The project status update to get.
43
+ # options - [Hash] the request I/O options
44
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
45
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
46
+ def get_project_status(client, project_status_gid: required("project_status_gid"), options: {})
47
+ path = "/project_statuses/{project_status_gid}"
48
+ path["{project_status_gid}"] = project_status_gid
49
+ ProjectStatus.new(parse(client.get(path, options: options)).first, client: client)
50
+ end
51
+
52
+ # Get statuses from a project
53
+ #
54
+ # project_gid - [str] (required) Globally unique identifier for the project.
55
+ # options - [Hash] the request I/O options
56
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
57
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
58
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
59
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
60
+ def get_project_statuses_for_project(client, project_gid: required("project_gid"), options: {})
61
+ path = "/projects/{project_gid}/project_statuses"
62
+ path["{project_gid}"] = project_gid
63
+ Collection.new(parse(client.get(path, options: options)), type: ProjectStatus, client: client)
64
+ end
65
+
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,259 @@
1
+ ### WARNING: This file is auto-generated by our OpenAPI spec. Do not
2
+ ### edit it manually.
3
+
4
+ require_relative '../../resource_includes/response_helper'
5
+
6
+ module Asana
7
+ module Resources
8
+ class ProjectsBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Add a custom field to a project
16
+ #
17
+ # project_gid - [str] (required) Globally unique identifier for the project.
18
+ # options - [Hash] the request I/O options
19
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
20
+ # data - [Hash] the attributes to POST
21
+ def add_custom_field_setting_for_project(client, project_gid: required("project_gid"), options: {}, **data)
22
+ path = "/projects/{project_gid}/addCustomFieldSetting"
23
+ path["{project_gid}"] = project_gid
24
+ parse(client.post(path, body: data, options: options)).first
25
+ end
26
+
27
+ # Add followers to a project
28
+ #
29
+ # project_gid - [str] (required) Globally unique identifier for the project.
30
+ # options - [Hash] the request I/O options
31
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
32
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
33
+ # data - [Hash] the attributes to POST
34
+ def add_followers_for_project(client, project_gid: required("project_gid"), options: {}, **data)
35
+ path = "/projects/{project_gid}/addFollowers"
36
+ path["{project_gid}"] = project_gid
37
+ parse(client.post(path, body: data, options: options)).first
38
+ end
39
+
40
+ # Add users to a project
41
+ #
42
+ # project_gid - [str] (required) Globally unique identifier for the project.
43
+ # options - [Hash] the request I/O options
44
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
45
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
46
+ # data - [Hash] the attributes to POST
47
+ def add_members_for_project(client, project_gid: required("project_gid"), options: {}, **data)
48
+ path = "/projects/{project_gid}/addMembers"
49
+ path["{project_gid}"] = project_gid
50
+ parse(client.post(path, body: data, options: options)).first
51
+ end
52
+
53
+ # Create a project
54
+ #
55
+
56
+ # options - [Hash] the request I/O options
57
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
58
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
59
+ # data - [Hash] the attributes to POST
60
+ def create_project(client, options: {}, **data)
61
+ path = "/projects"
62
+ Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
63
+ end
64
+
65
+ # Create a project in a team
66
+ #
67
+ # team_gid - [str] (required) Globally unique identifier for the team.
68
+ # options - [Hash] the request I/O options
69
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
70
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
71
+ # data - [Hash] the attributes to POST
72
+ def create_project_for_team(client, team_gid: required("team_gid"), options: {}, **data)
73
+ path = "/teams/{team_gid}/projects"
74
+ path["{team_gid}"] = team_gid
75
+ Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
76
+ end
77
+
78
+ # Create a project in a workspace
79
+ #
80
+ # workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
81
+ # options - [Hash] the request I/O options
82
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
83
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
84
+ # data - [Hash] the attributes to POST
85
+ def create_project_for_workspace(client, workspace_gid: required("workspace_gid"), options: {}, **data)
86
+ path = "/workspaces/{workspace_gid}/projects"
87
+ path["{workspace_gid}"] = workspace_gid
88
+ Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
89
+ end
90
+
91
+ # Delete a project
92
+ #
93
+ # project_gid - [str] (required) Globally unique identifier for the project.
94
+ # options - [Hash] the request I/O options
95
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
96
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
97
+ def delete_project(client, project_gid: required("project_gid"), options: {})
98
+ path = "/projects/{project_gid}"
99
+ path["{project_gid}"] = project_gid
100
+ parse(client.delete(path, options: options)).first
101
+ end
102
+
103
+ # Duplicate a project
104
+ #
105
+ # project_gid - [str] (required) Globally unique identifier for the project.
106
+ # options - [Hash] the request I/O options
107
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
108
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
109
+ # data - [Hash] the attributes to POST
110
+ def duplicate_project(client, project_gid: required("project_gid"), options: {}, **data)
111
+ path = "/projects/{project_gid}/duplicate"
112
+ path["{project_gid}"] = project_gid
113
+ Job.new(parse(client.post(path, body: data, options: options)).first, client: client)
114
+ end
115
+
116
+ # Get a project
117
+ #
118
+ # project_gid - [str] (required) Globally unique identifier for the project.
119
+ # options - [Hash] the request I/O options
120
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
121
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
122
+ def get_project(client, project_gid: required("project_gid"), options: {})
123
+ path = "/projects/{project_gid}"
124
+ path["{project_gid}"] = project_gid
125
+ Project.new(parse(client.get(path, options: options)).first, client: client)
126
+ end
127
+
128
+ # Get multiple projects
129
+ #
130
+
131
+ # workspace - [str] The workspace or organization to filter projects on.
132
+ # team - [str] The team to filter projects on.
133
+ # archived - [bool] Only return projects whose `archived` field takes on the value of this parameter.
134
+ # options - [Hash] the request I/O options
135
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
136
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
137
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
138
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
139
+ def get_projects(client, workspace: nil, team: nil, archived: nil, options: {})
140
+ path = "/projects"
141
+ params = { workspace: workspace, team: team, archived: archived }.reject { |_,v| v.nil? || Array(v).empty? }
142
+ Collection.new(parse(client.get(path, params: params, options: options)), type: Project, client: client)
143
+ end
144
+
145
+ # Get projects a task is in
146
+ #
147
+ # task_gid - [str] (required) The task to operate on.
148
+ # options - [Hash] the request I/O options
149
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
150
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
151
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
152
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
153
+ def get_projects_for_task(client, task_gid: required("task_gid"), options: {})
154
+ path = "/tasks/{task_gid}/projects"
155
+ path["{task_gid}"] = task_gid
156
+ Collection.new(parse(client.get(path, options: options)), type: Project, client: client)
157
+ end
158
+
159
+ # Get a team's projects
160
+ #
161
+ # team_gid - [str] (required) Globally unique identifier for the team.
162
+ # archived - [bool] Only return projects whose `archived` field takes on the value of this parameter.
163
+ # options - [Hash] the request I/O options
164
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
165
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
166
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
167
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
168
+ def get_projects_for_team(client, team_gid: required("team_gid"), archived: nil, options: {})
169
+ path = "/teams/{team_gid}/projects"
170
+ path["{team_gid}"] = team_gid
171
+ params = { archived: archived }.reject { |_,v| v.nil? || Array(v).empty? }
172
+ Collection.new(parse(client.get(path, params: params, options: options)), type: Project, client: client)
173
+ end
174
+
175
+ # Get all projects in a workspace
176
+ #
177
+ # workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
178
+ # archived - [bool] Only return projects whose `archived` field takes on the value of this parameter.
179
+ # options - [Hash] the request I/O options
180
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
181
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
182
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
183
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
184
+ def get_projects_for_workspace(client, workspace_gid: required("workspace_gid"), archived: nil, options: {})
185
+ path = "/workspaces/{workspace_gid}/projects"
186
+ path["{workspace_gid}"] = workspace_gid
187
+ params = { archived: archived }.reject { |_,v| v.nil? || Array(v).empty? }
188
+ Collection.new(parse(client.get(path, params: params, options: options)), type: Project, client: client)
189
+ end
190
+
191
+ # Get task count of a project
192
+ #
193
+ # project_gid - [str] (required) Globally unique identifier for the project.
194
+ # options - [Hash] the request I/O options
195
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
196
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
197
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
198
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
199
+ def get_task_counts_for_project(client, project_gid: required("project_gid"), options: {})
200
+ path = "/projects/{project_gid}/task_counts"
201
+ path["{project_gid}"] = project_gid
202
+ parse(client.get(path, options: options)).first
203
+ end
204
+
205
+ # Remove a custom field from a project
206
+ #
207
+ # project_gid - [str] (required) Globally unique identifier for the project.
208
+ # options - [Hash] the request I/O options
209
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
210
+ # data - [Hash] the attributes to POST
211
+ def remove_custom_field_setting_for_project(client, project_gid: required("project_gid"), options: {}, **data)
212
+ path = "/projects/{project_gid}/removeCustomFieldSetting"
213
+ path["{project_gid}"] = project_gid
214
+ parse(client.post(path, body: data, options: options)).first
215
+ end
216
+
217
+ # Remove followers from a project
218
+ #
219
+ # project_gid - [str] (required) Globally unique identifier for the project.
220
+ # options - [Hash] the request I/O options
221
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
222
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
223
+ # data - [Hash] the attributes to POST
224
+ def remove_followers_for_project(client, project_gid: required("project_gid"), options: {}, **data)
225
+ path = "/projects/{project_gid}/removeFollowers"
226
+ path["{project_gid}"] = project_gid
227
+ parse(client.post(path, body: data, options: options)).first
228
+ end
229
+
230
+ # Remove users from a project
231
+ #
232
+ # project_gid - [str] (required) Globally unique identifier for the project.
233
+ # options - [Hash] the request I/O options
234
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
235
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
236
+ # data - [Hash] the attributes to POST
237
+ def remove_members_for_project(client, project_gid: required("project_gid"), options: {}, **data)
238
+ path = "/projects/{project_gid}/removeMembers"
239
+ path["{project_gid}"] = project_gid
240
+ parse(client.post(path, body: data, options: options)).first
241
+ end
242
+
243
+ # Update a project
244
+ #
245
+ # project_gid - [str] (required) Globally unique identifier for the project.
246
+ # options - [Hash] the request I/O options
247
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
248
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
249
+ # data - [Hash] the attributes to PUT
250
+ def update_project(client, project_gid: required("project_gid"), options: {}, **data)
251
+ path = "/projects/{project_gid}"
252
+ path["{project_gid}"] = project_gid
253
+ Project.new(parse(client.put(path, body: data, options: options)).first, client: client)
254
+ end
255
+
256
+ end
257
+ end
258
+ end
259
+ end