[Owncloud] Contacts API : how to change contact adressbookid

Thomas Tanghus thomas at tanghus.net
Fri Feb 10 16:29:00 UTC 2012


On Friday 10 February 2012 18:06 Victor Dubiniuk wrote:
> I'm writing a simple contacts enhancer. It allows to  choose multiple
> contacts and delete them with a single click.

Cool. Will it be like when you select files?

> I want expand it's functionality to move the selected contacts to another
> addressbook but it seems there are no API call for that.
> 
> The following code produces an error:
> $card = OC_Contacts_App::getContactObject( intval($id) );
> $card['addressbookid'] = $newBook;
> OC_Contacts_VCard::edit( intval($id), $card);
> 
> Is there  any straightaway API call for the contact adressbookid update?

Short answer: No.

Perhaps there ought to be. I don't really have any suggestions for it atm, but 
any suggestions will be welcomed :-) I should be pretty straight forward to 
make a method for it.

-- 
Med venlig hilsen / Best Regards

Thomas Tanghus



More information about the Owncloud mailing list