Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small improvement of the documentation #52

Open
jbiechele opened this issue Dec 22, 2022 · 2 comments
Open

Small improvement of the documentation #52

jbiechele opened this issue Dec 22, 2022 · 2 comments

Comments

@jbiechele
Copy link

Just a small additional information for section "Fetching content of ticket article attachments",
where is mentioned:

$attachment_content = $ticket_article->getAttachmentContent(23);

Additonal information:
"The output of $ticket_article->getAttachmentContent() is a GuzzleHttp\Psr7\Stream Object. To access the content ("body") of this object, use

$guzzle_contents = $attachment_content->getContents();
"

It took me a while to figure out how to access the "body" or content of the GuzzleHttp\Psr7\Stream object for further processing. Maybe this addition to the documentation can save someone time.

By the way thank you for the great PHP client for Zammad API.

@mgruner
Copy link
Collaborator

mgruner commented Jan 5, 2023

Hello @jbiechele. Thank you very much for your suggestion. Are you really sure about that? Looking at the documentation and the tests(test/ZammadAPIClient/Resource/TicketArticleTest.php), it seems like getAttachmentContent() is supposed to return the actual content.

@jbiechele
Copy link
Author

jbiechele commented Jan 5, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants