asana 0.10.3 → 2.0.3
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/.rubocop.yml +38 -3
- data/.ruby-version +1 -1
- data/Appraisals +8 -3
- data/Gemfile +7 -3
- data/Gemfile.lock +166 -0
- data/Guardfile +12 -10
- data/README.md +45 -20
- data/Rakefile +20 -27
- data/VERSION +1 -1
- data/asana.gemspec +20 -18
- data/examples/Gemfile.lock +2 -2
- data/examples/cli_app.rb +2 -2
- data/examples/events.rb +3 -3
- data/examples/personal_access_token.rb +2 -2
- data/lib/asana/authentication/oauth2/access_token_authentication.rb +4 -1
- data/lib/asana/authentication/oauth2/bearer_token_authentication.rb +3 -2
- data/lib/asana/authentication/oauth2/client.rb +2 -0
- data/lib/asana/authentication/oauth2.rb +6 -4
- data/lib/asana/authentication/token_authentication.rb +3 -1
- data/lib/asana/authentication.rb +2 -0
- data/lib/asana/client/configuration.rb +6 -5
- data/lib/asana/client.rb +13 -11
- data/lib/asana/errors.rb +16 -11
- data/lib/asana/http_client/environment_info.rb +9 -8
- data/lib/asana/http_client/error_handling.rb +26 -20
- data/lib/asana/http_client/response.rb +2 -0
- data/lib/asana/http_client.rb +66 -65
- data/lib/asana/resource_includes/attachment_uploading.rb +6 -6
- data/lib/asana/resource_includes/collection.rb +4 -4
- data/lib/asana/resource_includes/event.rb +2 -0
- data/lib/asana/resource_includes/event_subscription.rb +2 -0
- data/lib/asana/resource_includes/events.rb +4 -1
- data/lib/asana/resource_includes/registry.rb +2 -0
- data/lib/asana/resource_includes/resource.rb +8 -5
- data/lib/asana/resource_includes/response_helper.rb +2 -0
- data/lib/asana/resources/audit_log_api.rb +42 -0
- data/lib/asana/resources/gen/attachments_base.rb +7 -6
- data/lib/asana/resources/gen/audit_log_api_base.rb +37 -0
- data/lib/asana/resources/gen/goal_relationships_base.rb +83 -0
- data/lib/asana/resources/gen/goals_base.rb +153 -0
- data/lib/asana/resources/gen/memberships_base.rb +71 -0
- data/lib/asana/resources/gen/portfolios_base.rb +3 -3
- 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 +17 -4
- data/lib/asana/resources/gen/status_updates_base.rb +72 -0
- data/lib/asana/resources/gen/tasks_base.rb +13 -15
- data/lib/asana/resources/gen/teams_base.rb +41 -13
- data/lib/asana/resources/gen/time_periods_base.rb +47 -0
- data/lib/asana/resources/gen/typeahead_base.rb +2 -2
- data/lib/asana/resources/gen/users_base.rb +3 -4
- data/lib/asana/resources/gen/webhooks_base.rb +13 -0
- data/lib/asana/resources/gen/workspaces_base.rb +1 -1
- data/lib/asana/resources/goal.rb +54 -0
- data/lib/asana/resources/goal_relationship.rb +32 -0
- data/lib/asana/resources/membership.rb +20 -0
- data/lib/asana/resources/portfolio.rb +3 -3
- data/lib/asana/resources/project_brief.rb +30 -0
- data/lib/asana/resources/project_template.rb +36 -0
- data/lib/asana/resources/status_update.rb +54 -0
- data/lib/asana/resources/time_period.rb +30 -0
- data/lib/asana/resources/typeahead.rb +1 -1
- data/lib/asana/resources.rb +4 -4
- data/lib/asana/ruby2_0_0_compatibility.rb +2 -0
- data/lib/asana/version.rb +1 -1
- data/lib/asana.rb +2 -0
- data/package-lock.json +115 -0
- data/samples/attachments_sample.yaml +4 -4
- data/samples/audit_log_api_sample.yaml +11 -0
- data/samples/goal_relationships_sample.yaml +51 -0
- data/samples/goals_sample.yaml +101 -0
- data/samples/memberships_sample.yaml +41 -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 +24 -4
- data/samples/time_periods_sample.yaml +21 -0
- data/samples/webhooks_sample.yaml +10 -0
- metadata +75 -40
- data/.travis.yml +0 -16
data/lib/asana/resources.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'resource_includes/resource'
|
2
4
|
require_relative 'resource_includes/collection'
|
3
5
|
|
4
|
-
Dir[File.join(File.dirname(__FILE__), 'resource_includes', '*.rb')]
|
5
|
-
.each { |resource| require resource }
|
6
|
+
Dir[File.join(File.dirname(__FILE__), 'resource_includes', '*.rb')].sort.each { |resource| require resource }
|
6
7
|
|
7
|
-
Dir[File.join(File.dirname(__FILE__), 'resources', '*.rb')]
|
8
|
-
.each { |resource| require resource }
|
8
|
+
Dir[File.join(File.dirname(__FILE__), 'resources', '*.rb')].sort.each { |resource| require resource }
|
9
9
|
|
10
10
|
module Asana
|
11
11
|
# Public: Contains all the resources that the Asana API can return.
|
data/lib/asana/version.rb
CHANGED
data/lib/asana.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
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
attachments:
|
2
|
-
|
2
|
+
create_attachment_for_object: >-
|
3
3
|
require 'asana'
|
4
4
|
|
5
5
|
|
@@ -8,7 +8,7 @@ attachments:
|
|
8
8
|
end
|
9
9
|
|
10
10
|
|
11
|
-
result = client.attachments.
|
11
|
+
result = client.attachments.create_attachment_for_object(field: "value", field: "value", options: {pretty: true})
|
12
12
|
delete_attachment: >-
|
13
13
|
require 'asana'
|
14
14
|
|
@@ -29,7 +29,7 @@ attachments:
|
|
29
29
|
|
30
30
|
|
31
31
|
result = client.attachments.get_attachment(attachment_gid: 'attachment_gid', param: "value", param: "value", options: {pretty: true})
|
32
|
-
|
32
|
+
get_attachments_for_object: >-
|
33
33
|
require 'asana'
|
34
34
|
|
35
35
|
|
@@ -38,4 +38,4 @@ attachments:
|
|
38
38
|
end
|
39
39
|
|
40
40
|
|
41
|
-
result = client.attachments.
|
41
|
+
result = client.attachments.get_attachments_for_object(parent: ''parent_example'', param: "value", param: "value", options: {pretty: true})
|
@@ -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,51 @@
|
|
1
|
+
goalrelationships:
|
2
|
+
add_supporting_relationship: >-
|
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.goal_relationships.add_supporting_relationship(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
12
|
+
get_goal_relationship: >-
|
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.goal_relationships.get_goal_relationship(goal_relationship_gid: 'goal_relationship_gid', param: "value", param: "value", options: {pretty: true})
|
22
|
+
get_goal_relationships: >-
|
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.goal_relationships.get_goal_relationships(supported_goal: ''supported_goal_example'', param: "value", param: "value", options: {pretty: true})
|
32
|
+
remove_supporting_relationship: >-
|
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.goal_relationships.remove_supporting_relationship(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
42
|
+
update_goal_relationship: >-
|
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.goal_relationships.update_goal_relationship(goal_relationship_gid: 'goal_relationship_gid', field: "value", field: "value", options: {pretty: true})
|
@@ -0,0 +1,101 @@
|
|
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(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
12
|
+
create_goal: >-
|
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.create_goal(field: "value", field: "value", options: {pretty: true})
|
22
|
+
create_goal_metric: >-
|
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.create_goal_metric(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
32
|
+
delete_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.delete_goal(goal_gid: 'goal_gid', options: {pretty: true})
|
42
|
+
get_goal: >-
|
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.get_goal(goal_gid: 'goal_gid', param: "value", param: "value", options: {pretty: true})
|
52
|
+
get_goals: >-
|
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.get_goals(param: "value", param: "value", options: {pretty: true})
|
62
|
+
get_parent_goals_for_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_parent_goals_for_goal(goal_gid: 'goal_gid', param: "value", param: "value", options: {pretty: true})
|
72
|
+
remove_followers: >-
|
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.remove_followers(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
82
|
+
update_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.update_goal(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
92
|
+
update_goal_metric: >-
|
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.update_goal_metric(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
@@ -0,0 +1,41 @@
|
|
1
|
+
memberships:
|
2
|
+
create_membership: >-
|
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.memberships.create_membership(field: "value", field: "value", options: {pretty: true})
|
12
|
+
delete_membership: >-
|
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.memberships.delete_membership(membership_gid: 'membership_gid', options: {pretty: true})
|
22
|
+
get_memberships: >-
|
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.memberships.get_memberships(parent: ''parent_example'', param: "value", param: "value", options: {pretty: true})
|
32
|
+
update_membership: >-
|
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.memberships.update_membership(membership_gid: 'membership_gid', 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,7 +9,7 @@ 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
|
-
|
12
|
+
create_team: >-
|
13
13
|
require 'asana'
|
14
14
|
|
15
15
|
|
@@ -18,8 +18,8 @@ teams:
|
|
18
18
|
end
|
19
19
|
|
20
20
|
|
21
|
-
result = client.teams.
|
22
|
-
|
21
|
+
result = client.teams.create_team(field: "value", field: "value", options: {pretty: true})
|
22
|
+
get_team: >-
|
23
23
|
require 'asana'
|
24
24
|
|
25
25
|
|
@@ -28,7 +28,7 @@ teams:
|
|
28
28
|
end
|
29
29
|
|
30
30
|
|
31
|
-
result = client.teams.
|
31
|
+
result = client.teams.get_team(team_gid: 'team_gid', param: "value", param: "value", options: {pretty: true})
|
32
32
|
get_teams_for_user: >-
|
33
33
|
require 'asana'
|
34
34
|
|
@@ -39,6 +39,16 @@ teams:
|
|
39
39
|
|
40
40
|
|
41
41
|
result = client.teams.get_teams_for_user(user_gid: 'user_gid', organization: ''organization_example'', param: "value", param: "value", options: {pretty: true})
|
42
|
+
get_teams_for_workspace: >-
|
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.teams.get_teams_for_workspace(workspace_gid: 'workspace_gid', param: "value", param: "value", options: {pretty: true})
|
42
52
|
remove_user_for_team: >-
|
43
53
|
require 'asana'
|
44
54
|
|
@@ -49,3 +59,13 @@ teams:
|
|
49
59
|
|
50
60
|
|
51
61
|
result = client.teams.remove_user_for_team(team_gid: 'team_gid', field: "value", field: "value", options: {pretty: true})
|
62
|
+
update_team: >-
|
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.teams.update_team(field: "value", field: "value", options: {pretty: true})
|
@@ -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})
|