Class: Asana::Resources::ProjectsBase

Inherits:
Resource
  • Object
show all
Defined in:
lib/asana/resources/gen/projects_base.rb

Direct Known Subclasses

Project

Class Method Summary collapse

Methods inherited from Resource

#initialize, #method_missing, #refresh, #respond_to_missing?, #to_h, #to_s

Methods included from ResponseHelper

#parse

Constructor Details

This class inherits a constructor from Asana::Resources::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Asana::Resources::Resource

Class Method Details

.add_custom_field_setting_for_project(client, project_gid: required("project_gid"), options: {}, **data) ⇒ Object

Add a custom field to a project

Parameters:

  • project_gid (str) (defaults to: required("project_gid"))

    (required) Globally unique identifier for the project.

  • options (Hash) (defaults to: {})

    the request I/O options

  • bool (>])

    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.

  • data (Hash)

    the attributes to POST



21
22
23
24
25
# File 'lib/asana/resources/gen/projects_base.rb', line 21

def add_custom_field_setting_for_project(client, project_gid: required("project_gid"), options: {}, **data)
  path = "/projects/{project_gid}/addCustomFieldSetting"
  path["{project_gid}"] = project_gid
  CustomFieldSetting.new(parse(client.post(path, body: data, options: options)).first, client: client)
end

.add_followers_for_project(client, project_gid: required("project_gid"), options: {}, **data) ⇒ Object

Add followers to a project

Parameters:

  • project_gid (str) (defaults to: required("project_gid"))

    (required) Globally unique identifier for the project.

  • options (Hash) (defaults to: {})

    the request I/O options

  • 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.

  • bool (>])

    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.

  • data (Hash)

    the attributes to POST



34
35
36
37
38
# File 'lib/asana/resources/gen/projects_base.rb', line 34

def add_followers_for_project(client, project_gid: required("project_gid"), options: {}, **data)
  path = "/projects/{project_gid}/addFollowers"
  path["{project_gid}"] = project_gid
  Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
end

.add_members_for_project(client, project_gid: required("project_gid"), options: {}, **data) ⇒ Object

Add users to a project

Parameters:

  • project_gid (str) (defaults to: required("project_gid"))

    (required) Globally unique identifier for the project.

  • options (Hash) (defaults to: {})

    the request I/O options

  • 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.

  • bool (>])

    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.

  • data (Hash)

    the attributes to POST



47
48
49
50
51
# File 'lib/asana/resources/gen/projects_base.rb', line 47

def add_members_for_project(client, project_gid: required("project_gid"), options: {}, **data)
  path = "/projects/{project_gid}/addMembers"
  path["{project_gid}"] = project_gid
  Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
end

.create_project(client, options: {}, **data) ⇒ Object

options - [Hash] the request I/O options > opt_fields - [list] 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. > 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.

Parameters:

  • data (Hash)

    the attributes to POST



60
61
62
63
# File 'lib/asana/resources/gen/projects_base.rb', line 60

def create_project(client, options: {}, **data)
  path = "/projects"
  Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
end

.create_project_for_team(client, team_gid: required("team_gid"), options: {}, **data) ⇒ Object

Create a project in a team

Parameters:

  • team_gid (str) (defaults to: required("team_gid"))

    (required) Globally unique identifier for the team.

  • options (Hash) (defaults to: {})

    the request I/O options

  • 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.

  • bool (>])

    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.

  • data (Hash)

    the attributes to POST



72
73
74
75
76
# File 'lib/asana/resources/gen/projects_base.rb', line 72

def create_project_for_team(client, team_gid: required("team_gid"), options: {}, **data)
  path = "/teams/{team_gid}/projects"
  path["{team_gid}"] = team_gid
  Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
end

.create_project_for_workspace(client, workspace_gid: required("workspace_gid"), options: {}, **data) ⇒ Object

Create a project in a workspace

Parameters:

  • workspace_gid (str) (defaults to: required("workspace_gid"))

    (required) Globally unique identifier for the workspace or organization.

  • options (Hash) (defaults to: {})

    the request I/O options

  • 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.

  • bool (>])

    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.

  • data (Hash)

    the attributes to POST



85
86
87
88
89
# File 'lib/asana/resources/gen/projects_base.rb', line 85

def create_project_for_workspace(client, workspace_gid: required("workspace_gid"), options: {}, **data)
  path = "/workspaces/{workspace_gid}/projects"
  path["{workspace_gid}"] = workspace_gid
  Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
end

.delete_project(client, project_gid: required("project_gid"), options: {}) ⇒ Object

Delete a project

Parameters:

  • project_gid (str) (defaults to: required("project_gid"))

    (required) Globally unique identifier for the project.

  • options (Hash) (defaults to: {})

    the request I/O options

  • 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.

  • bool (>])

    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
98
99
100
101
# File 'lib/asana/resources/gen/projects_base.rb', line 97

def delete_project(client, project_gid: required("project_gid"), options: {})
  path = "/projects/{project_gid}"
  path["{project_gid}"] = project_gid
  parse(client.delete(path, options: options)).first
