asana 0.10.3 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +24 -0
  3. data/.github/workflows/pubilsh-to-rubygem.yml +18 -0
  4. data/.github/workflows/publish-to-github-releases.yml +16 -0
  5. data/.gitignore +0 -1
  6. data/.rubocop.yml +38 -3
  7. data/.ruby-version +1 -1
  8. data/Appraisals +8 -3
  9. data/Gemfile +7 -3
  10. data/Gemfile.lock +166 -0
  11. data/Guardfile +12 -10
  12. data/README.md +45 -20
  13. data/Rakefile +20 -27
  14. data/VERSION +1 -1
  15. data/asana.gemspec +20 -18
  16. data/examples/Gemfile.lock +2 -2
  17. data/examples/cli_app.rb +2 -2
  18. data/examples/events.rb +3 -3
  19. data/examples/personal_access_token.rb +2 -2
  20. data/lib/asana/authentication/oauth2/access_token_authentication.rb +4 -1
  21. data/lib/asana/authentication/oauth2/bearer_token_authentication.rb +3 -2
  22. data/lib/asana/authentication/oauth2/client.rb +2 -0
  23. data/lib/asana/authentication/oauth2.rb +6 -4
  24. data/lib/asana/authentication/token_authentication.rb +3 -1
  25. data/lib/asana/authentication.rb +2 -0
  26. data/lib/asana/client/configuration.rb +6 -5
  27. data/lib/asana/client.rb +13 -11
  28. data/lib/asana/errors.rb +16 -11
  29. data/lib/asana/http_client/environment_info.rb +9 -8
  30. data/lib/asana/http_client/error_handling.rb +26 -20
  31. data/lib/asana/http_client/response.rb +2 -0
  32. data/lib/asana/http_client.rb +66 -65
  33. data/lib/asana/resource_includes/attachment_uploading.rb +6 -6
  34. data/lib/asana/resource_includes/collection.rb +4 -4
  35. data/lib/asana/resource_includes/event.rb +2 -0
  36. data/lib/asana/resource_includes/event_subscription.rb +2 -0
  37. data/lib/asana/resource_includes/events.rb +4 -1
  38. data/lib/asana/resource_includes/registry.rb +2 -0
  39. data/lib/asana/resource_includes/resource.rb +8 -5
  40. data/lib/asana/resource_includes/response_helper.rb +2 -0
  41. data/lib/asana/resources/audit_log_api.rb +42 -0
  42. data/lib/asana/resources/gen/attachments_base.rb +7 -6
  43. data/lib/asana/resources/gen/audit_log_api_base.rb +37 -0
  44. data/lib/asana/resources/gen/goal_relationships_base.rb +83 -0
  45. data/lib/asana/resources/gen/goals_base.rb +153 -0
  46. data/lib/asana/resources/gen/memberships_base.rb +71 -0
  47. data/lib/asana/resources/gen/portfolios_base.rb +3 -3
  48. data/lib/asana/resources/gen/project_briefs_base.rb +68 -0
  49. data/lib/asana/resources/gen/project_templates_base.rb +73 -0
  50. data/lib/asana/resources/gen/projects_base.rb +17 -4
  51. data/lib/asana/resources/gen/status_updates_base.rb +72 -0
  52. data/lib/asana/resources/gen/tasks_base.rb +13 -15
  53. data/lib/asana/resources/gen/teams_base.rb +41 -13
  54. data/lib/asana/resources/gen/time_periods_base.rb +47 -0
  55. data/lib/asana/resources/gen/typeahead_base.rb +2 -2
  56. data/lib/asana/resources/gen/users_base.rb +3 -4
  57. data/lib/asana/resources/gen/webhooks_base.rb +13 -0
  58. data/lib/asana/resources/gen/workspaces_base.rb +1 -1
  59. data/lib/asana/resources/goal.rb +54 -0
  60. data/lib/asana/resources/goal_relationship.rb +32 -0
  61. data/lib/asana/resources/membership.rb +20 -0
  62. data/lib/asana/resources/portfolio.rb +3 -3
  63. data/lib/asana/resources/project_brief.rb +30 -0
  64. data/lib/asana/resources/project_template.rb +36 -0
  65. data/lib/asana/resources/status_update.rb +54 -0
  66. data/lib/asana/resources/time_period.rb +30 -0
  67. data/lib/asana/resources/typeahead.rb +1 -1
  68. data/lib/asana/resources.rb +4 -4
  69. data/lib/asana/ruby2_0_0_compatibility.rb +2 -0
  70. data/lib/asana/version.rb +1 -1
  71. data/lib/asana.rb +2 -0
  72. data/package-lock.json +115 -0
  73. data/samples/attachments_sample.yaml +4 -4
  74. data/samples/audit_log_api_sample.yaml +11 -0
  75. data/samples/goal_relationships_sample.yaml +51 -0
  76. data/samples/goals_sample.yaml +101 -0
  77. data/samples/memberships_sample.yaml +41 -0
  78. data/samples/project_briefs_sample.yaml +41 -0
  79. data/samples/project_templates_sample.yaml +41 -0
  80. data/samples/projects_sample.yaml +10 -0
  81. data/samples/status_updates_sample.yaml +41 -0
  82. data/samples/teams_sample.yaml +24 -4
  83. data/samples/time_periods_sample.yaml +21 -0
  84. data/samples/webhooks_sample.yaml +10 -0
  85. metadata +75 -40
  86. data/.travis.yml +0 -16
@@ -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.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  def required(name)
2
4
  raise(ArgumentError, "#{name} is a required keyword argument")
3
5
  end
data/lib/asana/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #:nodoc:
2
2
  module Asana
3
3
  # Public: Version of the gem.
4
- VERSION = '0.10.3'
4
+ VERSION = '2.0.3'
5
5
  end
data/lib/asana.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'asana/ruby2_0_0_compatibility'
2
4
  require 'asana/authentication'
3
5
  require 'asana/resources'
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
- create_attachment_for_task: >-
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.create_attachment_for_task(task_gid: 'task_gid', field: "value", field: "value", options: {pretty: true})
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
- get_attachments_for_task: >-
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.get_attachments_for_task(task_gid: 'task_gid', param: "value", param: "value", options: {pretty: true})
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})
@@ -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
- get_team: >-
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.get_team(team_gid: 'team_gid', param: "value", param: "value", options: {pretty: true})
22
- get_teams_for_organization: >-
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.get_teams_for_organization(workspace_gid: 'workspace_gid', param: "value", param: "value", options: {pretty: true})
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})