Skip to content

Commit d2ba0fe

Browse files
authored
Merge pull request #122 from Asana/openapi-sync
Generated from OpenAPI
2 parents 40f0322 + 7117f7a commit d2ba0fe

8 files changed

Lines changed: 227 additions & 8 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.10.9
1+
0.10.10
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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 ProjectBriefsBase < Resource
9+
10+
def self.inherited(base)
11+
Registry.register(base)
12+
end
13+
14+
class << self
15+
# Create a project brief
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_brief(client, project_gid: required("project_gid"), options: {}, **data)
23+
path = "/projects/{project_gid}/project_briefs"
24+
path["{project_gid}"] = project_gid
25+
parse(client.post(path, body: data, options: options)).first
26+
end
27+
28+
# Delete a project brief
29+
#
30+
# project_brief_gid - [str] (required) Globally unique identifier for the project brief.
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_brief(client, project_brief_gid: required("project_brief_gid"), options: {})
35+
path = "/project_briefs/{project_brief_gid}"
36+
path["{project_brief_gid}"] = project_brief_gid
37+
parse(client.delete(path, options: options)).first
38+
end
39+
40+
# Get a project brief
41+
#
42+
# project_brief_gid - [str] (required) Globally unique identifier for the project brief.
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_brief(client, project_brief_gid: required("project_brief_gid"), options: {})
47+
path = "/project_briefs/{project_brief_gid}"
48+
path["{project_brief_gid}"] = project_brief_gid
49+
parse(client.get(path, options: options)).first
50+
end
51+
52+
# Update a project brief
53+
#
54+
# project_brief_gid - [str] (required) Globally unique identifier for the project brief.
55+
# options - [Hash] the request I/O options
56+
# > 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.
57+
# > 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.
58+
# data - [Hash] the attributes to PUT
59+
def update_project_brief(client, project_brief_gid: required("project_brief_gid"), options: {}, **data)
60+
path = "/project_briefs/{project_brief_gid}"
61+
path["{project_brief_gid}"] = project_brief_gid
62+
parse(client.put(path, body: data, options: options)).first
63+
end
64+
65+
end
66+
end
67+
end
68+
end
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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 StatusUpdatesBase < Resource
9+
10+
def self.inherited(base)
11+
Registry.register(base)
12+
end
13+
14+
class << self
15+
# Create a status update
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_status_for_object(client, options: {}, **data)
25+
path = "/status_updates"
26+
parse(client.post(path, body: data, options: options)).first
27+
end
28+
29+
# Delete a status update
30+
#
31+
# status_gid - [str] (required) The status update to get.
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 delete_status(client, status_gid: required("status_gid"), options: {})
36+
path = "/status_updates/{status_gid}"
37+
path["{status_gid}"] = status_gid
38+
parse(client.delete(path, options: options)).first
39+
end
40+
41+
# Get a status update
42+
#
43+
# status_gid - [str] (required) The status update to get.
44+
# options - [Hash] the request I/O options
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_status(client, status_gid: required("status_gid"), options: {})
48+
path = "/status_updates/{status_gid}"
49+
path["{status_gid}"] = status_gid
50+
parse(client.get(path, options: options)).first
51+
end
52+
53+
# Get status updates from an object
54+
#
55+
56+
# parent - [str] (required) Globally unique identifier for object to fetch statuses from.
57+
# created_since - [datetime] Only return statuses that have been created since the given time.
58+
# options - [Hash] the request I/O options
59+
# > 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.'
60+
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
61+
# > 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.
62+
# > 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.
63+
def get_statuses_for_object(client, parent: nil, created_since: nil, options: {})
64+
path = "/status_updates"
65+
params = { parent: parent, created_since: created_since }.reject { |_,v| v.nil? || Array(v).empty? }
66+
Collection.new(parse(client.get(path, params: params, options: options)), type: Resource, client: client)
67+
end
68+
69+
end
70+
end
71+
end
72+
end

0 commit comments

Comments
 (0)