99designs-tasks 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbf0100baf28dda312c57f1cfdca6ca21bc57db4
|
4
|
+
data.tar.gz: 05fd4f27e91a6e300b0bc0513fea0b48916fafbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 828bbea46a86571ccf39f5a3a142d8607d8c6ac86b33f63bef0bc9e1b36b882edcf0ac70cc5aac9fcee3fc49447a693dd534424ff78efb387c0abc99dd338c85
|
7
|
+
data.tar.gz: 100f1a5a9bb866c1e7b9d4c62d89931cd240f5db94e2e928bcd7626aa6affe1f12edc9ff160d4f058ad318761e79ecaa8ba734f09cc3302a95a515781d136ff8
|
@@ -18,7 +18,7 @@ module NinetyNine
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def create_task(body: nil, urls: [], filenames: [], webhook_url: nil)
|
21
|
-
response = request :post, "tasks", { body: body,
|
21
|
+
response = request :post, "tasks", { body: body, attachment: files(urls, filenames), webhook_url: webhook_url }
|
22
22
|
|
23
23
|
interpret_response(response)
|
24
24
|
end
|
@@ -36,7 +36,7 @@ module NinetyNine
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def attach_files(task_id, urls: [], filenames: [])
|
39
|
-
response = request :post, "tasks/#{task_id}/attachments", {
|
39
|
+
response = request :post, "tasks/#{task_id}/attachments", { attachment: files(urls, filenames) }
|
40
40
|
|
41
41
|
interpret_response(response)
|
42
42
|
end
|
@@ -5,8 +5,8 @@ http_interactions:
|
|
5
5
|
uri: http://xyzzy:@api.99designs.com.dockervm:49881/tasks/v1/tasks/84cc6f1d34d60f14d42389a0ae92740a/attachments
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: "-------------RubyMultipartPost\r\nContent-Disposition: form-data; name=\"
|
9
|
-
form-data; name=\"
|
8
|
+
string: "-------------RubyMultipartPost\r\nContent-Disposition: form-data; name=\"attachment[]\"\r\n\r\nhttp://dn.ht/money.svg\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
9
|
+
form-data; name=\"attachment[]\"; filename=\"sample.txt\"\r\nContent-Length: 12\r\nContent-Type:
|
10
10
|
text/plain\r\nContent-Transfer-Encoding: binary\r\n\r\nhello world\n\r\n-------------RubyMultipartPost--\r\n\r\n"
|
11
11
|
headers:
|
12
12
|
User-Agent:
|
@@ -44,7 +44,7 @@ http_interactions:
|
|
44
44
|
body:
|
45
45
|
encoding: UTF-8
|
46
46
|
string: ''
|
47
|
-
http_version:
|
47
|
+
http_version:
|
48
48
|
recorded_at: Tue, 26 May 2015 01:20:16 GMT
|
49
49
|
- request:
|
50
50
|
method: get
|
@@ -86,6 +86,6 @@ http_interactions:
|
|
86
86
|
body:
|
87
87
|
encoding: UTF-8
|
88
88
|
string: "{\"id\":\"84cc6f1d34d60f14d42389a0ae92740a\",\"state\":{\"code\":\"available\",\"text\":\"Available\"},\"body\":\"updated\",\"attachments\":[{\"id\":193,\"filename\":\"money.svg\",\"filesize\":19039,\"filetype\":\"image\\/svg+xml\",\"source\":\"https:\\/\\/d15rdjgfy8kdl5.cloudfront.net\\/tasks\\/128\\/attachments\\/779318b249ffe555976bda74dc200cbb553ae4a0\\/0\\/money.svg\",\"thumbnail\":null,\"links\":[{\"rel\":\"delete_attachment\",\"href\":\"http:\\/\\/api.99designs.com.dockervm:49881\\/tasks\\/v1\\/tasks\\/84cc6f1d34d60f14d42389a0ae92740a\\/attachments\\/193\",\"method\":\"POST\"}]},{\"id\":194,\"filename\":\"sample.txt\",\"filesize\":12,\"filetype\":\"text\\/plain\",\"source\":\"https:\\/\\/d15rdjgfy8kdl5.cloudfront.net\\/tasks\\/128\\/attachments\\/236e2740391c4302e157e804bbde597949b48543\\/0\\/sample.txt\",\"thumbnail\":null,\"links\":[{\"rel\":\"delete_attachment\",\"href\":\"http:\\/\\/api.99designs.com.dockervm:49881\\/tasks\\/v1\\/tasks\\/84cc6f1d34d60f14d42389a0ae92740a\\/attachments\\/194\",\"method\":\"POST\"}]},{\"id\":195,\"filename\":\"money.svg\",\"filesize\":19039,\"filetype\":\"image\\/svg+xml\",\"source\":\"https:\\/\\/d15rdjgfy8kdl5.cloudfront.net\\/tasks\\/128\\/attachments\\/170d14123703814358cbf3a57725e4d913f4f176\\/0\\/money.svg\",\"thumbnail\":null,\"links\":[{\"rel\":\"delete_attachment\",\"href\":\"http:\\/\\/api.99designs.com.dockervm:49881\\/tasks\\/v1\\/tasks\\/84cc6f1d34d60f14d42389a0ae92740a\\/attachments\\/195\",\"method\":\"POST\"}]},{\"id\":196,\"filename\":\"sample.txt\",\"filesize\":12,\"filetype\":\"text\\/plain\",\"source\":\"https:\\/\\/d15rdjgfy8kdl5.cloudfront.net\\/tasks\\/128\\/attachments\\/626d51f649df9e3b2eae472d2f6cfea5e209d3f7\\/0\\/sample.txt\",\"thumbnail\":null,\"links\":[{\"rel\":\"delete_attachment\",\"href\":\"http:\\/\\/api.99designs.com.dockervm:49881\\/tasks\\/v1\\/tasks\\/84cc6f1d34d60f14d42389a0ae92740a\\/attachments\\/196\",\"method\":\"POST\"}]}],\"currentdesigner\":null,\"timeline\":[],\"links\":[{\"rel\":\"update_task\",\"href\":\"http:\\/\\/api.99designs.com.dockervm:49881\\/tasks\\/v1\\/tasks\\/84cc6f1d34d60f14d42389a0ae92740a\",\"method\":\"PUT\"},{\"rel\":\"attach_files\",\"href\":\"http:\\/\\/api.99designs.com.dockervm:49881\\/tasks\\/v1\\/tasks\\/84cc6f1d34d60f14d42389a0ae92740a\\/attachments\",\"method\":\"POST\"},{\"rel\":\"post_comment\",\"href\":\"http:\\/\\/api.99designs.com.dockervm:49881\\/tasks\\/v1\\/tasks\\/84cc6f1d34d60f14d42389a0ae92740a\\/comment\",\"method\":\"POST\"},{\"rel\":\"self\",\"href\":\"http:\\/\\/api.99designs.com.dockervm:49881\\/tasks\\/v1\\/tasks\\/84cc6f1d34d60f14d42389a0ae92740a\",\"method\":\"GET\"}]}"
|
89
|
-
http_version:
|
89
|
+
http_version:
|
90
90
|
recorded_at: Tue, 26 May 2015 01:20:16 GMT
|
91
91
|
recorded_with: VCR 2.9.3
|
@@ -6,8 +6,8 @@ http_interactions:
|
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: "-------------RubyMultipartPost\r\nContent-Disposition: form-data; name=\"body\"\r\n\r\nhello\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
9
|
-
form-data; name=\"
|
10
|
-
form-data; name=\"
|
9
|
+
form-data; name=\"attachment[]\"\r\n\r\nhttp://dn.ht/money.svg\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
10
|
+
form-data; name=\"attachment[]\"; filename=\"sample.txt\"\r\nContent-Length: 12\r\nContent-Type:
|
11
11
|
text/plain\r\nContent-Transfer-Encoding: binary\r\n\r\nhello world\n\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
12
12
|
form-data; name=\"webhook_url\"\r\n\r\n\r\n-------------RubyMultipartPost--\r\n\r\n"
|
13
13
|
headers:
|
@@ -55,6 +55,6 @@ http_interactions:
|
|
55
55
|
body:
|
56
56
|
encoding: UTF-8
|
57
57
|
string: "{\"id\":\"84cc6f1d34d60f14d42389a0ae92740a\",\"state\":{\"code\":\"available\",\"text\":\"Available\"},\"body\":\"hello\",\"attachments\":[{\"id\":193,\"filename\":\"money.svg\",\"filesize\":19039,\"filetype\":\"image\\/svg+xml\",\"source\":\"https:\\/\\/d15rdjgfy8kdl5.cloudfront.net\\/tasks\\/128\\/attachments\\/779318b249ffe555976bda74dc200cbb553ae4a0\\/0\\/money.svg\",\"thumbnail\":null,\"links\":[{\"rel\":\"delete_attachment\",\"href\":\"http:\\/\\/api.99designs.com.dockervm:49881\\/tasks\\/v1\\/tasks\\/84cc6f1d34d60f14d42389a0ae92740a\\/attachments\\/193\",\"method\":\"POST\"}]},{\"id\":194,\"filename\":\"sample.txt\",\"filesize\":12,\"filetype\":\"text\\/plain\",\"source\":\"https:\\/\\/d15rdjgfy8kdl5.cloudfront.net\\/tasks\\/128\\/attachments\\/236e2740391c4302e157e804bbde597949b48543\\/0\\/sample.txt\",\"thumbnail\":null,\"links\":[{\"rel\":\"delete_attachment\",\"href\":\"http:\\/\\/api.99designs.com.dockervm:49881\\/tasks\\/v1\\/tasks\\/84cc6f1d34d60f14d42389a0ae92740a\\/attachments\\/194\",\"method\":\"POST\"}]}],\"currentdesigner\":null,\"timeline\":[],\"links\":[{\"rel\":\"update_task\",\"href\":\"http:\\/\\/api.99designs.com.dockervm:49881\\/tasks\\/v1\\/tasks\\/84cc6f1d34d60f14d42389a0ae92740a\",\"method\":\"PUT\"},{\"rel\":\"attach_files\",\"href\":\"http:\\/\\/api.99designs.com.dockervm:49881\\/tasks\\/v1\\/tasks\\/84cc6f1d34d60f14d42389a0ae92740a\\/attachments\",\"method\":\"POST\"},{\"rel\":\"post_comment\",\"href\":\"http:\\/\\/api.99designs.com.dockervm:49881\\/tasks\\/v1\\/tasks\\/84cc6f1d34d60f14d42389a0ae92740a\\/comment\",\"method\":\"POST\"},{\"rel\":\"self\",\"href\":\"http:\\/\\/api.99designs.com.dockervm:49881\\/tasks\\/v1\\/tasks\\/84cc6f1d34d60f14d42389a0ae92740a\",\"method\":\"GET\"}]}"
|
58
|
-
http_version:
|
58
|
+
http_version:
|
59
59
|
recorded_at: Tue, 26 May 2015 01:05:04 GMT
|
60
60
|
recorded_with: VCR 2.9.3
|