end

.duplicate_project(client, project_gid: required("project_gid"), options: {}, **data) ⇒ Object

Duplicate a project

Parameters:

  • project_gid (str) (defaults to: required("project_gid"))

    (required) Globally unique identifier for the project.

  • options (Hash) (defaults to: {})

    the request I/O options

  • 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.

  • bool (>])

    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.

  • data (Hash)

    the attributes to POST



110
111
112
113
114
# File 'lib/asana/resources/gen/projects_base.rb', line 110

def duplicate_project(client, project_gid: required("project_gid"), options: {}, **data)
  path = "/projects/{project_gid}/duplicate"
  path["{project_gid}"] = project_gid
  Job.new(parse(client.post(path, body: data, options: options)).first, client: client)
end

.get_project(client, project_gid: required("project_gid"), options: {}) ⇒ Object

Get a project

Parameters:

  • project_gid (str) (defaults to: required("project_gid"))

    (required) Globally unique identifier for the project.

  • options (Hash) (defaults to: {})

    the request I/O options

  • 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.

  • bool (>])

    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
123
124
125
126
# File 'lib/asana/resources/gen/projects_base.rb', line 122

def get_project(client, project_gid: required("project_gid"), options: {})
  path = "/projects/{project_gid}"
  path["{project_gid}"] = project_gid
  Project.new(parse(client.get(path, options: options)).first, client: client)
end

.get_projects(client, workspace: nil, team: nil, archived: nil, options: {}) ⇒ Object

workspace - [str] The workspace or organization to filter projects on.

Parameters:

  • team (str) (defaults to: nil)

    The team to filter projects on.

  • archived (bool) (defaults to: nil)

    Only return projects whose ‘archived` field takes on the value of this parameter.

  • options (Hash) (defaults to: {})

    the request I/O options

  • str (>]'Note: You can only pass in an offset that was returned to you via a previously paginated request.')

    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.’

  • int (>])

    limit [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.

  • 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.

  • bool (>])

    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
140
141
142
143
# File 'lib/asana/resources/gen/projects_base.rb', line 139

def get_projects(client, workspace: nil, team: nil, archived: nil, options: {})
  path = "/projects"
  params = { workspace: workspace, team: team, archived: archived }.reject { |_,v| v.nil? || Array(v).empty? }
  Collection.new(parse(client.get(path, params: params, options: options)), type: Project, client: client)
end

.get_projects_for_task(client, task_gid: required("task_gid"), options: {}) ⇒ Object

Get projects a task is in

Parameters:

  • task_gid (str) (defaults to: required("task_gid"))

    (required) The task to operate on.

  • options (Hash) (defaults to: {})

    the request I/O options

  • str (>]'Note: You can only pass in an offset that was returned to you via a previously paginated request.')

    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.’

  • int (>])

    limit [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.

  • 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.

  • bool (>])

    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
154
155
156
157
# File 'lib/asana/resources/gen/projects_base.rb', line 153

def get_projects_for_task(client, task_gid: required("task_gid"), options: {})
  path = "/tasks/{task_gid}/projects"
  path["{task_gid}"] = task_gid
  Collection.new(parse(client.get(path, options: options)), type: Project, client: client)
end

.get_projects_for_team(client, team_gid: required("team_gid"), archived: nil, options: {}) ⇒ Object

Get a team’s projects

Parameters:

  • team_gid (str) (defaults to: required("team_gid"))

    (required) Globally unique identifier for the team.

  • archived (bool) (defaults to: nil)

    Only return projects whose ‘archived` field takes on the value of this parameter.

  • options (Hash) (defaults to: {})

    the request I/O options

  • str (>]'Note: You can only pass in an offset that was returned to you via a previously paginated request.')

    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.’

  • int (>])

    limit [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.

  • 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.

  • bool (>])

    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
169
170
171
172
173
# File 'lib/asana/resources/gen/projects_base.rb', line 168

def get_projects_for_team(client, team_gid: required("team_gid"), archived: nil, options: {})
  path = "/teams/{team_gid}/projects"
  path["{team_gid}"] = team_gid
  params = { archived: archived }.reject { |_,v| v.nil? || Array(v).empty? }
  Collection.new(parse(client.get(path, params: params, options: options)), type: Project, client: client)
end

.get_projects_for_workspace(client, workspace_gid: required("workspace_gid"), archived: nil, options: {}) ⇒ Object

Get all projects in a workspace

