Skip to content

Commit 58aa5df

Browse files
author
Olly Warren
committed
File Attachment methods implemented
1 parent 00553b1 commit 58aa5df

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

src/Asana.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,40 @@ public function addTaskAttachment($taskId, $file)
172172
]);
173173
}
174174

175+
/**
176+
* getAllAttachments
177+
*
178+
* Gets a List of all available Attachments.
179+
*
180+
* @param $taskId
181+
*
182+
* @return null|string
183+
* @author Olly Warren, Big Bite Creative
184+
* @package Torann\LaravelAsana
185+
* @version 1.0
186+
*/
187+
public function getAllAttachments($taskId)
188+
{
189+
return $this->curl->get("tasks/{$taskId}/attachments");
190+
}
191+
192+
/**
193+
* getSingleAttachment
194+
*
195+
* Gets a Single Attachment based on a file id.
196+
*
197+
* @param $attachmentId
198+
*
199+
* @return null|string
200+
* @author Olly Warren, Big Bite Creative
201+
* @package Torann\LaravelAsana
202+
* @version 1.0
203+
*/
204+
public function getSingleAttachment($attachmentId)
205+
{
206+
return $this->curl->get("attachments/{$attachmentId}");
207+
}
208+
175209
/**
176210
* Returns the projects associated to the task.
177211
*

0 commit comments

Comments
 (0)