This method is used to retrieve a list of freinds.
'params' is an array of the string where you can set additional parameters, which are:
On a successful result you will receive 's_get_friends' as the status and base64 encoded (and zipped) friends xml.
Friends xml looks like this:
<friends>
<friend>
<name>email2@example.com</name>
<email>email2@example.com</email>
<accepted>1</accepted>
<avatar_url>
http://box.net/index.php?rm=box_user_avatar&user_id=398396
&width=40&height=40&type=large
</avatar_url>
<boxes>
<box>
<id>15</id>
<url>http://box.net/p/email2</url>
<status>0</status>
</box>
</boxes>
<subscriptions>
<subscription>
<box_id>14</box_id>
<user_name>email3@example.com</user_name>
<url>http://box.net/p/email3</url>
<status>subscribed</status>
</subscription>
</subscriptions>
</friend>
</friends>
If the result wasn't successful, status field can be:
www.box.net/api/1.0/rest?action=get_friends&api_key=rrc1d3n4b53tt6b2vh1il6tdtrsxov3v&auth_token=ekp2t8vb8l1spb1mnonlqmgztkrq1rtl¶ms[]=nozip
<?xml version='1.0' encoding='UTF-8' ?>
<response>
<status>s_get_friends</status>
<friends>
<friends>
<friend>
<name>email2@example.com</name>
<email>email2@example.com</email>
<accepted>1</accepted>
<avatar_url>
http://box.net/index.php?rm=box_user_avatar&user_id=398396
&width=40&height=40&type=large
</avatar_url>
<boxes>
<box>
<id>15</id>
<url>http://box.net/p/email2</url>
<status>0</status>
</box>
</boxes>
<subscriptions>
<subscription>
<box_id>14</box_id>
<user_name>email3@example.com</user_name>
<url>http://box.net/p/email3</url>
<status>subscribed</status>
</subscription>
</subscriptions>
</friend>
</friends>
</response>
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns4="urn:boxnet" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns4:get_friends> <api_key xsi:type="xsd:string">rrc1d3n4b53tt6b2vh1il6tdtrsxov3v</api_key> <sid xsi:type="xsd:string">6tsncrgnlmbk06o8sfqnuydhqvm604rl</sid> <params xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]" SOAP-ENC:offset="[0]"> <item xsi:type="xsd:string">nozip</item></params></ns4:get_friends> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="urn:boxnet"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns4:get_friendsResponse>
<status xsi:type="xsd:string">s_get_friends</status>
<friends xsi:type="xsd:base64Binary">
<friends>
<friend>
<name>email2@example.com</name>
<email>email2@example.com</email>
<accepted>1</accepted>
<avatar_url>
http://box.net/index.php?rm=box_user_avatar&user_id=398396
&width=40&height=40&type=large
</avatar_url>
<boxes>
<box>
<id>15</id>
<url>http://box.net/p/email2</url>
<status>0</status>
</box>
</boxes>
<subscriptions>
<subscription>
<box_id>14</box_id>
<user_name>email3@example.com</user_name>
<url>http://box.net/p/email3</url>
<status>subscribed</status>
</subscription>
</subscriptions>
</friend>
</friends>
</friends>
</ns4:get_friendsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<?xml version='1.0' encoding='UTF-8' ?>
<request>
<action>get_friends</action>
<api_key>rrc1d3n4b53tt6b2vh1il6tdtrsxov3v</api_key>
<auth_token>79r205ihgupsbucfani0iu483oa1iupn</auth_token>
<params>
<item>nozip</item>
</params>
</request>
<?xml version='1.0' encoding='UTF-8' ?>
<response>
<status>s_get_friends</status>
<friends>
<friends>
<friend>
<name>email2@example.com</name>
<email>email2@example.com</email>
<accepted>1</accepted>
<avatar_url>
http://box.net/index.php?rm=box_user_avatar&user_id=398396
&width=40&height=40&type=large
</avatar_url>
<boxes>
<box>
<id>15</id>
<url>http://box.net/p/email2</url>
<status>0</status>
</box>
</boxes>
<subscriptions>
<subscription>
<box_id>14</box_id>
<user_name>email3@example.com</user_name>
<url>http://box.net/p/email3</url>
<status>subscribed</status>
</subscription>
</subscriptions>
</friend>
</friends>
</response>
Need additional assistance? Please feel free to Contact us
Page Information
|
Wiki Information |
Recent PBwiki Blog Posts |