conreg($data) : Contact registration
This is almost constructable from the domreg and conedit
procedures, or at least we hope it is. Perhaps the only twist is
that terms and conditions need not be supplied.
| Arguments to conreg() |
| Argument | Description |
| contact data |
| Key |
Description |
| name |
Contact's name |
| address |
Contact's address: line breaks should be encoded with
the two character sequence '\', 'n' |
| email |
Contact's email address |
| phone |
Contact's phone number |
| fax |
Contact's fax number |
| cc |
Contact's ISO country code |
| password |
Contact's password |
|
| Hash returned by conreg() |
| Hash Key | Description |
| error |
An array of error messages which may include:
| Code | Description |
| 300 | Insufficient credentials for edit |
| 310 | Invalid argument format |
| 320 | Invalid contact details |
| 321 | Guardian not found |
| 322 | Country not valid |
| 400 | Updates modified before edit |
| 500 | Fatal error in query |
| 510 | Fatal error in query |
|
| id |
The contact's identifier |
Example
Request
conreg({ 'name' => 'AN test user 408121',
'address' => 'Cambridge',
'cc' => 'uk',
'email' => 'test@adamsnames.tc',
'password' => 'abcdef817495', })
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>conreg</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>password</name>
<value><string>abcdef817495</string></value>
</member>
<member>
<name>cc</name>
<value><string>uk</string></value>
</member>
<member>
<name>email</name>
<value><string>test@adamsnames.tc</string></value>
</member>
<member>
<name>address</name>
<value><string>Cambridge</string></value>
</member>
<member>
<name>name</name>
<value><string>AN test user 408121</string></value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
Return
{
'error' => [],
'id' => 'adams717f'
}
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>error</name>
<value>
<array><data/></array>
</value>
</member>
<member>
<name>id</name>
<value><string>adams717f</string></value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
|