For our site, we needed to expose most aspects of relationship management via a Web service. The attached module uses the Services module to implement Web services for requesting, approving, deleting/declining, and searching your own relationships.
Many RPC calls take a $version argument first, to allow adjusting the API later while maintaining backwards compatibility.
We have been using it for a short while now and it is working fine. Feedback is welcome.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | drupal_ur_services_test.pl.txt | 7.61 KB | scottgifford |
| user_relationship_service_1.readme.txt | 6.75 KB | scottgifford | |
| user_relationship_service.tgz | 1.22 KB | scottgifford |
Comments
Comment #1
alex.k commentedWill review these in a little bit, thanks for posting :) Need to take on some 6.x issues first.
This particular issue, is it a newer attempt of #457066: Provide XML-RPC services for managing user relationships or a something different?
Thanks again.
Comment #2
scottgifford commented:-) Sorry, it it the same, I apparently posted it but forgot to cross "post user relationship patches" off my TODO list. I'll mark the other as a dup, as this one is a bit newer and has docs attached.
Comment #3
alex.k commentedCommitted with minor changes (coder module fixes, and added
'approved' => 0infunction user_relationship_service_approve($ver, $rid). http://drupal.org/cvs?commit=234050I did not test this code, as there doesn't seem to be an easy way to do this without writing a client. So reviews would be appreciated.
Thanks!
Comment #4
scottgifford commentedThanks @alex.k! Most of the services you can test from the /admin/build/services page. Search requires a structure, which the Web UI doesn't currently support. I wrote the attached Perl script for testing this functionality, which might be helpful. You can use it like this:
Thanks for committing this, and let me know if you have any trouble!
Comment #5
alex.k commentedThank you!
This module has already been ported to 6.x, in #507470: Drupal 6 patch of services options for the User Relationships module so it's going to go a long way I'm sure.