asana 0.9.2 → 0.10.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/.swagger-codegen-ignore +3 -0
  3. data/.travis.yml +2 -1
  4. data/Appraisals +2 -35
  5. data/Gemfile +2 -0
  6. data/README.md +3 -51
  7. data/VERSION +1 -0
  8. data/asana.gemspec +3 -3
  9. data/examples/Gemfile.lock +10 -10
  10. data/lib/asana/client.rb +10 -10
  11. data/lib/asana/http_client.rb +8 -2
  12. data/lib/asana/resource_includes/attachment_uploading.rb +14 -7
  13. data/lib/asana/resource_includes/collection.rb +5 -0
  14. data/lib/asana/resource_includes/resource.rb +0 -4
  15. data/lib/asana/resources/attachment.rb +2 -5
  16. data/lib/asana/resources/batch_api.rb +15 -0
  17. data/lib/asana/resources/custom_field_settings.rb +2 -5
  18. data/lib/asana/resources/custom_fields.rb +2 -5
  19. data/lib/asana/resources/events.rb +28 -0
  20. data/lib/asana/resources/gen/attachments_base.rb +56 -0
  21. data/lib/asana/resources/gen/batch_api_base.rb +30 -0
  22. data/lib/asana/resources/gen/custom_field_settings_base.rb +46 -0
  23. data/lib/asana/resources/gen/custom_fields_base.rb +124 -0
  24. data/lib/asana/resources/gen/events_base.rb +32 -0
  25. data/lib/asana/resources/gen/jobs_base.rb +30 -0
  26. data/lib/asana/resources/gen/organization_exports_base.rb +44 -0
  27. data/lib/asana/resources/gen/portfolio_memberships_base.rb +63 -0
  28. data/lib/asana/resources/gen/portfolios_base.rb +173 -0
  29. data/lib/asana/resources/gen/project_memberships_base.rb +46 -0
  30. data/lib/asana/resources/gen/project_statuses_base.rb +69 -0
  31. data/lib/asana/resources/gen/projects_base.rb +259 -0
  32. data/lib/asana/resources/gen/sections_base.rb +108 -0
  33. data/lib/asana/resources/gen/stories_base.rb +84 -0
  34. data/lib/asana/resources/gen/tags_base.rb +129 -0
  35. data/lib/asana/resources/gen/tasks_base.rb +425 -0
  36. data/lib/asana/resources/gen/team_memberships_base.rb +77 -0
  37. data/lib/asana/resources/gen/teams_base.rb +88 -0
  38. data/lib/asana/resources/gen/typeahead_base.rb +35 -0
  39. data/lib/asana/resources/gen/user_task_lists_base.rb +44 -0
  40. data/lib/asana/resources/gen/users_base.rb +88 -0
  41. data/lib/asana/resources/gen/webhooks_base.rb +70 -0
  42. data/lib/asana/resources/gen/workspace_memberships_base.rb +60 -0
  43. data/lib/asana/resources/gen/workspaces_base.rb +82 -0
  44. data/lib/asana/resources/job.rb +2 -3
  45. data/lib/asana/resources/organization_export.rb +2 -5
  46. data/lib/asana/resources/portfolio.rb +2 -5
  47. data/lib/asana/resources/portfolio_membership.rb +2 -5
  48. data/lib/asana/resources/project.rb +2 -5
  49. data/lib/asana/resources/project_membership.rb +2 -5
  50. data/lib/asana/resources/project_status.rb +2 -5
  51. data/lib/asana/resources/section.rb +18 -22
  52. data/lib/asana/resources/story.rb +2 -5
  53. data/lib/asana/resources/tag.rb +2 -5
  54. data/lib/asana/resources/task.rb +5 -5
  55. data/lib/asana/resources/team.rb +2 -5
  56. data/lib/asana/resources/team_membership.rb +26 -0
  57. data/lib/asana/resources/typeahead.rb +22 -0
  58. data/lib/asana/resources/user.rb +2 -5
  59. data/lib/asana/resources/user_task_list.rb +2 -5
  60. data/lib/asana/resources/webhook.rb +2 -5
  61. data/lib/asana/resources/workspace.rb +2 -6
  62. data/lib/asana/resources/workspace_membership.rb +32 -0
  63. data/lib/asana/version.rb +1 -1
  64. data/samples/attachments_sample.yaml +41 -0
  65. data/samples/batch_api_sample.yaml +11 -0
  66. data/samples/custom_field_settings_sample.yaml +21 -0
  67. data/samples/custom_fields_sample.yaml +81 -0
  68. data/samples/events_sample.yaml +11 -0
  69. data/samples/jobs_sample.yaml +11 -0
  70. data/samples/organization_exports_sample.yaml +21 -0
  71. data/samples/portfolio_memberships_sample.yaml +31 -0
  72. data/samples/portfolios_sample.yaml +121 -0
  73. data/samples/project_memberships_sample.yaml +21 -0
  74. data/samples/project_statuses_sample.yaml +41 -0
  75. data/samples/projects_sample.yaml +181 -0
  76. data/samples/sections_sample.yaml +71 -0
  77. data/samples/stories_sample.yaml +51 -0
  78. data/samples/tags_sample.yaml +81 -0
  79. data/samples/tasks_sample.yaml +261 -0
  80. data/samples/team_memberships_sample.yaml +41 -0
  81. data/samples/teams_sample.yaml +51 -0
  82. data/samples/typeahead_sample.yaml +11 -0
  83. data/samples/user_task_lists_sample.yaml +21 -0
  84. data/samples/users_sample.yaml +51 -0
  85. data/samples/webhooks_sample.yaml +41 -0
  86. data/samples/workspace_memberships_sample.yaml +31 -0
  87. data/samples/workspaces_sample.yaml +51 -0
  88. data/swagger_templates/api.mustache +41 -0
  89. data/swagger_templates/api_doc.mustache +12 -0
  90. data/swagger_templates/ruby-config.json +6 -0
  91. metadata +70 -13
