Expose Web services for relationship management
scottgifford - May 28, 2009 - 15:26
| Project: | User Relationships |
| Version: | 5.x-2.9 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
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.
| Attachment | Size |
|---|---|
| user_relationship_service.tgz | 1.22 KB |
| user_relationship_service_1.readme.txt | 6.75 KB |

#1
Will 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.
#2
:-) 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.
#3
Committed with minor changes (coder module fixes, and added
<?php'approved' => 0
?>
<?phpfunction user_relationship_service_approve($ver, $rid)
?>
I 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!
#4
Thanks @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:
./drupal_ur_services_test.pl -u https://example.com/aura/services/xmlrpc -c test1.sess login test1./drupal_ur_services_test.pl -u https://example.com/aura/services/xmlrpc -c test1.sess relsearch
./drupal_ur_services_test.pl -u https://example.com/aura/services/xmlrpc -c test1.sess relsearch rtid=1
./drupal_ur_services_test.pl -u https://example.com/aura/services/xmlrpc -c test1.sess logout
Thanks for committing this, and let me know if you have any trouble!
#5
Thank 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.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.