-
Notifications
You must be signed in to change notification settings - Fork 44
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
Create or update contact photo (example request) #22
Comments
Will get around to this today or tomorrow |
Do you have an idea on when this will be implemented? |
Sorry for the delay, I've been sick lately. Here's the documentation on how to do it |
You could also do it as just one giant array, but I dislike that. Here's how you would do that <?php
use jamesiarmes\PEWS\Contacts\ContactsAPI as API;
use jamesiarmes\PEWS\API\Type;
$api = API::withUsernameAndPassword('server', 'username', 'password');
$contact = $api->getContacts()[0];
$api->getClient()->CreateAttachment(array(
'ParentItemId' => $contact->getItemId()->toArray(),
'Attachments' => array('FileAttachment' => array(
'Name' => 'Avatar',
'Content' => file_get_contents("./github.png"),
'ContentType' => 'image/png',
'IsContactPhoto' => true
))
)); But honestly, I want to be moving away from doing everything in arrays. In the future, In the next release, I'll be making an |
I hope you get better soon. Thank you very much! |
Could you make an example in the docs on how to set or update a contact photo?
Help is much appreciated!
The text was updated successfully, but these errors were encountered: