This repository was archived by the owner on Jan 13, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed
Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 22/vendor /
33/.phpunit.result.cache
44/composer.lock
5+ .DS_Store
Original file line number Diff line number Diff line change 9797
9898---
9999
100+ #### ` download ` function
101+
102+ Download an attachment content.
103+
104+ ``` php
105+ $attachment = $client->attachments()->get(id: '1000');
106+
107+ $client->attachments()->download(url: $attachment['content']);
108+ ```
109+
110+ <details >
111+ <summary >response example</summary >
112+
113+ ``` text
114+ {"a":"b"}\n
115+ ```
116+
117+ </details >
118+
119+ ---
120+
100121### ` Customers ` Resource
101122
102123#### ` create ` function
Original file line number Diff line number Diff line change 2828it ('can download an attachment content ' , function () {
2929 $ client = mockClient (
3030 method: Method::GET ,
31- uri: 'https://www.example.com/jira/attachments/10000 ' ,
31+ uri: 'https://www.example.com/secure/attachment/4157499/index-1.json ' ,
3232 response: downloadAttachment (),
3333 function: 'requestContent '
3434 );
3535
36- $ result = $ client ->attachments ()->download (url: 'https://www.example.com/jira/attachments/10000 ' );
36+ $ result = $ client ->attachments ()->download (url: 'https://www.example.com/secure/attachment/4157499/index-1.json ' );
3737
3838 expect ($ result )->toBe (downloadAttachment ());
3939});
You can’t perform that action at this time.
0 commit comments