asana 1.0.0 → 2.0.1
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 +1 -1
- data/.ruby-version +1 -1
- data/Appraisals +6 -2
- data/Gemfile +2 -0
- data/Gemfile.lock +38 -56
- data/README.md +21 -11
- data/VERSION +1 -1
- data/asana.gemspec +4 -4
- 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 +2 -1
- data/lib/asana/authentication/oauth2/bearer_token_authentication.rb +1 -2
- data/lib/asana/authentication/token_authentication.rb +1 -1
- data/lib/asana/http_client/error_handling.rb +1 -3
- data/lib/asana/http_client.rb +8 -5
- data/lib/asana/resource_includes/attachment_uploading.rb +4 -2
- data/lib/asana/resources/gen/attachments_base.rb +1 -1
- data/lib/asana/resources/gen/goal_relationships_base.rb +83 -0
- data/lib/asana/resources/gen/goals_base.rb +0 -76
- data/lib/asana/resources/gen/portfolios_base.rb +3 -3
- data/lib/asana/resources/gen/projects_base.rb +4 -4
- data/lib/asana/resources/gen/tasks_base.rb +5 -5
- data/lib/asana/resources/gen/teams_base.rb +14 -0
- data/lib/asana/resources/gen/typeahead_base.rb +1 -1
- data/lib/asana/version.rb +1 -1
- data/samples/attachments_sample.yaml +2 -2
- data/samples/goal_relationships_sample.yaml +51 -0
- data/samples/goals_sample.yaml +0 -60
- data/samples/teams_sample.yaml +10 -0
- metadata +18 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c78f9f4dcaa8199ba6ba6422dc0691255e5c2f27688b2a4dd0a25839dc18d1e
|
4
|
+
data.tar.gz: 8bc1e52ce2cf1644a96e6d7a57a1d01e894e299d1af3c9dc6dbc1550015fe17b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8a8b9ab41a2587fe635037c180c6c68e945e5cab02f260c8d171cd8915247f5ea0195c24245ab59861a8d165f462acaf8cc8daaec6b59d965eedce338ba3416
|
7
|
+
data.tar.gz: 155604a2b12f2962685b5ebd35319ef19e5cc9b01d71bfb4fcbdf687b19623d0ba038853897011e9ade58c40e3611fac1307bf4f2937d6114517912636ad383e
|
data/.github/workflows/build.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.7.6
|
data/Appraisals
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
asana (
|
5
|
-
faraday (~>
|
6
|
-
|
7
|
-
|
4
|
+
asana (2.0.1)
|
5
|
+
faraday (~> 2.0)
|
6
|
+
faraday-follow_redirects
|
7
|
+
faraday-multipart
|
8
8
|
oauth2 (>= 1.4, < 3)
|
9
9
|
|
10
10
|
GEM
|
@@ -19,34 +19,14 @@ GEM
|
|
19
19
|
coderay (1.1.3)
|
20
20
|
diff-lcs (1.5.0)
|
21
21
|
docile (1.4.0)
|
22
|
-
faraday (
|
23
|
-
faraday-
|
24
|
-
faraday-em_synchrony (~> 1.0)
|
25
|
-
faraday-excon (~> 1.1)
|
26
|
-
faraday-httpclient (~> 1.0)
|
27
|
-
faraday-multipart (~> 1.0)
|
28
|
-
faraday-net_http (~> 1.0)
|
29
|
-
faraday-net_http_persistent (~> 1.0)
|
30
|
-
faraday-patron (~> 1.0)
|
31
|
-
faraday-rack (~> 1.0)
|
32
|
-
faraday-retry (~> 1.0)
|
22
|
+
faraday (2.7.4)
|
23
|
+
faraday-net_http (>= 2.0, < 3.1)
|
33
24
|
ruby2_keywords (>= 0.0.4)
|
34
|
-
faraday-
|
35
|
-
|
36
|
-
faraday-excon (1.1.0)
|
37
|
-
faraday-httpclient (1.0.1)
|
25
|
+
faraday-follow_redirects (0.3.0)
|
26
|
+
faraday (>= 1, < 3)
|
38
27
|
faraday-multipart (1.0.4)
|
39
28
|
multipart-post (~> 2)
|
40
|
-
faraday-net_http (
|
41
|
-
faraday-net_http_persistent (1.2.0)
|
42
|
-
faraday-patron (1.0.0)
|
43
|
-
faraday-rack (1.0.0)
|
44
|
-
faraday-retry (1.0.3)
|
45
|
-
faraday_middleware (1.2.0)
|
46
|
-
faraday (~> 1.0)
|
47
|
-
faraday_middleware-multi_json (0.0.6)
|
48
|
-
faraday_middleware
|
49
|
-
multi_json
|
29
|
+
faraday-net_http (3.0.2)
|
50
30
|
ffi (1.15.5)
|
51
31
|
formatador (1.1.0)
|
52
32
|
guard (2.18.0)
|
@@ -70,56 +50,53 @@ GEM
|
|
70
50
|
guard (>= 1.1.0)
|
71
51
|
yard (>= 0.7.0)
|
72
52
|
hashie (5.0.0)
|
73
|
-
jwt (2.
|
74
|
-
listen (3.
|
53
|
+
jwt (2.7.0)
|
54
|
+
listen (3.8.0)
|
75
55
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
76
56
|
rb-inotify (~> 0.9, >= 0.9.10)
|
77
57
|
lumberjack (1.2.8)
|
78
58
|
method_source (1.0.0)
|
79
|
-
multi_json (1.15.0)
|
80
59
|
multi_xml (0.6.0)
|
81
|
-
multipart-post (2.
|
60
|
+
multipart-post (2.3.0)
|
82
61
|
nenv (0.3.0)
|
83
62
|
notiffany (0.1.3)
|
84
63
|
nenv (~> 0.1)
|
85
64
|
shellany (~> 0.0)
|
86
|
-
oauth2 (2.0.
|
65
|
+
oauth2 (2.0.9)
|
87
66
|
faraday (>= 0.17.3, < 3.0)
|
88
67
|
jwt (>= 1.0, < 3.0)
|
89
68
|
multi_xml (~> 0.5)
|
90
|
-
rack (>= 1.2, <
|
91
|
-
|
92
|
-
version_gem (~> 1.
|
69
|
+
rack (>= 1.2, < 4)
|
70
|
+
snaky_hash (~> 2.0)
|
71
|
+
version_gem (~> 1.1)
|
93
72
|
parallel (1.22.1)
|
94
73
|
parser (2.7.2.0)
|
95
74
|
ast (~> 2.4.1)
|
96
75
|
powerpack (0.1.3)
|
97
|
-
pry (0.14.
|
76
|
+
pry (0.14.2)
|
98
77
|
coderay (~> 1.1)
|
99
78
|
method_source (~> 1.0)
|
100
|
-
rack (
|
79
|
+
rack (3.0.4.2)
|
101
80
|
rack-protection (1.5.5)
|
102
81
|
rack
|
103
82
|
rainbow (3.1.1)
|
104
83
|
rake (13.0.6)
|
105
|
-
|
106
|
-
hashie (>= 3.4)
|
107
|
-
rb-fsevent (0.11.1)
|
84
|
+
rb-fsevent (0.11.2)
|
108
85
|
rb-inotify (0.10.1)
|
109
86
|
ffi (~> 1.0)
|
110
|
-
rspec (3.
|
111
|
-
rspec-core (~> 3.
|
112
|
-
rspec-expectations (~> 3.
|
113
|
-
rspec-mocks (~> 3.
|
114
|
-
rspec-core (3.
|
115
|
-
rspec-support (~> 3.
|
116
|
-
rspec-expectations (3.
|
87
|
+
rspec (3.12.0)
|
88
|
+
rspec-core (~> 3.12.0)
|
89
|
+
rspec-expectations (~> 3.12.0)
|
90
|
+
rspec-mocks (~> 3.12.0)
|
91
|
+
rspec-core (3.12.1)
|
92
|
+
rspec-support (~> 3.12.0)
|
93
|
+
rspec-expectations (3.12.2)
|
117
94
|
diff-lcs (>= 1.2.0, < 2.0)
|
118
|
-
rspec-support (~> 3.
|
119
|
-
rspec-mocks (3.
|
95
|
+
rspec-support (~> 3.12.0)
|
96
|
+
rspec-mocks (3.12.3)
|
120
97
|
diff-lcs (>= 1.2.0, < 2.0)
|
121
|
-
rspec-support (~> 3.
|
122
|
-
rspec-support (3.
|
98
|
+
rspec-support (~> 3.12.0)
|
99
|
+
rspec-support (3.12.0)
|
123
100
|
rubocop (0.52.1)
|
124
101
|
parallel (~> 1.10)
|
125
102
|
parser (>= 2.4.0.2, < 3.0)
|
@@ -129,19 +106,22 @@ GEM
|
|
129
106
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
130
107
|
rubocop-rspec (1.22.2)
|
131
108
|
rubocop (>= 0.52.1)
|
132
|
-
ruby-progressbar (1.
|
109
|
+
ruby-progressbar (1.13.0)
|
133
110
|
ruby2_keywords (0.0.5)
|
134
111
|
shellany (0.0.1)
|
135
|
-
simplecov (0.
|
112
|
+
simplecov (0.22.0)
|
136
113
|
docile (~> 1.1)
|
137
114
|
simplecov-html (~> 0.11)
|
138
115
|
simplecov_json_formatter (~> 0.1)
|
139
116
|
simplecov-html (0.12.3)
|
140
117
|
simplecov_json_formatter (0.1.4)
|
118
|
+
snaky_hash (2.0.1)
|
119
|
+
hashie
|
120
|
+
version_gem (~> 1.1, >= 1.1.1)
|
141
121
|
thor (1.2.1)
|
142
122
|
tomparse (0.4.2)
|
143
123
|
unicode-display_width (1.8.0)
|
144
|
-
version_gem (1.1.
|
124
|
+
version_gem (1.1.1)
|
145
125
|
webrick (1.7.0)
|
146
126
|
yard (0.9.28)
|
147
127
|
webrick (~> 1.7.0)
|
@@ -150,6 +130,7 @@ GEM
|
|
150
130
|
yard
|
151
131
|
|
152
132
|
PLATFORMS
|
133
|
+
ruby
|
153
134
|
universal-darwin-21
|
154
135
|
x86_64-linux
|
155
136
|
|
@@ -161,6 +142,7 @@ DEPENDENCIES
|
|
161
142
|
guard-rspec
|
162
143
|
guard-rubocop
|
163
144
|
guard-yard
|
145
|
+
oauth2 (~> 2.0.3)
|
164
146
|
rack-protection (= 1.5.5)
|
165
147
|
rake (~> 13.0)
|
166
148
|
rspec (~> 3.2)
|
data/README.md
CHANGED
@@ -41,7 +41,7 @@ client = Asana::Client.new do |c|
|
|
41
41
|
c.authentication :access_token, 'personal_access_token'
|
42
42
|
end
|
43
43
|
|
44
|
-
client.workspaces.
|
44
|
+
client.workspaces.get_workspaces.first
|
45
45
|
```
|
46
46
|
|
47
47
|
A full-blown customized client using OAuth2 wih a previously obtained refresh
|
@@ -61,7 +61,7 @@ client = Asana::Client.new do |c|
|
|
61
61
|
c.configure_faraday { |conn| conn.use SomeFaradayMiddleware }
|
62
62
|
end
|
63
63
|
|
64
|
-
workspace = client.workspaces.
|
64
|
+
workspace = client.workspaces.get_workspace(12)
|
65
65
|
workspace.users
|
66
66
|
# => #<Asana::Collection<User> ...>
|
67
67
|
client.tags.create_in_workspace(workspace: workspace.id, name: 'foo')
|
@@ -152,7 +152,7 @@ client = Asana::Client.new do |c|
|
|
152
152
|
c.authentication :oauth2, access_token
|
153
153
|
end
|
154
154
|
|
155
|
-
client.tasks.
|
155
|
+
client.tasks.get_task(12)
|
156
156
|
```
|
157
157
|
|
158
158
|
This will print an authorization URL on STDOUT, and block until you paste in the
|
@@ -166,7 +166,7 @@ results per page to fetch, between 1 and 100. If you don't provide any, it
|
|
166
166
|
defaults to 20.
|
167
167
|
|
168
168
|
```ruby
|
169
|
-
my_tasks = client.tasks.
|
169
|
+
my_tasks = client.tasks.get_tasks_for_tag(tag: tag_id, per_page: 5)
|
170
170
|
# => #<Asana::Collection<Task> ...>
|
171
171
|
```
|
172
172
|
|
@@ -226,7 +226,7 @@ All requests (except `DELETE`) accept extra I/O options
|
|
226
226
|
request:
|
227
227
|
|
228
228
|
```ruby
|
229
|
-
client.tasks.
|
229
|
+
client.tasks.get_task(12, options: { expand: ['workspace'] })
|
230
230
|
```
|
231
231
|
|
232
232
|
### Attachment uploading
|
@@ -235,7 +235,7 @@ To attach a file to a task or a project, you just need its absolute path on your
|
|
235
235
|
filesystem and its MIME type, and the file will be uploaded for you:
|
236
236
|
|
237
237
|
```ruby
|
238
|
-
task = client.tasks.
|
238
|
+
task = client.tasks.get_task(12)
|
239
239
|
attachment = task.attach(filename: '/absolute/path/to/my/file.png',
|
240
240
|
mime: 'image/png')
|
241
241
|
attachment.name # => 'file.png'
|
@@ -247,7 +247,7 @@ To subscribe to an event stream of a task or a project, just call `#events` on
|
|
247
247
|
it:
|
248
248
|
|
249
249
|
```ruby
|
250
|
-
task = client.tasks.
|
250
|
+
task = client.tasks.get_task(12)
|
251
251
|
task.events # => #<Asana::Events ...>
|
252
252
|
|
253
253
|
# You can do the same with only the task id:
|
@@ -272,7 +272,7 @@ normal Ruby Enumerable. Read below to get some ideas.
|
|
272
272
|
|
273
273
|
```ruby
|
274
274
|
# Run this in another thread so that we don't block forever
|
275
|
-
events = client.tasks.
|
275
|
+
events = client.tasks.get_task(12).events(wait: 2)
|
276
276
|
Thread.new do
|
277
277
|
events.each do |event|
|
278
278
|
notify_someone "New event arrived! #{event}"
|
@@ -286,7 +286,7 @@ To do that we need to call `#lazy` on the `Events` instance, just like with any
|
|
286
286
|
other `Enumerable`.
|
287
287
|
|
288
288
|
```ruby
|
289
|
-
events = client.tasks.
|
289
|
+
events = client.tasks.get_task(12).events
|
290
290
|
only_change_events = events.lazy.select { |event| event.action == 'changed' }
|
291
291
|
Thread.new do
|
292
292
|
only_change_events.each do |event|
|
@@ -316,7 +316,7 @@ If you would rather suppress these warnings, you can set
|
|
316
316
|
|
317
317
|
## Development
|
318
318
|
|
319
|
-
You'll need Ruby 2.
|
319
|
+
You'll need Ruby 2.7+ and Node v0.10.26+ / NPM 1.4.3+ installed.
|
320
320
|
|
321
321
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
322
322
|
`bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -329,7 +329,17 @@ To install this gem onto your local machine, run `bundle exec rake install`.
|
|
329
329
|
|
330
330
|
## Releasing a new version
|
331
331
|
|
332
|
-
|
332
|
+
Prerequisite: Before deployment, make sure you have Ruby version `2.7` installed
|
333
|
+
|
334
|
+
### Automatic Deployment
|
335
|
+
|
336
|
+
First, install dependencies:
|
337
|
+
|
338
|
+
```
|
339
|
+
bundle install
|
340
|
+
```
|
341
|
+
|
342
|
+
Then, to release a new version, run one of these commands:
|
333
343
|
|
334
344
|
rake bump:patch
|
335
345
|
rake bump:minor
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2.0.1
|
data/asana.gemspec
CHANGED
@@ -19,12 +19,12 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.required_ruby_version = '>= 2.
|
22
|
+
spec.required_ruby_version = '>= 2.7'
|
23
23
|
|
24
24
|
spec.add_dependency "oauth2", ">= 1.4", '< 3'
|
25
|
-
spec.add_dependency "faraday", "~>
|
26
|
-
spec.add_dependency "
|
27
|
-
spec.add_dependency "
|
25
|
+
spec.add_dependency "faraday", "~> 2.0"
|
26
|
+
spec.add_dependency "faraday-follow_redirects"
|
27
|
+
spec.add_dependency "faraday-multipart"
|
28
28
|
|
29
29
|
spec.add_development_dependency "rake", "~> 13.0"
|
30
30
|
spec.add_development_dependency "rspec", "~> 3.2"
|
data/examples/cli_app.rb
CHANGED
@@ -17,9 +17,9 @@ client = Asana::Client.new do |c|
|
|
17
17
|
end
|
18
18
|
|
19
19
|
puts "My Workspaces:"
|
20
|
-
client.workspaces.
|
20
|
+
client.workspaces.get_workspaces.each do |workspace|
|
21
21
|
puts "\t* #{workspace.name} - tags:"
|
22
|
-
client.tags.
|
22
|
+
client.tags.get_tags_for_workspace(workspace: workspace.id).each do |tag|
|
23
23
|
puts "\t\t- #{tag.name}"
|
24
24
|
end
|
25
25
|
end
|
data/examples/events.rb
CHANGED
@@ -13,10 +13,10 @@ client = Asana::Client.new do |c|
|
|
13
13
|
c.authentication :access_token, access_token
|
14
14
|
end
|
15
15
|
|
16
|
-
workspace = client.workspaces.
|
17
|
-
task = client.tasks.
|
16
|
+
workspace = client.workspaces.get_workspaces.first
|
17
|
+
task = client.tasks.get_tasks(assignee: "me", workspace: workspace.id).first
|
18
18
|
unless task
|
19
|
-
task = client.tasks.
|
19
|
+
task = client.tasks.create_task(workspace: workspace.id, name: "Hello world!", assignee: "me")
|
20
20
|
end
|
21
21
|
|
22
22
|
Thread.abort_on_exception = true
|
@@ -13,9 +13,9 @@ client = Asana::Client.new do |c|
|
|
13
13
|
end
|
14
14
|
|
15
15
|
puts "My Workspaces:"
|
16
|
-
client.workspaces.
|
16
|
+
client.workspaces.get_workspaces.each do |workspace|
|
17
17
|
puts "\t* #{workspace.name} - tags:"
|
18
|
-
client.tags.
|
18
|
+
client.tags.get_tags_for_workspace(workspace: workspace.id).each do |tag|
|
19
19
|
puts "\t\t- #{tag.name}"
|
20
20
|
end
|
21
21
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'multi_json'
|
2
|
-
|
3
1
|
require_relative '../errors'
|
4
2
|
|
5
3
|
module Asana
|
@@ -112,7 +110,7 @@ module Asana
|
|
112
110
|
|
113
111
|
# Internal: Parser a response body from JSON.
|
114
112
|
def body(response)
|
115
|
-
|
113
|
+
JSON.load(response[:body])
|
116
114
|
end
|
117
115
|
|
118
116
|
def recover_response(response)
|
data/lib/asana/http_client.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'faraday'
|
2
|
-
require '
|
3
|
-
require 'faraday_middleware/multi_json'
|
2
|
+
require 'faraday/follow_redirects'
|
4
3
|
|
5
4
|
require_relative 'http_client/error_handling'
|
6
5
|
require_relative 'http_client/environment_info'
|
@@ -130,6 +129,7 @@ module Asana
|
|
130
129
|
yield builder if request_config
|
131
130
|
configure_format(builder)
|
132
131
|
add_middleware(builder)
|
132
|
+
configure_redirects(builder)
|
133
133
|
@config.call(builder) if @config
|
134
134
|
use_adapter(builder, @adapter)
|
135
135
|
end
|
@@ -147,13 +147,16 @@ module Asana
|
|
147
147
|
end
|
148
148
|
|
149
149
|
def configure_format(builder)
|
150
|
-
builder.request :
|
151
|
-
builder.response :
|
150
|
+
builder.request :json
|
151
|
+
builder.response :json
|
152
152
|
end
|
153
153
|
|
154
154
|
def add_middleware(builder)
|
155
155
|
builder.use Faraday::Response::RaiseError
|
156
|
-
|
156
|
+
end
|
157
|
+
|
158
|
+
def configure_redirects(builder)
|
159
|
+
builder.response :follow_redirects
|
157
160
|
end
|
158
161
|
|
159
162
|
def use_adapter(builder, adapter)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'faraday/multipart'
|
2
|
+
|
1
3
|
module Asana
|
2
4
|
module Resources
|
3
5
|
# Internal: Mixin to add the ability to upload an attachment to a specific
|
@@ -21,9 +23,9 @@ module Asana
|
|
21
23
|
path = File.expand_path(filename)
|
22
24
|
raise ArgumentError, "file #{filename} doesn't exist" unless File.exist?(path)
|
23
25
|
|
24
|
-
Faraday::FilePart.new(path, mime)
|
26
|
+
Faraday::Multipart::FilePart.new(path, mime)
|
25
27
|
else
|
26
|
-
Faraday::FilePart.new(io, mime, filename)
|
28
|
+
Faraday::Multipart::FilePart.new(io, mime, filename)
|
27
29
|
end
|
28
30
|
|
29
31
|
response = client.post("/#{self.class.plural_name}/#{gid}/attachments",
|
@@ -39,7 +39,7 @@ module Asana
|
|
39
39
|
# Get attachments from an object
|
40
40
|
#
|
41
41
|
|
42
|
-
# parent - [str] (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a task or project_brief.
|
42
|
+
# parent - [str] (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a task, project, or project_brief.
|
43
43
|
# options - [Hash] the request I/O options
|
44
44
|
# > 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.'
|
45
45
|
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
@@ -0,0 +1,83 @@
|
|
1
|
+
### WARNING: This file is auto-generated by our OpenAPI spec. Do not
|
2
|
+
### edit it manually.
|
3
|
+
|
4
|
+
require_relative '../../resource_includes/response_helper'
|
5
|
+
|
6
|
+
module Asana
|
7
|
+
module Resources
|
8
|
+
class GoalRelationshipsBase < Resource
|
9
|
+
|
10
|
+
def self.inherited(base)
|
11
|
+
Registry.register(base)
|
12
|
+
end
|
13
|
+
|
14
|
+
class << self
|
15
|
+
# Add a supporting goal relationship
|
16
|
+
#
|
17
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
18
|
+
# options - [Hash] the request I/O options
|
19
|
+
# > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
|
20
|
+
# > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
|
21
|
+
# data - [Hash] the attributes to POST
|
22
|
+
def add_supporting_relationship(client, goal_gid: required("goal_gid"), options: {}, **data)
|
23
|
+
path = "/goals/{goal_gid}/addSupportingRelationship"
|
24
|
+
path["{goal_gid}"] = goal_gid
|
25
|
+
parse(client.post(path, body: data, options: options)).first
|
26
|
+
end
|
27
|
+
|
28
|
+
# Get a goal relationship
|
29
|
+
#
|
30
|
+
# goal_relationship_gid - [str] (required) Globally unique identifier for the goal relationship.
|
31
|
+
# options - [Hash] the request I/O options
|
32
|
+
# > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
|
33
|
+
# > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
|
34
|
+
def get_goal_relationship(client, goal_relationship_gid: required("goal_relationship_gid"), options: {})
|
35
|
+
path = "/goal_relationships/{goal_relationship_gid}"
|
36
|
+
path["{goal_relationship_gid}"] = goal_relationship_gid
|
37
|
+
parse(client.get(path, options: options)).first
|
38
|
+
end
|
39
|
+
|
40
|
+
# Get goal relationships
|
41
|
+
#
|
42
|
+
|
43
|
+
# supported_goal - [str] (required) Globally unique identifier for the supported goal in the goal relationship.
|
44
|
+
# resource_subtype - [str] If provided, filter to goal relationships with a given resource_subtype.
|
45
|
+
# options - [Hash] the request I/O options
|
46
|
+
# > 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.
|
47
|
+
# > 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.
|
48
|
+
def get_goal_relationships(client, supported_goal: nil, resource_subtype: nil, options: {})
|
49
|
+
path = "/goal_relationships"
|
50
|
+
params = { supported_goal: supported_goal, resource_subtype: resource_subtype }.reject { |_,v| v.nil? || Array(v).empty? }
|
51
|
+
Collection.new(parse(client.get(path, params: params, options: options)), type: Resource, client: client)
|
52
|
+
end
|
53
|
+
|
54
|
+
# Removes a supporting goal relationship
|
55
|
+
#
|
56
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
57
|
+
# options - [Hash] the request I/O options
|
58
|
+
# > 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.
|
59
|
+
# > 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.
|
60
|
+
# data - [Hash] the attributes to POST
|
61
|
+
def remove_supporting_relationship(client, goal_gid: required("goal_gid"), options: {}, **data)
|
62
|
+
path = "/goals/{goal_gid}/removeSupportingRelationship"
|
63
|
+
path["{goal_gid}"] = goal_gid
|
64
|
+
parse(client.post(path, body: data, options: options)).first
|
65
|
+
end
|
66
|
+
|
67
|
+
# Update a goal relationship
|
68
|
+
#
|
69
|
+
# goal_relationship_gid - [str] (required) Globally unique identifier for the goal relationship.
|
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_goal_relationship(client, goal_relationship_gid: required("goal_relationship_gid"), options: {}, **data)
|
75
|
+
path = "/goal_relationships/{goal_relationship_gid}"
|
76
|
+
path["{goal_relationship_gid}"] = goal_relationship_gid
|
77
|
+
parse(client.put(path, body: data, options: options)).first
|
78
|
+
end
|
79
|
+
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -25,32 +25,6 @@ module Asana
|
|
25
25
|
parse(client.post(path, body: data, options: options)).first
|
26
26
|
end
|
27
27
|
|
28
|
-
# Add a subgoal to a parent goal
|
29
|
-
#
|
30
|
-
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
31
|
-
# options - [Hash] the request I/O options
|
32
|
-
# > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
|
33
|
-
# > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
|
34
|
-
# data - [Hash] the attributes to POST
|
35
|
-
def add_subgoal(client, goal_gid: required("goal_gid"), options: {}, **data)
|
36
|
-
path = "/goals/{goal_gid}/addSubgoal"
|
37
|
-
path["{goal_gid}"] = goal_gid
|
38
|
-
parse(client.post(path, body: data, options: options)).first
|
39
|
-
end
|
40
|
-
|
41
|
-
# Add a project/portfolio as supporting work for a goal.
|
42
|
-
#
|
43
|
-
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
44
|
-
# options - [Hash] the request I/O options
|
45
|
-
# > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
|
46
|
-
# > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
|
47
|
-
# data - [Hash] the attributes to POST
|
48
|
-
def add_supporting_work_for_goal(client, goal_gid: required("goal_gid"), options: {}, **data)
|
49
|
-
path = "/goals/{goal_gid}/addSupportingWork"
|
50
|
-
path["{goal_gid}"] = goal_gid
|
51
|
-
parse(client.post(path, body: data, options: options)).first
|
52
|
-
end
|
53
|
-
|
54
28
|
# Create a goal
|
55
29
|
#
|
56
30
|
|
@@ -134,18 +108,6 @@ module Asana
|
|
134
108
|
Collection.new(parse(client.get(path, options: options)), type: Resource, client: client)
|
135
109
|
end
|
136
110
|
|
137
|
-
# Get subgoals from a goal
|
138
|
-
#
|
139
|
-
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
140
|
-
# options - [Hash] the request I/O options
|
141
|
-
# > 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.
|
142
|
-
# > 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.
|
143
|
-
def get_subgoals_for_goal(client, goal_gid: required("goal_gid"), options: {})
|
144
|
-
path = "/goals/{goal_gid}/subgoals"
|
145
|
-
path["{goal_gid}"] = goal_gid
|
146
|
-
Collection.new(parse(client.get(path, options: options)), type: Resource, client: client)
|
147
|
-
end
|
148
|
-
|
149
111
|
# Remove a collaborator from a goal
|
150
112
|
#
|
151
113
|
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
@@ -159,44 +121,6 @@ module Asana
|
|
159
121
|
parse(client.post(path, body: data, options: options)).first
|
160
122
|
end
|
161
123
|
|
162
|
-
# Remove a subgoal from a goal
|
163
|
-
#
|
164
|
-
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
165
|
-
# options - [Hash] the request I/O options
|
166
|
-
# > 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.
|
167
|
-
# > 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
|
-
# data - [Hash] the attributes to POST
|
169
|
-
def remove_subgoal(client, goal_gid: required("goal_gid"), options: {}, **data)
|
170
|
-
path = "/goals/{goal_gid}/removeSubgoal"
|
171
|
-
path["{goal_gid}"] = goal_gid
|
172
|
-
parse(client.post(path, body: data, options: options)).first
|
173
|
-
end
|
174
|
-
|
175
|
-
# Remove a project/portfolio as supporting work for a goal.
|
176
|
-
#
|
177
|
-
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
178
|
-
# options - [Hash] the request I/O options
|
179
|
-
# > 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.
|
180
|
-
# > 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.
|
181
|
-
# data - [Hash] the attributes to POST
|
182
|
-
def remove_supporting_work_for_goal(client, goal_gid: required("goal_gid"), options: {}, **data)
|
183
|
-
path = "/goals/{goal_gid}/removeSupportingWork"
|
184
|
-
path["{goal_gid}"] = goal_gid
|
185
|
-
parse(client.post(path, body: data, options: options)).first
|
186
|
-
end
|
187
|
-
|
188
|
-
# Get supporting work from a goal
|
189
|
-
#
|
190
|
-
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
191
|
-
# options - [Hash] the request I/O options
|
192
|
-
# > 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.
|
193
|
-
# > 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.
|
194
|
-
def supporting_work(client, goal_gid: required("goal_gid"), options: {})
|
195
|
-
path = "/goals/{goal_gid}/supportingWork"
|
196
|
-
path["{goal_gid}"] = goal_gid
|
197
|
-
Collection.new(parse(client.get(path, options: options)), type: Project, client: client)
|
198
|
-
end
|
199
|
-
|
200
124
|
# Update a goal
|
201
125
|
#
|
202
126
|
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
@@ -21,7 +21,7 @@ module Asana
|
|
21
21
|
def add_custom_field_setting_for_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {}, **data)
|
22
22
|
path = "/portfolios/{portfolio_gid}/addCustomFieldSetting"
|
23
23
|
path["{portfolio_gid}"] = portfolio_gid
|
24
|
-
parse(client.post(path, body: data, options: options)).first
|
24
|
+
CustomFieldSetting.new(parse(client.post(path, body: data, options: options)).first, client: client)
|
25
25
|
end
|
26
26
|
|
27
27
|
# Add a portfolio item
|
@@ -47,7 +47,7 @@ module Asana
|
|
47
47
|
def add_members_for_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {}, **data)
|
48
48
|
path = "/portfolios/{portfolio_gid}/addMembers"
|
49
49
|
path["{portfolio_gid}"] = portfolio_gid
|
50
|
-
parse(client.post(path, body: data, options: options)).first
|
50
|
+
Portfolio.new(parse(client.post(path, body: data, options: options)).first, client: client)
|
51
51
|
end
|
52
52
|
|
53
53
|
# Create a portfolio
|
@@ -151,7 +151,7 @@ module Asana
|
|
151
151
|
def remove_members_for_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {}, **data)
|
152
152
|
path = "/portfolios/{portfolio_gid}/removeMembers"
|
153
153
|
path["{portfolio_gid}"] = portfolio_gid
|
154
|
-
parse(client.post(path, body: data, options: options)).first
|
154
|
+
Portfolio.new(parse(client.post(path, body: data, options: options)).first, client: client)
|
155
155
|
end
|
156
156
|
|
157
157
|
# Update a portfolio
|
@@ -34,7 +34,7 @@ module Asana
|
|
34
34
|
def add_followers_for_project(client, project_gid: required("project_gid"), options: {}, **data)
|
35
35
|
path = "/projects/{project_gid}/addFollowers"
|
36
36
|
path["{project_gid}"] = project_gid
|
37
|
-
parse(client.post(path, body: data, options: options)).first
|
37
|
+
Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
|
38
38
|
end
|
39
39
|
|
40
40
|
# Add users to a project
|
@@ -47,7 +47,7 @@ module Asana
|
|
47
47
|
def add_members_for_project(client, project_gid: required("project_gid"), options: {}, **data)
|
48
48
|
path = "/projects/{project_gid}/addMembers"
|
49
49
|
path["{project_gid}"] = project_gid
|
50
|
-
parse(client.post(path, body: data, options: options)).first
|
50
|
+
Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
|
51
51
|
end
|
52
52
|
|
53
53
|
# Create a project
|
@@ -237,7 +237,7 @@ module Asana
|
|
237
237
|
def remove_followers_for_project(client, project_gid: required("project_gid"), options: {}, **data)
|
238
238
|
path = "/projects/{project_gid}/removeFollowers"
|
239
239
|
path["{project_gid}"] = project_gid
|
240
|
-
parse(client.post(path, body: data, options: options)).first
|
240
|
+
Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
|
241
241
|
end
|
242
242
|
|
243
243
|
# Remove users from a project
|
@@ -250,7 +250,7 @@ module Asana
|
|
250
250
|
def remove_members_for_project(client, project_gid: required("project_gid"), options: {}, **data)
|
251
251
|
path = "/projects/{project_gid}/removeMembers"
|
252
252
|
path["{project_gid}"] = project_gid
|
253
|
-
parse(client.post(path, body: data, options: options)).first
|
253
|
+
Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
|
254
254
|
end
|
255
255
|
|
256
256
|
# Update a project
|
@@ -35,7 +35,7 @@ module Asana
|
|
35
35
|
def add_dependents_for_task(client, task_gid: required("task_gid"), options: {}, **data)
|
36
36
|
path = "/tasks/{task_gid}/addDependents"
|
37
37
|
path["{task_gid}"] = task_gid
|
38
|
-
|
38
|
+
parse(client.post(path, body: data, options: options)).first
|
39
39
|
end
|
40
40
|
|
41
41
|
# Add followers to a task
|
@@ -48,7 +48,7 @@ module Asana
|
|
48
48
|
def add_followers_for_task(client, task_gid: required("task_gid"), options: {}, **data)
|
49
49
|
path = "/tasks/{task_gid}/addFollowers"
|
50
50
|
path["{task_gid}"] = task_gid
|
51
|
-
parse(client.post(path, body: data, options: options)).first
|
51
|
+
Task.new(parse(client.post(path, body: data, options: options)).first, client: client)
|
52
52
|
end
|
53
53
|
|
54
54
|
# Add a project to a task
|
@@ -271,7 +271,7 @@ module Asana
|
|
271
271
|
def remove_dependencies_for_task(client, task_gid: required("task_gid"), options: {}, **data)
|
272
272
|
path = "/tasks/{task_gid}/removeDependencies"
|
273
273
|
path["{task_gid}"] = task_gid
|
274
|
-
|
274
|
+
parse(client.post(path, body: data, options: options)).first
|
275
275
|
end
|
276
276
|
|
277
277
|
# Unlink dependents from a task
|
@@ -284,7 +284,7 @@ module Asana
|
|
284
284
|
def remove_dependents_for_task(client, task_gid: required("task_gid"), options: {}, **data)
|
285
285
|
path = "/tasks/{task_gid}/removeDependents"
|
286
286
|
path["{task_gid}"] = task_gid
|
287
|
-
|
287
|
+
parse(client.post(path, body: data, options: options)).first
|
288
288
|
end
|
289
289
|
|
290
290
|
# Remove followers from a task
|
@@ -297,7 +297,7 @@ module Asana
|
|
297
297
|
def remove_follower_for_task(client, task_gid: required("task_gid"), options: {}, **data)
|
298
298
|
path = "/tasks/{task_gid}/removeFollowers"
|
299
299
|
path["{task_gid}"] = task_gid
|
300
|
-
parse(client.post(path, body: data, options: options)).first
|
300
|
+
Task.new(parse(client.post(path, body: data, options: options)).first, client: client)
|
301
301
|
end
|
302
302
|
|
303
303
|
# Remove a project from a task
|
@@ -96,6 +96,20 @@ module Asana
|
|
96
96
|
parse(client.post(path, body: data, options: options)).first
|
97
97
|
end
|
98
98
|
|
99
|
+
# Update a team
|
100
|
+
#
|
101
|
+
|
102
|
+
# options - [Hash] the request I/O options
|
103
|
+
# > 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.'
|
104
|
+
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
105
|
+
# > 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.
|
106
|
+
# > 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.
|
107
|
+
# data - [Hash] the attributes to PUT
|
108
|
+
def update_team(client, options: {}, **data)
|
109
|
+
path = "/teams"
|
110
|
+
Team.new(parse(client.put(path, body: data, options: options)).first, client: client)
|
111
|
+
end
|
112
|
+
|
99
113
|
end
|
100
114
|
end
|
101
115
|
end
|
@@ -17,7 +17,7 @@ module Asana
|
|
17
17
|
# workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
|
18
18
|
# resource_type - [str] (required) The type of values the typeahead should return. You can choose from one of the following: `custom_field`, `project`, `project_template`, `portfolio`, `tag`, `task`, and `user`. Note that unlike in the names of endpoints, the types listed here are in singular form (e.g. `task`). Using multiple types is not yet supported.
|
19
19
|
# type - [str] *Deprecated: new integrations should prefer the resource_type field.*
|
20
|
-
# query - [str] The string that will be used to search for relevant objects. If an empty string is passed in, the API will
|
20
|
+
# query - [str] The string that will be used to search for relevant objects. If an empty string is passed in, the API will return results.
|
21
21
|
# count - [int] The number of results to return. The default is 20 if this parameter is omitted, with a minimum of 1 and a maximum of 100. If there are fewer results found than requested, all will be returned.
|
22
22
|
# options - [Hash] the request I/O options
|
23
23
|
# > 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.
|
data/lib/asana/version.rb
CHANGED
@@ -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
|
|
@@ -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})
|
data/samples/goals_sample.yaml
CHANGED
@@ -9,26 +9,6 @@ goals:
|
|
9
9
|
|
10
10
|
|
11
11
|
result = client.goals.add_followers(goal_gid: 'goal_gid', 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(goal_gid: 'goal_gid', 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(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
32
12
|
create_goal: >-
|
33
13
|
require 'asana'
|
34
14
|
|
@@ -89,16 +69,6 @@ goals:
|
|
89
69
|
|
90
70
|
|
91
71
|
result = client.goals.get_parent_goals_for_goal(goal_gid: 'goal_gid', 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(goal_gid: 'goal_gid', param: "value", param: "value", options: {pretty: true})
|
102
72
|
remove_followers: >-
|
103
73
|
require 'asana'
|
104
74
|
|
@@ -109,36 +79,6 @@ goals:
|
|
109
79
|
|
110
80
|
|
111
81
|
result = client.goals.remove_followers(goal_gid: 'goal_gid', 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(goal_gid: 'goal_gid', 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(goal_gid: 'goal_gid', 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(goal_gid: 'goal_gid', param: "value", param: "value", options: {pretty: true})
|
142
82
|
update_goal: >-
|
143
83
|
require 'asana'
|
144
84
|
|
data/samples/teams_sample.yaml
CHANGED
@@ -59,3 +59,13 @@ teams:
|
|
59
59
|
|
60
60
|
|
61
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})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Txus
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|
@@ -36,42 +36,42 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '2.0'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '2.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: faraday-follow_redirects
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - "
|
51
|
+
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '0'
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- - "
|
58
|
+
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
60
|
+
version: '0'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
62
|
+
name: faraday-multipart
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - "
|
65
|
+
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0
|
67
|
+
version: '0'
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - "
|
72
|
+
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '0
|
74
|
+
version: '0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: rake
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -188,6 +188,7 @@ files:
|
|
188
188
|
- lib/asana/resources/gen/custom_field_settings_base.rb
|
189
189
|
- lib/asana/resources/gen/custom_fields_base.rb
|
190
190
|
- lib/asana/resources/gen/events_base.rb
|
191
|
+
- lib/asana/resources/gen/goal_relationships_base.rb
|
191
192
|
- lib/asana/resources/gen/goals_base.rb
|
192
193
|
- lib/asana/resources/gen/jobs_base.rb
|
193
194
|
- lib/asana/resources/gen/organization_exports_base.rb
|
@@ -243,6 +244,7 @@ files:
|
|
243
244
|
- samples/custom_field_settings_sample.yaml
|
244
245
|
- samples/custom_fields_sample.yaml
|
245
246
|
- samples/events_sample.yaml
|
247
|
+
- samples/goal_relationships_sample.yaml
|
246
248
|
- samples/goals_sample.yaml
|
247
249
|
- samples/jobs_sample.yaml
|
248
250
|
- samples/organization_exports_sample.yaml
|
@@ -282,14 +284,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
282
284
|
requirements:
|
283
285
|
- - ">="
|
284
286
|
- !ruby/object:Gem::Version
|
285
|
-
version: '2.
|
287
|
+
version: '2.7'
|
286
288
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
287
289
|
requirements:
|
288
290
|
- - ">="
|
289
291
|
- !ruby/object:Gem::Version
|
290
292
|
version: '0'
|
291
293
|
requirements: []
|
292
|
-
rubygems_version: 3.
|
294
|
+
rubygems_version: 3.3.5
|
293
295
|
signing_key:
|
294
296
|
specification_version: 4
|
295
297
|
summary: Official Ruby client for the Asana API
|