php-google-contacts-v3-api icon indicating copy to clipboard operation
php-google-contacts-v3-api copied to clipboard

Add firstname, lastname, company

Open ShaiMagal opened this issue 8 years ago • 1 comments

Hello,

can you add support for firstname, lastname and company?

Thank you.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

ShaiMagal avatar May 21 '17 17:05 ShaiMagal

You can add firstname and lastname in the public static function create in ContactFactory.php

with this code :

$Name = $doc->createElement('gd:name'); $Name->setAttribute('gd:familyName', $familyName); Name->setAttribute('gd:givenName', $givenName); $Name->setAttribute('gd:fullName', $givenName . ' ' . $familyName); #full Name

This work the same for the company :

$job = $doc->createElement('gd:organization'); $job->setAttribute('gd:orgName', $company); $job->setAttribute('gd:orgTitle', $employment); $job->setAttribute('gd:orgDepartment', $department); $entry->appendChild($job);

don't forget to add the variables in the function and care the function Submitupdate doesn't really work after that... i work on it but i'm just a student so kind of hard to fully understand for me.

EmilieTreuil avatar Apr 08 '21 10:04 EmilieTreuil