@@ -0,0 +1,56 @@
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 AttachmentsBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Delete an attachment
16
+ #
17
+ # attachment_gid - [str] (required) Globally unique identifier for the attachment.
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 delete_attachment(client, attachment_gid: required("attachment_gid"), options: {})
22
+ path = "/attachments/{attachment_gid}"
23
+ path["{attachment_gid}"] = attachment_gid
24
+ parse(client.delete(path, options: options)).first
25
+ end
26
+
27
+ # Get an attachment
28
+ #
29
+ # attachment_gid - [str] (required) Globally unique identifier for the attachment.
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
+ def get_attachment(client, attachment_gid: required("attachment_gid"), options: {})
34
+ path = "/attachments/{attachment_gid}"
35
+ path["{attachment_gid}"] = attachment_gid
36
+ Attachment.new(parse(client.get(path, options: options)).first, client: client)
37
+ end
38
+
39
+ # Get attachments for a task
40
+ #
41
+ # task_gid - [str] (required) The task to operate on.
42
+ # options - [Hash] the request I/O options
43
+ # > 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.'
44
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
45
+ # > 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.
46
+ # > 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.
47
+ def get_attachments_for_task(client, task_gid: required("task_gid"), options: {})
48
+ path = "/tasks/{task_gid}/attachments"
49
+ path["{task_gid}"] = task_gid
50
+ Collection.new(parse(client.get(path, options: options)), type: Attachment, client: client)
51
+ end
52
+
53
+ end
54
+ end
55
+ end
56
+ end
@@ -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 BatchAPIBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Submit parallel requests
16
+ #
17
+
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_batch_request(client, options: {}, **data)
23
+ path = "/batch"
24
+ Collection.new(parse(client.post(path, body: data, options: options)), type: Resource, client: client)
25
+ end
26
+
27
+ end
28
+ end
29
+ end
30
+ 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 CustomFieldSettingsBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Get a portfolio's custom fields
16
+ #
17
+ # portfolio_gid - [str] (required) Globally unique identifier for the portfolio.
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
+ def get_custom_field_settings_for_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {})
24
+ path = "/portfolios/{portfolio_gid}/custom_field_settings"
25
+ path["{portfolio_gid}"] = portfolio_gid
26
+ Collection.new(parse(client.get(path, options: options)), type: CustomFieldSetting, client: client)
27
+ end
28
+
29
+ # Get a project's custom fields
30
+ #
31
+ # project_gid - [str] (required) Globally unique identifier for the project.
32
+ # options - [Hash] the request I/O options
33
+ # > 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.'
34
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
35
+ # > 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.
36
+ # > 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.
37
+ def get_custom_field_settings_for_project(client, project_gid: required("project_gid"), options: {})
38
+ path = "/projects/{project_gid}/custom_field_settings"
39
+ path["{project_gid}"] = project_gid
40
+ Collection.new(parse(client.get(path, options: options)), type: CustomFieldSetting, client: client)
41
+ end
42
+
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,124 @@
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 CustomFieldsBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Create a custom field
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_custom_field(client, options: {}, **data)
25
+ path = "/custom_fields"
26
+ CustomField.new(parse(client.post(path, body: data, options: options)).first, client: client)
27
+ end
28
+
29
+ # Create an enum option
30
+ #
31
+ # custom_field_gid - [str] (required) Globally unique identifier for the custom field.
32
+ # options - [Hash] the request I/O options
33
+ # > 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.'
34
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
35
+ # > 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.
36
+ # > 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.
37
+ # data - [Hash] the attributes to POST
38
+ def create_enum_option_for_custom_field(client, custom_field_gid: required("custom_field_gid"), options: {}, **data)
39
+ path = "/custom_fields/{custom_field_gid}/enum_options"
40
+ path["{custom_field_gid}"] = custom_field_gid
41
+ parse(client.post(path, body: data, options: options)).first
42
+ end
43
+
44
+ # Delete a custom field
45
+ #
46
+ # custom_field_gid - [str] (required) Globally unique identifier for the custom field.
47
+ # options - [Hash] the request I/O options
48
+ # > 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.
49
+ # > 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.
50
+ def delete_custom_field(client, custom_field_gid: required("custom_field_gid"), options: {})
51
+ path = "/custom_fields/{custom_field_gid}"
52
+ path["{custom_field_gid}"] = custom_field_gid
53
+ parse(client.delete(path, options: options)).first
54
+ end
55
+
56
+ # Get a custom field
57
+ #
58
+ # custom_field_gid - [str] (required) Globally unique identifier for the custom field.
59
+ # options - [Hash] the request I/O options
60
+ # > 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.
61
+ # > 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.
62
+ def get_custom_field(client, custom_field_gid: required("custom_field_gid"), options: {})
63
+ path = "/custom_fields/{custom_field_gid}"
64
+ path["{custom_field_gid}"] = custom_field_gid
65
+ CustomField.new(parse(client.get(path, options: options)).first, client: client)
66
+ end
67
+
68
+ # Get a workspace's custom fields
69
+ #
70
+ # workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
71
+ # options - [Hash] the request I/O options
72
+ # > 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.'
73
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
74
+ # > 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.
75
+ # > 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.
76
+ def get_custom_fields_for_workspace(client, workspace_gid: required("workspace_gid"), options: {})
77
+ path = "/workspaces/{workspace_gid}/custom_fields"
78
+ path["{workspace_gid}"] = workspace_gid
79
+ Collection.new(parse(client.get(path, options: options)), type: CustomField, client: client)
80
+ end
81
+
82
+ # Reorder a custom field's enum
83
+ #
84
+ # custom_field_gid - [str] (required) Globally unique identifier for the custom field.
85
+ # options - [Hash] the request I/O options
86
+ # > 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.
87
+ # > 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.
88
+ # data - [Hash] the attributes to POST
89
+ def insert_enum_option_for_custom_field(client, custom_field_gid: required("custom_field_gid"), options: {}, **data)
90
+ path = "/custom_fields/{custom_field_gid}/enum_options/insert"
91
+ path["{custom_field_gid}"] = custom_field_gid
92
+ parse(client.post(path, body: data, options: options)).first
93
+ end
94
+
95
+ # Update a custom field
96
+ #
97
+ # custom_field_gid - [str] (required) Globally unique identifier for the custom field.
98
+ # options - [Hash] the request I/O options
99
+ # > 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.
100
+ # > 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.
101
+ # data - [Hash] the attributes to PUT
102
+ def update_custom_field(client, custom_field_gid: required("custom_field_gid"), options: {}, **data)
103
+ path = "/custom_fields/{custom_field_gid}"
104
+ path["{custom_field_gid}"] = custom_field_gid
105
+ CustomField.new(parse(client.put(path, body: data, options: options)).first, client: client)
106
+ end
107
+
108
+ # Update an enum option
109
+ #
110
+ # enum_option_gid - [str] (required) Globally unique identifier for the enum option.
111
+ # options - [Hash] the request I/O options
112
+ # > 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.
113
+ # > 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.
114
+ # data - [Hash] the attributes to PUT
115
+ def update_enum_option(client, enum_option_gid: required("enum_option_gid"), options: {}, **data)
116
+ path = "/enum_options/{enum_option_gid}"
117
+ path["{enum_option_gid}"] = enum_option_gid
118
+ parse(client.put(path, body: data, options: options)).first
119
+ end
120
+
121
+ end
122
+ end
123
+ end
124
+ end
@@ -0,0 +1,32 @@
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 EventsBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Get events on a resource
16
+ #
17
+
18
+ # resource - [str] (required) A resource ID to subscribe to. The resource can be a task or project.
19
+ # sync - [str] A sync token received from the last request, or none on first sync. Events will be returned from the point in time that the sync token was generated. *Note: On your first request, omit the sync token. The response will be the same as for an expired sync token, and will include a new valid sync token.If the sync token is too old (which may happen from time to time) the API will return a `412 Precondition Failed` error, and include a fresh sync token in the response.*
20
+ # options - [Hash] the request I/O options
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
+ def get_events(client, resource: nil, sync: nil, options: {})
24
+ path = "/events"
25
+ params = { resource: resource, sync: sync }.reject { |_,v| v.nil? || Array(v).empty? }
26
+ Collection.new(parse(client.get(path, params: params, options: options)), type: Resource, client: client)
27
+ end
28
+
29
+ end
30
+ end
31
+ end
32
+ end
@@ -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