Parameters:

  • workspace_gid (str) (defaults to: required("workspace_gid"))

    (required) Globally unique identifier for the workspace or organization.

  • archived (bool) (defaults to: nil)

    Only return projects whose ‘archived` field takes on the value of this parameter.

  • options (Hash) (defaults to: {})

    the request I/O options

  • str (>]'Note: You can only pass in an offset that was returned to you via a previously paginated request.')

    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.’

  • int (>])

    limit [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.

  • 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.

  • bool (>])

    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
185
186
187
188
189
# File 'lib/asana/resources/gen/projects_base.rb', line 184

def get_projects_for_workspace(client, workspace_gid: required("workspace_gid"), archived: nil, options: {})
  path = "/workspaces/{workspace_gid}/projects"
  path["{workspace_gid}"] = workspace_gid
  params = { archived: archived }.reject { |_,v| v.nil? || Array(v).empty? }
  Collection.new(parse(client.get(path, params: params, options: options)), type: Project, client: client)
end

.get_task_counts_for_project(client, project_gid: required("project_gid"), options: {}) ⇒ Object

Get task count of a project

Parameters:

  • project_gid (str) (defaults to: required("project_gid"))

    (required) Globally unique identifier for the project.

  • options (Hash) (defaults to: {})

    the request I/O options

  • str (>]'Note: You can only pass in an offset that was returned to you via a previously paginated request.')

    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.’

  • int (>])

    limit [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.

  • 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.

  • bool (>])

    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
200
201
202
203
# File 'lib/asana/resources/gen/projects_base.rb', line 199

def get_task_counts_for_project(client, project_gid: required("project_gid"), options: {})
  path = "/projects/{project_gid}/task_counts"
  path["{project_gid}"] = project_gid
  parse(client.get(path, options: options)).first
end

.inherited(base) ⇒ Object



10
11
12
# File 'lib/asana/resources/gen/projects_base.rb', line 10

def self.inherited(base)
  Registry.register(base)
end

.project_save_as_template(client, project_gid: required("project_gid"), options: {}, **data) ⇒ Object

Create a project template from a project

Parameters:

  • project_gid (str) (defaults to: required("project_gid"))

    (required) Globally unique identifier for the project.

  • options (Hash) (defaults to: {})

    the request I/O options

  • 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.

  • bool (>])

    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.

  • data (Hash)

    the attributes to POST



212
213
214
215
216
# File 'lib/asana/resources/gen/projects_base.rb', line 212

def project_save_as_template(client, project_gid: required("project_gid"), options: {}, **data)
  path = "/projects/{project_gid}/saveAsTemplate"
  path["{project_gid}"] = project_gid
  Job.new(parse(client.post(path, body: data, options: options)).first, client: client)
end

.remove_custom_field_setting_for_project(client, project_gid: required("project_gid"), options: {}, **data) ⇒ Object

Remove a custom field from a project

Parameters:

  • project_gid (str) (defaults to: required("project_gid"))

    (required) Globally unique identifier for the project.

  • options (Hash) (defaults to: {})

    the request I/O options

  • bool (>])

    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.

  • data (Hash)

    the attributes to POST



224
225
226
227
228
# File 'lib/asana/resources/gen/projects_base.rb', line 224

def remove_custom_field_setting_for_project(client, project_gid: required("project_gid"), options: {}, **data)
  path = "/projects/{project_gid}/removeCustomFieldSetting"
  path["{project_gid}"] = project_gid
  parse(client.post(path, body: data, options: options)).first
end

.remove_followers_for_project(client, project_gid: required("project_gid"), options: {}, **data) ⇒ Object

Remove followers from a project

Parameters:

  • project_gid (str) (defaults to: required("project_gid"))

    (required) Globally unique identifier for the project.

  • options (Hash) (defaults to: {})

    the request I/O options

  • 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.

  • bool (>])

    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.

  • data (Hash)

    the attributes to POST



237
238
239
240
241
# File 'lib/asana/resources/gen/projects_base.rb', line 237

def remove_followers_for_project(client, project_gid: required("project_gid"), options: {}, **data)
  path = "/projects/{project_gid}/removeFollowers"
  path["{project_gid}"] = project_gid
  Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
end

.remove_members_for_project(client, project_gid: required("project_gid"), options: {}, **data) ⇒ Object

Remove users from a project

Parameters:

  • project_gid (str) (defaults to: required("project_gid"))

    (required) Globally unique identifier for the project.

  • options (Hash) (defaults to: {})

    the request I/O options

  • 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.

  • bool (>])

    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.

  • data (Hash)

    the attributes to POST



250
251
252
253
254
# File 'lib/asana/resources/gen/projects_base.rb', line 250

def remove_members_for_project(client, project_gid: required("project_gid"), options: {}, **data)
  path = "/projects/{project_gid}/removeMembers"
  path["{project_gid}"] = project_gid
  Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
end

.update_project(client, project_gid: required("project_gid"), options: {}, **data) ⇒ Object

Update a project

Parameters:

  • project_gid (str) (defaults to: required("project_gid"))

    (required) Globally unique identifier for the project.

  • options (Hash) (defaults to: {})

    the request I/O options

  • 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.

  • bool (>])

    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.

  • data (Hash)

    the attributes to PUT



263
264
265
266
267
# File 'lib/asana/resources/gen/projects_base.rb', line 263

def update_project(client, project_gid: required("project_gid"), options: {}, **data)
  path = "/projects/{project_gid}"
  path["{project_gid}"] = project_gid
  Project.new(parse(client.put(path, body: data, options: options)).first, client: client)
end