I need to know the method names and the expected structure for modifying and deleting users with xml-rpc using drupal's Services module.
There is an example for user.register here http://drupal.org/node/1299978 but I cant find where the other methods are documented. Thank you, diana

Comments

dianacastillo’s picture

well I think i found the answer, I can look at services/resources/user_resource.inc , does anyone have a list of examples to go with this?

dianacastillo’s picture

i figured out how to do user delete, following is the code. does someone have an example of user.update?

<?xml version="1.0"?>
<methodCall>
   <methodName>user.delete</methodName>
   <params>
     <param>
       <struct>
         <member>
           <name>uid</name>
           <value><int>50</int></value>
         </member>
        </struct>
     </param>
   </params>
</methodCall>
dianacastillo’s picture

here is an example of user.register including roles :

<?xml version="1.0"?>
<methodCall>
   <methodName>user.register</methodName>
   <params>
     <param>
       <struct>
         <member>
           <name>name</name>
           <value><string>diana.ruiz12</string></value>
         </member>
         <member>
           <name>mail</name>
           <value><string>ndy.r@eeuwkern.org</string></value>
         </member>
         <member>
           <name>pass</name>
           <value><string>candy9223</string></value>
         </member>
       <member>
           <name>uid</name>
           <value><int>12930</int></value>
         </member>
    <member>
           <name>roles</name>
            <array>
           <data>
           <value><i4>4</i4></value>
         </data>
         </array>
         </member>
<member>
           <name>status</name>
           <value><int>1</int></value>
         </member>
       </struct>
     </param>
   </params>
</methodCall>
dianacastillo’s picture

figured it out . Here is an example of user.update

<?xml version="1.0"?>
<methodCall>
   <methodName>user.update</methodName>
   <params>
     <param>
       <struct>
         <member>
           <name>uid</name>
           <value><int>38</int></value>
         </member>
      </struct>
  <struct>
  <member>
           <name>name</name>
           <value><string>diana.ruiz12</string></value>
         </member>
         <member>
           <name>mail</name>
           <value><string>ndy.r@eeuwkern.org</string></value>
         </member>
         <member>
           <name>pass</name>
           <value><string>candy9223</string></value>
         </member>
      
       </struct>
     </param>
   </params>
</methodCall>
dianacastillo’s picture

Status: Active » Closed (fixed)
Ne0nka’s picture

Title: xml-rpc methods for user modify and user delete in drupal 7 » HELP!HELP!HELP!
Assigned: Unassigned » Ne0nka
Status: Closed (fixed) » Active

Please, help.
does anybody have example post of file.create

dianacastillo’s picture

wouldnt it be very similar to user.create ? http://drupal.org/node/1299978

ygerasimov’s picture

Status: Active » Fixed

Dear Diana, please take a look at tests related to user resource http://drupalcode.org/project/services.git/blob/refs/heads/7.x-3.x:/test...

Ne0nka, tests for file resource are here http://drupalcode.org/project/serviceAs.git/blob/refs/heads/7.x-3.x:/tes...

marcingy’s picture

Status: Fixed » Closed (fixed)
Ne0nka’s picture

ygerasimov "403 - Project List is disabled ".

Ne0nka’s picture

i do it.
but now i dont know how to create post of node.attach_file/

could anybody help?