A Taxonomy Term/Vocab Implementation would be pretty tight. Any pointers or gotcha's you could point out for someone who might take a stab at it?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mhrabovcin’s picture

You can create taxonomy/vocab manually via calling services directly with initalized services_client_connection object. Here are supported methods by services http://drupalcode.org/project/services.git/blob/d4f6e105dd04e238b51821c0...

jpstrikesback’s picture

After playing some with this this seems pretty well laid out (especially with yesterdays changes). With an extra layer of mapping it doesn't seem too far out to create a generic entity mapper either.

jpstrikesback’s picture

#1368046: Add Rules Integration to Services Client seems like a sensible way forward to achieve this and more

jpstrikesback’s picture

Status: Active » Needs review
FileSize
11.98 KB

I needed the taxonomy term client so here is my first attempt. Entirely copy pasta from the node implementation with names and dates changed to protect the innocent.

jpstrikesback’s picture

FileSize
11.98 KB

Two copy pasta typos fixed

jpstrikesback’s picture

FileSize
11.99 KB

last patch was the wrong one

jpstrikesback’s picture

Just realized those patches are using the uuid_services request format...thankfully the bundled services_uuid is ready for taxonomy so I'll upload a patch shortly...

jpstrikesback’s picture

Here it is with the get request formated for services_uuid

jpstrikesback’s picture

:) term_data_data is not going to help us. Typo fix.

jpstrikesback’s picture

Now with:

- Working vocabulary mapping (checks remote for desired mapping name VID) (I couldn't save a term without passing the numeric VID as access checks choked without this, maybe there is a better way as this is costly)
- Hierarchy support (If a term has a parent, add it to the object, look for it on remote/master, if it doesn't exist at remote/master create it recursively)
- Drush Sync command for terms (copied node implementation)

Fix for usage of named hooks in services_client_data_process(), hooks_all is already an array.

jpstrikesback’s picture

Another one with whitespace fixes

mhrabovcin’s picture

Thanks for the patch, I am not going to commit it because there is a new version of services client 2.x which support syncing any entity type in general.

mhrabovcin’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)