asana 0.10.3 → 0.10.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +24 -0
- data/.github/workflows/pubilsh-to-rubygem.yml +18 -0
- data/.github/workflows/publish-to-github-releases.yml +16 -0
- data/.gitignore +0 -1
- data/Gemfile.lock +169 -0
- data/README.md +22 -9
- data/Rakefile +10 -14
- data/VERSION +1 -1
- data/asana.gemspec +2 -2
- data/examples/Gemfile.lock +2 -2
- data/lib/asana/http_client/error_handling.rb +11 -4
- data/lib/asana/resources/gen/audit_log_api_base.rb +37 -0
- data/lib/asana/resources/gen/goals_base.rb +218 -0
- data/lib/asana/resources/gen/project_briefs_base.rb +68 -0
- data/lib/asana/resources/gen/project_templates_base.rb +73 -0
- data/lib/asana/resources/gen/projects_base.rb +13 -0
- data/lib/asana/resources/gen/status_updates_base.rb +72 -0
- data/lib/asana/resources/gen/tasks_base.rb +2 -6
- data/lib/asana/resources/gen/teams_base.rb +15 -1
- data/lib/asana/resources/gen/time_periods_base.rb +47 -0
- data/lib/asana/resources/gen/typeahead_base.rb +1 -1
- data/lib/asana/resources/gen/users_base.rb +3 -4
- data/lib/asana/resources/gen/webhooks_base.rb +13 -0
- data/lib/asana/resources/portfolio.rb +3 -3
- data/lib/asana/version.rb +1 -1
- data/package-lock.json +115 -0
- data/samples/audit_log_api_sample.yaml +11 -0
- data/samples/goals_sample.yaml +161 -0
- data/samples/project_briefs_sample.yaml +41 -0
- data/samples/project_templates_sample.yaml +41 -0
- data/samples/projects_sample.yaml +10 -0
- data/samples/status_updates_sample.yaml +41 -0
- data/samples/teams_sample.yaml +10 -0
- data/samples/time_periods_sample.yaml +21 -0
- data/samples/webhooks_sample.yaml +10 -0
- metadata +28 -12
- data/.travis.yml +0 -16
@@ -43,14 +43,15 @@ module Asana
|
|
43
43
|
#
|
44
44
|
|
45
45
|
# workspace - [str] The workspace or organization ID to filter users on.
|
46
|
+
# team - [str] The team ID to filter users on.
|
46
47
|
# options - [Hash] the request I/O options
|
47
48
|
# > 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.'
|
48
49
|
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
49
50
|
# > 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.
|
50
51
|
# > 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.
|
51
|
-
def get_users(client, workspace: nil, options: {})
|
52
|
+
def get_users(client, workspace: nil, team: nil, options: {})
|
52
53
|
path = "/users"
|
53
|
-
params = { workspace: workspace }.reject { |_,v| v.nil? || Array(v).empty? }
|
54
|
+
params = { workspace: workspace, team: team }.reject { |_,v| v.nil? || Array(v).empty? }
|
54
55
|
Collection.new(parse(client.get(path, params: params, options: options)), type: User, client: client)
|
55
56
|
end
|
56
57
|
|
@@ -59,7 +60,6 @@ module Asana
|
|
59
60
|
# team_gid - [str] (required) Globally unique identifier for the team.
|
60
61
|
# options - [Hash] the request I/O options
|
61
62
|
# > 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.'
|
62
|
-
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
63
63
|
# > 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.
|
64
64
|
# > 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.
|
65
65
|
def get_users_for_team(client, team_gid: required("team_gid"), options: {})
|
@@ -73,7 +73,6 @@ module Asana
|
|
73
73
|
# workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
|
74
74
|
# options - [Hash] the request I/O options
|
75
75
|
# > 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.'
|
76
|
-
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
77
76
|
# > 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.
|
78
77
|
# > 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.
|
79
78
|
def get_users_for_workspace(client, workspace_gid: required("workspace_gid"), options: {})
|
@@ -64,6 +64,19 @@ module Asana
|
|
64
64
|
Collection.new(parse(client.get(path, params: params, options: options)), type: Webhook, client: client)
|
65
65
|
end
|
66
66
|
|
67
|
+
# Update a webhook
|
68
|
+
#
|
69
|
+
# webhook_gid - [str] (required) Globally unique identifier for the webhook.
|
70
|
+
# options - [Hash] the request I/O options
|
71
|
+
# > 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.
|
72
|
+
# > 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.
|
73
|
+
# data - [Hash] the attributes to PUT
|
74
|
+
def update_webhook(client, webhook_gid: required("webhook_gid"), options: {}, **data)
|
75
|
+
path = "/webhooks/{webhook_gid}"
|
76
|
+
path["{webhook_gid}"] = webhook_gid
|
77
|
+
Webhook.new(parse(client.put(path, body: data, options: options)).first, client: client)
|
78
|
+
end
|
79
|
+
|
67
80
|
end
|
68
81
|
end
|
69
82
|
end
|
@@ -107,7 +107,7 @@ module Asana
|
|
107
107
|
# options - [Hash] the request I/O options.
|
108
108
|
def get_items(options: {})
|
109
109
|
|
110
|
-
Collection.new(parse(client.get("/portfolios/#{gid}/items", options: options)), type:
|
110
|
+
Collection.new(parse(client.get("/portfolios/#{gid}/items", options: options)), type: Resource, client: client)
|
111
111
|
end
|
112
112
|
|
113
113
|
# Add an item to a portfolio.
|
@@ -165,7 +165,7 @@ module Asana
|
|
165
165
|
# options - [Hash] the request I/O options.
|
166
166
|
def custom_field_settings(options: {})
|
167
167
|
|
168
|
-
Collection.new(parse(client.get("/portfolios/#{gid}/custom_field_settings", options: options)), type:
|
168
|
+
Collection.new(parse(client.get("/portfolios/#{gid}/custom_field_settings", options: options)), type: CustomFieldSetting, client: client)
|
169
169
|
end
|
170
170
|
|
171
171
|
# Create a new custom field setting on the portfolio. Returns the full
|
@@ -200,4 +200,4 @@ module Asana
|
|
200
200
|
|
201
201
|
end
|
202
202
|
end
|
203
|
-
end
|
203
|
+
end
|
data/lib/asana/version.rb
CHANGED
data/package-lock.json
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
{
|
2
|
+
"name": "ruby-asana",
|
3
|
+
"lockfileVersion": 2,
|
4
|
+
"requires": true,
|
5
|
+
"packages": {
|
6
|
+
"": {
|
7
|
+
"devDependencies": {
|
8
|
+
"inflect": "^0.3.0",
|
9
|
+
"js-yaml": "^3.2.5",
|
10
|
+
"lodash": "^4.17.13"
|
11
|
+
}
|
12
|
+
},
|
13
|
+
"node_modules/argparse": {
|
14
|
+
"version": "1.0.10",
|
15
|
+
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
16
|
+
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
17
|
+
"dev": true,
|
18
|
+
"dependencies": {
|
19
|
+
"sprintf-js": "~1.0.2"
|
20
|
+
}
|
21
|
+
},
|
22
|
+
"node_modules/esprima": {
|
23
|
+
"version": "4.0.1",
|
24
|
+
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
25
|
+
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
|
26
|
+
"dev": true,
|
27
|
+
"bin": {
|
28
|
+
"esparse": "bin/esparse.js",
|
29
|
+
"esvalidate": "bin/esvalidate.js"
|
30
|
+
},
|
31
|
+
"engines": {
|
32
|
+
"node": ">=4"
|
33
|
+
}
|
34
|
+
},
|
35
|
+
"node_modules/inflect": {
|
36
|
+
"version": "0.3.0",
|
37
|
+
"resolved": "https://registry.npmjs.org/inflect/-/inflect-0.3.0.tgz",
|
38
|
+
"integrity": "sha1-gdDqqja1CmAjC3UQBIs5xBQv5So=",
|
39
|
+
"dev": true,
|
40
|
+
"engines": {
|
41
|
+
"node": ">=0.4"
|
42
|
+
}
|
43
|
+
},
|
44
|
+
"node_modules/js-yaml": {
|
45
|
+
"version": "3.14.1",
|
46
|
+
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
|
47
|
+
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
|
48
|
+
"dev": true,
|
49
|
+
"dependencies": {
|
50
|
+
"argparse": "^1.0.7",
|
51
|
+
"esprima": "^4.0.0"
|
52
|
+
},
|
53
|
+
"bin": {
|
54
|
+
"js-yaml": "bin/js-yaml.js"
|
55
|
+
}
|
56
|
+
},
|
57
|
+
"node_modules/lodash": {
|
58
|
+
"version": "4.17.21",
|
59
|
+
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
60
|
+
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
61
|
+
"dev": true
|
62
|
+
},
|
63
|
+
"node_modules/sprintf-js": {
|
64
|
+
"version": "1.0.3",
|
65
|
+
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
66
|
+
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
|
67
|
+
"dev": true
|
68
|
+
}
|
69
|
+
},
|
70
|
+
"dependencies": {
|
71
|
+
"argparse": {
|
72
|
+
"version": "1.0.10",
|
73
|
+
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
74
|
+
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
75
|
+
"dev": true,
|
76
|
+
"requires": {
|
77
|
+
"sprintf-js": "~1.0.2"
|
78
|
+
}
|
79
|
+
},
|
80
|
+
"esprima": {
|
81
|
+
"version": "4.0.1",
|
82
|
+
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
83
|
+
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
|
84
|
+
"dev": true
|
85
|
+
},
|
86
|
+
"inflect": {
|
87
|
+
"version": "0.3.0",
|
88
|
+
"resolved": "https://registry.npmjs.org/inflect/-/inflect-0.3.0.tgz",
|
89
|
+
"integrity": "sha1-gdDqqja1CmAjC3UQBIs5xBQv5So=",
|
90
|
+
"dev": true
|
91
|
+
},
|
92
|
+
"js-yaml": {
|
93
|
+
"version": "3.14.1",
|
94
|
+
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
|
95
|
+
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
|
96
|
+
"dev": true,
|
97
|
+
"requires": {
|
98
|
+
"argparse": "^1.0.7",
|
99
|
+
"esprima": "^4.0.0"
|
100
|
+
}
|
101
|
+
},
|
102
|
+
"lodash": {
|
103
|
+
"version": "4.17.21",
|
104
|
+
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
105
|
+
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
106
|
+
"dev": true
|
107
|
+
},
|
108
|
+
"sprintf-js": {
|
109
|
+
"version": "1.0.3",
|
110
|
+
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
111
|
+
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
|
112
|
+
"dev": true
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
auditlogapi:
|
2
|
+
get_audit_log_events: >-
|
3
|
+
require 'asana'
|
4
|
+
|
5
|
+
|
6
|
+
client = Asana::Client.new do |c|
|
7
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
result = client.audit_log_api.get_audit_log_events(workspace_gid: 'workspace_gid', param: "value", param: "value", options: {pretty: true})
|
@@ -0,0 +1,161 @@
|
|
1
|
+
goals:
|
2
|
+
add_followers: >-
|
3
|
+
require 'asana'
|
4
|
+
|
5
|
+
|
6
|
+
client = Asana::Client.new do |c|
|
7
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
result = client.goals.add_followers(field: "value", field: "value", options: {pretty: true})
|
12
|
+
add_subgoal: >-
|
13
|
+
require 'asana'
|
14
|
+
|
15
|
+
|
16
|
+
client = Asana::Client.new do |c|
|
17
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
result = client.goals.add_subgoal(field: "value", field: "value", options: {pretty: true})
|
22
|
+
add_supporting_work_for_goal: >-
|
23
|
+
require 'asana'
|
24
|
+
|
25
|
+
|
26
|
+
client = Asana::Client.new do |c|
|
27
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
result = client.goals.add_supporting_work_for_goal(field: "value", field: "value", options: {pretty: true})
|
32
|
+
create_goal: >-
|
33
|
+
require 'asana'
|
34
|
+
|
35
|
+
|
36
|
+
client = Asana::Client.new do |c|
|
37
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
result = client.goals.create_goal(field: "value", field: "value", options: {pretty: true})
|
42
|
+
create_goal_metric: >-
|
43
|
+
require 'asana'
|
44
|
+
|
45
|
+
|
46
|
+
client = Asana::Client.new do |c|
|
47
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
result = client.goals.create_goal_metric(field: "value", field: "value", options: {pretty: true})
|
52
|
+
delete_goal: >-
|
53
|
+
require 'asana'
|
54
|
+
|
55
|
+
|
56
|
+
client = Asana::Client.new do |c|
|
57
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
result = client.goals.delete_goal(goal_gid: 'goal_gid', options: {pretty: true})
|
62
|
+
get_goal: >-
|
63
|
+
require 'asana'
|
64
|
+
|
65
|
+
|
66
|
+
client = Asana::Client.new do |c|
|
67
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
68
|
+
end
|
69
|
+
|
70
|
+
|
71
|
+
result = client.goals.get_goal(goal_gid: 'goal_gid', param: "value", param: "value", options: {pretty: true})
|
72
|
+
get_goals: >-
|
73
|
+
require 'asana'
|
74
|
+
|
75
|
+
|
76
|
+
client = Asana::Client.new do |c|
|
77
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
result = client.goals.get_goals(param: "value", param: "value", options: {pretty: true})
|
82
|
+
get_parent_goals_for_goal: >-
|
83
|
+
require 'asana'
|
84
|
+
|
85
|
+
|
86
|
+
client = Asana::Client.new do |c|
|
87
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
88
|
+
end
|
89
|
+
|
90
|
+
|
91
|
+
result = client.goals.get_parent_goals_for_goal(param: "value", param: "value", options: {pretty: true})
|
92
|
+
get_subgoals_for_goal: >-
|
93
|
+
require 'asana'
|
94
|
+
|
95
|
+
|
96
|
+
client = Asana::Client.new do |c|
|
97
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
98
|
+
end
|
99
|
+
|
100
|
+
|
101
|
+
result = client.goals.get_subgoals_for_goal(param: "value", param: "value", options: {pretty: true})
|
102
|
+
remove_followers: >-
|
103
|
+
require 'asana'
|
104
|
+
|
105
|
+
|
106
|
+
client = Asana::Client.new do |c|
|
107
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
108
|
+
end
|
109
|
+
|
110
|
+
|
111
|
+
result = client.goals.remove_followers(field: "value", field: "value", options: {pretty: true})
|
112
|
+
remove_subgoal: >-
|
113
|
+
require 'asana'
|
114
|
+
|
115
|
+
|
116
|
+
client = Asana::Client.new do |c|
|
117
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
118
|
+
end
|
119
|
+
|
120
|
+
|
121
|
+
result = client.goals.remove_subgoal(field: "value", field: "value", options: {pretty: true})
|
122
|
+
remove_supporting_work_for_goal: >-
|
123
|
+
require 'asana'
|
124
|
+
|
125
|
+
|
126
|
+
client = Asana::Client.new do |c|
|
127
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
128
|
+
end
|
129
|
+
|
130
|
+
|
131
|
+
result = client.goals.remove_supporting_work_for_goal(field: "value", field: "value", options: {pretty: true})
|
132
|
+
supporting_work: >-
|
133
|
+
require 'asana'
|
134
|
+
|
135
|
+
|
136
|
+
client = Asana::Client.new do |c|
|
137
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
138
|
+
end
|
139
|
+
|
140
|
+
|
141
|
+
result = client.goals.supporting_work(param: "value", param: "value", options: {pretty: true})
|
142
|
+
update_goal: >-
|
143
|
+
require 'asana'
|
144
|
+
|
145
|
+
|
146
|
+
client = Asana::Client.new do |c|
|
147
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
148
|
+
end
|
149
|
+
|
150
|
+
|
151
|
+
result = client.goals.update_goal(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
152
|
+
update_goal_metric: >-
|
153
|
+
require 'asana'
|
154
|
+
|
155
|
+
|
156
|
+
client = Asana::Client.new do |c|
|
157
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
158
|
+
end
|
159
|
+
|
160
|
+
|
161
|
+
result = client.goals.update_goal_metric(field: "value", field: "value", options: {pretty: true})
|
@@ -0,0 +1,41 @@
|
|
1
|
+
projectbriefs:
|
2
|
+
create_project_brief: >-
|
3
|
+
require 'asana'
|
4
|
+
|
5
|
+
|
6
|
+
client = Asana::Client.new do |c|
|
7
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
result = client.project_briefs.create_project_brief(project_gid: 'project_gid', field: "value", field: "value", options: {pretty: true})
|
12
|
+
delete_project_brief: >-
|
13
|
+
require 'asana'
|
14
|
+
|
15
|
+
|
16
|
+
client = Asana::Client.new do |c|
|
17
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
result = client.project_briefs.delete_project_brief(project_brief_gid: 'project_brief_gid', options: {pretty: true})
|
22
|
+
get_project_brief: >-
|
23
|
+
require 'asana'
|
24
|
+
|
25
|
+
|
26
|
+
client = Asana::Client.new do |c|
|
27
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
result = client.project_briefs.get_project_brief(project_brief_gid: 'project_brief_gid', param: "value", param: "value", options: {pretty: true})
|
32
|
+
update_project_brief: >-
|
33
|
+
require 'asana'
|
34
|
+
|
35
|
+
|
36
|
+
client = Asana::Client.new do |c|
|
37
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
result = client.project_briefs.update_project_brief(project_brief_gid: 'project_brief_gid', field: "value", field: "value", options: {pretty: true})
|
@@ -0,0 +1,41 @@
|
|
1
|
+
projecttemplates:
|
2
|
+
get_project_template: >-
|
3
|
+
require 'asana'
|
4
|
+
|
5
|
+
|
6
|
+
client = Asana::Client.new do |c|
|
7
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
result = client.project_templates.get_project_template(project_template_gid: 'project_template_gid', param: "value", param: "value", options: {pretty: true})
|
12
|
+
get_project_templates: >-
|
13
|
+
require 'asana'
|
14
|
+
|
15
|
+
|
16
|
+
client = Asana::Client.new do |c|
|
17
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
result = client.project_templates.get_project_templates(param: "value", param: "value", options: {pretty: true})
|
22
|
+
get_project_templates_for_team: >-
|
23
|
+
require 'asana'
|
24
|
+
|
25
|
+
|
26
|
+
client = Asana::Client.new do |c|
|
27
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
result = client.project_templates.get_project_templates_for_team(team_gid: 'team_gid', param: "value", param: "value", options: {pretty: true})
|
32
|
+
instantiate_project: >-
|
33
|
+
require 'asana'
|
34
|
+
|
35
|
+
|
36
|
+
client = Asana::Client.new do |c|
|
37
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
result = client.project_templates.instantiate_project(project_template_gid: 'project_template_gid', field: "value", field: "value", options: {pretty: true})
|
@@ -139,6 +139,16 @@ projects:
|
|
139
139
|
|
140
140
|
|
141
141
|
result = client.projects.get_task_counts_for_project(project_gid: 'project_gid', param: "value", param: "value", options: {pretty: true})
|
142
|
+
project_save_as_template: >-
|
143
|
+
require 'asana'
|
144
|
+
|
145
|
+
|
146
|
+
client = Asana::Client.new do |c|
|
147
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
148
|
+
end
|
149
|
+
|
150
|
+
|
151
|
+
result = client.projects.project_save_as_template(project_gid: 'project_gid', field: "value", field: "value", options: {pretty: true})
|
142
152
|
remove_custom_field_setting_for_project: >-
|
143
153
|
require 'asana'
|
144
154
|
|
@@ -0,0 +1,41 @@
|
|
1
|
+
statusupdates:
|
2
|
+
create_status_for_object: >-
|
3
|
+
require 'asana'
|
4
|
+
|
5
|
+
|
6
|
+
client = Asana::Client.new do |c|
|
7
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
result = client.status_updates.create_status_for_object(field: "value", field: "value", options: {pretty: true})
|
12
|
+
delete_status: >-
|
13
|
+
require 'asana'
|
14
|
+
|
15
|
+
|
16
|
+
client = Asana::Client.new do |c|
|
17
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
result = client.status_updates.delete_status(status_gid: 'status_gid', options: {pretty: true})
|
22
|
+
get_status: >-
|
23
|
+
require 'asana'
|
24
|
+
|
25
|
+
|
26
|
+
client = Asana::Client.new do |c|
|
27
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
result = client.status_updates.get_status(status_gid: 'status_gid', param: "value", param: "value", options: {pretty: true})
|
32
|
+
get_statuses_for_object: >-
|
33
|
+
require 'asana'
|
34
|
+
|
35
|
+
|
36
|
+
client = Asana::Client.new do |c|
|
37
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
result = client.status_updates.get_statuses_for_object(parent: ''parent_example'', param: "value", param: "value", options: {pretty: true})
|
data/samples/teams_sample.yaml
CHANGED
@@ -9,6 +9,16 @@ teams:
|
|
9
9
|
|
10
10
|
|
11
11
|
result = client.teams.add_user_for_team(team_gid: 'team_gid', field: "value", field: "value", options: {pretty: true})
|
12
|
+
create_team: >-
|
13
|
+
require 'asana'
|
14
|
+
|
15
|
+
|
16
|
+
client = Asana::Client.new do |c|
|
17
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
result = client.teams.create_team(field: "value", field: "value", options: {pretty: true})
|
12
22
|
get_team: >-
|
13
23
|
require 'asana'
|
14
24
|
|
@@ -0,0 +1,21 @@
|
|
1
|
+
timeperiods:
|
2
|
+
get_time_period: >-
|
3
|
+
require 'asana'
|
4
|
+
|
5
|
+
|
6
|
+
client = Asana::Client.new do |c|
|
7
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
result = client.time_periods.get_time_period(time_period_gid: 'time_period_gid', param: "value", param: "value", options: {pretty: true})
|
12
|
+
get_time_periods: >-
|
13
|
+
require 'asana'
|
14
|
+
|
15
|
+
|
16
|
+
client = Asana::Client.new do |c|
|
17
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
result = client.time_periods.get_time_periods(workspace: ''workspace_example'', param: "value", param: "value", options: {pretty: true})
|
@@ -39,3 +39,13 @@ webhooks:
|
|
39
39
|
|
40
40
|
|
41
41
|
result = client.webhooks.get_webhooks(workspace: ''workspace_example'', param: "value", param: "value", options: {pretty: true})
|
42
|
+
update_webhook: >-
|
43
|
+
require 'asana'
|
44
|
+
|
45
|
+
|
46
|
+
client = Asana::Client.new do |c|
|
47
|
+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
result = client.webhooks.update_webhook(webhook_gid: 'webhook_gid', field: "value", field: "value", options: {pretty: true})
|