6c88284d248d78d9a7d699c405b39df399ed4b71
[mysocials] / www / index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <title>MySocials Project</title>
7 <link href="style.css" rel="stylesheet" type="text/css" />
8 </head>
9
10 <body>
11 <table width="779" border="0" align="center" cellpadding="0" cellspacing="0">
12   <tr>
13     <td><table width="70%" border="0" cellspacing="0" cellpadding="0">
14       <tr>
15         <td class="redbox">&nbsp;</td>
16       </tr>
17       <tr>
18         <td height="45"><a href="index.html" class="logo">MySocials Project</a></td>
19       </tr>
20     </table></td>
21   </tr>
22   <tr>
23     <td>&nbsp;</td>
24   </tr>
25 <tr>
26     <td bgcolor="#E2E2D2" class="border" height="40"><table width="85%" border="0" cellspacing="0" cellpadding="0">
27       <tr align="center">
28        <td><a href="index.html" class="toplinks">MySocials API</a></td>
29         <td class="toplinks">|</td>
30         <td><a href="privacy.html" class="toplinks">Privacy</a></td>
31                 <td class="toplinks">|</td>
32         <td><a href="development.html" class="toplinks">Development</a></td>
33                 <td class="toplinks">|</td>
34         <td><a href="downloads.html" class="toplinks">Downloads</a></td>
35       </tr>
36     </table></td>
37   </tr>
38   <tr>
39     <td height="10"></td>
40   </tr>
41   <tr>
42     <td bgcolor="#F3F3F3" class="border"><table width="100%" border="0"
43     cellspacing="0" cellpadding="0">
44       <tr>
45         <td height="10"></td>
46       </tr>
47       <tr>
48         <td><table border="0" cellspacing="0" cellpadding="0">
49       <tr>
50         <td class="heading"></td>
51       </tr>
52     </table></td>
53       </tr>
54       <tr>
55         <td height="10"></td>
56       </tr>
57       <tr>
58         <td class="content">
59                 <h1>MySocials API</h1>
60                 <h2>MySocials driver API</h2>
61         <p> MySocials driver is provided as a shared library (libmsa&lt;service_name&gt;.so). Structure <b>msa_module *d</b> includes information about the driver (name, identifier, pointers to driver functions). This structure is filled during initialization of the driver.
62         </p>
63         <h3>Driver interface</h3>
64         <p>Driver interface is described in file interface.h and consists of 4 functions:
65         <ul>
66         <li><b>msa_module_init(struct msa_module* d)</b> — driver initialization;</li>
67         <li><b>msa_module_get_info(struct msa_module* d)</b> — getting information about driver;</li>
68         <li><b>msa_module->send(xmlDocPtr request, xmlDocPtr* response, const struct msa_module* info)</b> — request sending and response receiveing;</li>
69         <li><b>msa_module->shutdown(const struct msa_module*)</b> - driver shutdown.</li>
70         </ul>
71         
72         <h3>Driver initialization and shutting down</h3>
73         Driver initialization is performed by using <b>msa_module_init(struct msa_module* d)</b> function. Instance of structure which stores profile setting is created during initialization. Parameter d stores identifier of this instance. 
74         <br>
75         Function <b>msa_module->shutdown(const struct msa_module*)</b> is used during program termination. 
76
77         <h3>Interaction with driver</h3>
78
79         Fuction <b>msa_module->send(xmlDocPtr request, xmlDocPtr* response, const struct msa_module* info)</b> is used to perform requests to the driver. 
80 Parameter <i>request</i> is a request in XML format. Description of structure of sending and receiveing data is described <a>here</a>.
81 Parameter <i>response</i> contains driver response in XML format.
82 Function <b>msa_module_get_info(struct msa_module* d)</b> is used to get information about driver (driver name and icon).
83 </p>    
84
85         <h2>MySocials driver data structures</h2>
86
87         <p>Here you can see description of data structures which are used by MySocials driver. These structures are declared in <b>mysocials_driver.h</b> file which is available for other applications from mysocials-dev package.  
88
89         <h3>Enumerations</h3>
90         <h4>Error codes</h4>
91         <pre>enum error_type {
92         FAILURE, // Function finished with error
93         SUCCESS, // Function finished without error
94         ERROR_ALLOCATION_OF_MEMORY, // Allocation of memory
95         ERROR_NO_FUNCTION, // Defining function error
96         ERROR_INITIALIZATION_ALREADY_PASSED, // Re-initialization error
97         ERROR_IS_BUSY, // Module is busy
98         ERROR_SEND_DATA, // Data sending error
99         ERROR_PARSE_DATA // Data parsing error
100 }
101         </pre>
102
103         <h3>Driver interface</h3>
104         <p>MySocials driver interface described in  <b>msa_module</b> structure. Some of the fields of this stucture are filled before initialization by application (marked with **), the rest of it is filled during initialization.</p>
105         <pre>
106         struct msa_module {
107         gchar *id;    // Identifier 
108         gchar *name;  // External driver name
109         gchar* driverName;       // Driver name for system purposes (equals driver identifier)
110         gchar *pic;   // Icon coded in base64
111         gchar *proxy;  // **Proxy server address or NULL
112         gint port; // **Proxy server port
113    
114         /* Pointer to function for processing requests.
115            Parameters:
116            xmlRequest — request in XML format
117            xmlResponse — response in XML format
118            info — structure with driver settings
119       
120            Function returns  SUCCESS in case without errors, otherwise FAILURE. 
121         */
122    
123         error_type (*send)(char* xmlRequest, char** xmlResponse, struct msa_module *info) 
124         
125         /* Pointer to function for driver shutting down.
126            Parameters:
127            info — structure with driver settings
128       
129            Function returns  SUCCESS in case without errors, otherwise FAILURE. 
130         */
131
132         error_type (*shutdown)(struct msa_module* info);
133 }
134
135         </pre>
136
137         <h2>Format of XML requests and responses</h2>
138         <h3>Common format of driver request and response</h3>
139         <h4>Request format</h4>
140         <pre>
141         &lt;Request class="" function="" noAuthorize="true"&gt;
142                 &lt;Params&gt;
143
144                 &lt;/Params&gt;
145         &lt;/Request&gt;
146         </pre>
147
148         <ul>
149         <li><i>noAuthorize</i> - flag which forbids driver to call WebAuth (optional, set to false by default) </li>
150         <li><i>class</i> - class which includes called function</li>
151         <li><i>function</i> - name of the function</li>
152         <li><i>Params</i> - set of parameters, stricly defined for each function</li>
153         </ul>
154
155         <h4>Response format</h4>
156         <pre>
157         &lt;Response class="" function="" authorized="true" upload="..." download="..."&gt;
158                 &lt;Params&gt;
159
160                 &lt;/Params&gt;
161         &lt;/Response&gt;
162         </pre>
163         
164         <ul>
165         <li><i>authorized</i> - flag which indicates authorization during request performing (flag isn't set if error occures during request performing) </li>
166         <li><i>upload</i> - number of bytes sent to server</li>
167         <li><i>download</i> - number of bytes received from server</li>
168         </ul>
169
170         <p>Following classes are supported:
171         <ul>
172         <li><i>settings:</i> class for working with settings</li>
173         <li><i>profile:</i> class for receiving data about user's profile</li>
174         <li><i>friends:</i> class for receiving data about user's friends</li>
175         <li><i>messages:</i> class for receiving data about messages</li>
176         <li><i>photos:</i> class for working with photos</li>
177         <li><i>audio:</i> class for working with audio files</li>
178         <li><i>video:</i> class for working with video files</li>
179         <li><i>news:</i> class for working with news</li>
180         </ul>   
181         </p>
182
183         <h3>Settings</h3>
184         <h4>getSettings</h4>
185         <b>Request:</b>
186         <pre>
187         &lt;Request class="settings" function="getSettings"&gt;
188                 &lt;Params/&gt;
189         &lt;/Request&gt;
190         </pre>
191
192         <b>Response:</b>
193         <pre>
194         &lt;Response class="settings" function="getSettings"&gt;
195                 &lt;Params&gt;
196                         &lt;string name="mid"&gt; ... &lt;/string&gt;
197                         &lt;string name="sid"&gt; ... &lt;/string&gt;
198                         &lt;string name="secret"&gt; ... &lt;/string&gt;
199                 &lt;/Params&gt;
200         &lt;/Response&gt;
201         </pre>
202         <p>Content of <i>Params</i> tag depends on the driver. It is recommended to save content of <i>Params</i> tag and send it to setup function without any changes.</p>
203
204         <h4>setSettings</h4>
205         <b>Request:</b>
206         <pre>
207         &lt;Request class="settings" function="setSettings"&gt;
208                 &lt;Params&gt;
209                         &lt;string name="mid"&gt; ... &lt;/string&gt;
210                         &lt;string name="sid"&gt; ... &lt;/string&gt;
211                         &lt;string name="secret"&gt; ... &lt;/string&gt;
212                 &lt;/Params&gt;
213         &lt;/Request&gt;
214         </pre>
215         <p><i>Params</i> tag must contain data received from driver during <i>getSettings</i> request.</p>
216         <b>Response:</b> info message or error message.
217
218         <h4>getListMethods</h4>
219         <b>Request:</b>
220         <pre>
221         &lt;Request class="settings" function="getListMethods"&gt;
222                 &lt;Params/&gt;
223         &lt;/Request&gt;
224         </pre>
225         <b>Response:</b>
226         <pre>
227         &lt;Response class="settings" function="getListMethods"&gt;
228                 &lt;Params&gt;
229                         &lt;string function="..." class="..."&gt; ... &lt;/string&gt;
230                         &lt;string function="..." class="..."&gt; ... &lt;/string&gt;
231                         ...
232                 &lt;/Params&gt;
233         &lt;/Response&gt;
234         </pre>
235                 
236         <h4>testConnection</h4>
237         <b>Request:</b>
238         <pre>
239         &lt;Request class="settings" function="testConnection"&gt;
240                 &lt;Params/&gt;
241         &lt;/Request&gt;
242         </pre>
243         <b>Response:</b> info message or error message.
244
245
246
247         <h3>Profile</h3>
248         <h4>getProfile</h4>
249         <b>Request:</b>
250         <pre>
251         &lt;Request class="profile" function="getProfile"&gt;
252                 &lt;Params id="..."&gt;
253         &lt;/Request&gt;
254         </pre>
255         <p>Attribute <i>id</i> is an id of user whose profile is needed to be received (optional, equals id of owner of current account by default).</p>
256         <b>Response:</b>
257         <pre>
258         &lt;Response class="profile" function="getProfile"&gt;
259                 &lt;Params id="..."&gt;
260                         &lt;string name="FirstName"&gt; ... &lt;/string&gt;
261                         &lt;string name="NickName"&gt; ... &lt;/string&gt;
262                         &lt;string name="LastName"&gt; ... &lt;/string&gt;
263                         &lt;string name="Gender"&gt; ... &lt;/string&gt;
264                         &lt;string name="Birthday"&gt; ... &lt;/string&gt;
265                         &lt;string name="MobilePhone"&gt; ... &lt;/string&gt;
266                         &lt;string name="HomePhone"&gt; ... &lt;/string&gt;
267                         &lt;img name="Img"&gt; ... &lt;/img&gt;
268                         &lt;string name="CityName"&gt; ... &lt;/string&gt;
269                         &lt;string name="CountryName"&gt; ... &lt;/string>
270                 &lt;/Params&gt;
271         &lt;/Response&gt;
272         </pre>
273
274         <h4>getBaseProfile</h4>
275         <b>Request:</b>
276         <pre>
277         &lt;Request class="profile" function="getBaseProfile"&gt;
278                 &lt;Params id="..."&gt;
279         &lt;/Request&gt;
280         </pre>
281         <p>Attribute <i>id</i> is an id of user whose profile is needed to be received (optional, equals id of owner of current account by default).</p>
282         <b>Response:</b>
283         <pre>
284         &lt;Response class="profile" function="getBaseProfile"&gt;
285                 &lt;Params id="..."&gt;
286                         &lt;string name="FirstName"&gt; ... &lt;/string&gt;
287                         &lt;string name="NickName"&gt; ... &lt;/string&gt;
288                         &lt;string name="LastName"&gt; ... &lt;/string&gt;
289                 &lt;/Params&gt;
290         &lt;/Response&gt;
291         </pre>
292
293
294
295         <h3>Friends</h3>
296         <h4>getListFriends</h4>
297         <b>Request:</b>
298         <pre>
299         &lt;Request class="friends" function="getListFriends"&gt;
300                 &lt;Params id="..."&gt;
301                         &lt;number name="page"&gt; ... &lt;/number&gt;
302                         &lt;number name="pageSize"&gt; ... &lt;/number&gt;
303                 &lt;/Params&gt;
304         &lt;/Request&gt;
305         </pre>
306         <ul>
307         <li><i>page</i> - number of page that is requested (optional, positive integer, equals 1 by default)</li>
308         <li><i>pageSize</i> - page size (optional, positive integer, equals 100 by default)</li>
309         <li><i>id</i> - user id (optional, equals id of owner of current account by default) </li>
310         </ul>
311         <b>Response:</b>
312         <pre>
313         &lt;Response class="friends" function="getListFriends"&gt;
314                 &lt;Params id="..."&gt;
315                         &lt;array name="contactList" page="..." pageSize="..." quantity="..."&gt;
316                                 &lt;struct name="contact" id="..."&gt;
317                                         &lt;string name="FirstName"&gt; ... &lt;/string&gt;
318                                         &lt;string name="NickName"&gt; ... &lt;/string&gt;
319                                         &lt;string name="LastName"&gt; ... &lt;/string&gt;
320                                         &lt;string name="FriendStatus"&gt; ... &lt;/string&gt;
321                                         &lt;img name="Img"&gt; ... &lt;/img&gt;
322                                 &lt;/struct&gt;
323                         &lt;/array&gt;
324                 &lt;/Params&gt;
325         &lt;/Response&gt;
326         </pre>
327
328         <h4>deleteFriend</h4>
329         <b>Request:</b>
330         <pre>
331         &lt;Request class="friends" function ="deleteFriend"&gt;
332                 &lt;Params id="..."/&gt;
333         &lt;/Request&gt;
334         </pre>
335         <b>Response:</b> info message or error message.
336
337
338
339         <h3>Photos</h3>
340         <h4>createAlbum</h4>
341         <b>Request:</b>
342         <pre>
343         &lt;Request class="photos" function="createAlbum"&gt;
344                 &lt;Params id="..."&gt;
345                         &lt;string name="name"&gt; ... &lt;/string&gt;
346                         &lt;string name="description"&gt; ... &lt;/string&gt;
347                         &lt;string name="privacy"&gt;PRIVACY&lt;/string&gt;
348                 &lt;/Params&gt;
349         &lt;/Request&gt;
350         </pre>
351         PRIVACY can have following values: 
352         <ul>
353         <li>SELF - created album will be available only for its owner; </li>
354         <li>ALL_FRIENDS - created album will be available for owner's friends;</li>
355         <li>FRIENDS_OF_FRIENDS - created album will be available only for owner's friends and their friends; </li>
356         <li>EVERYONE - created album will be available only for every user.</li>
357         </ul>
358         <p>This set of values can be extended. If PRIVACY isn't set, driver use default setting for all new albums which are set by user.</p>
359         <ul>
360         <li><i>id</i> - optional, equals id of owner of current account by default </li>
361         <li><i>name</i> - optional, equals "no_name" by default</li>
362         <li><i>description</i> - optional </li>
363         </ul>
364         <b>Response:</b>
365         <pre>
366         &lt;Response class="photos" function="createAlbum"&gt;
367                 &lt;Params id="..."&gt;
368                         &lt;string name="albumId"&gt; ... &lt;/string&gt;
369                 &lt;/Params&gt;
370         &lt;/Response&gt;
371         </pre>
372
373         <h4>getListAlbums</h4>
374         <b>Request:</b>
375         <pre>
376         &lt;Request class="photos" function="getListAlbums"&gt;
377                 &lt;Params id="..."/&gt;
378         &lt;/Request&gt;
379         </pre>
380         <p><i>id</i> - optional, equals id of owner of current account by default.</p>
381         <b>Response:</b>
382         <pre>
383         &lt;Response class="photos" function="getListAlbums"&gt;
384                 &lt;Params&gt;
385                         &lt;array name="albumList" quantity="..." ownerId="..."&gt;
386                                 &lt;struct name="album" id="..."&gt;
387                                         &lt;string name="title"&gt; ... &lt;/string&gt;
388                                         &lt;string name="description"&gt; ... &lt;/string&gt;
389                                         &lt;string name="thumbId"&gt; ... &lt;/string&gt;
390                                         &lt;img name="Img"&gt; ... &lt;/img&gt;
391                                         &lt;number name="created"&gt; ... &lt;/number&gt;
392                                         &lt;number name="updated"&gt; ... &lt;/number&gt;
393                                         &lt;number name="size"&gt; ... &lt;/number&gt;
394                                         &lt;number name="canUpload"&gt; ... &lt;/number&gt;
395                                 &lt;/struct&gt;
396                         &lt;/array&gt;
397                 &lt;/Params&gt;
398         &lt;/Response&gt;
399         </pre>
400         <p><i>canUpload</i> - optional, if this parameter isn't set, it means that album is available for current user.</p>
401
402         <h4>uploadPhoto</h4>
403         <b>Request:</b>
404         <pre>
405         &lt;Request class=&quot;photos&quot; function = &quot;uploadPhoto&quot;&gt;
406                 &lt;Params&gt;
407                         &lt;string name=&quot;albumId&quot;&gt; ... &lt;/string&gt;
408                         &lt;string name=&quot;albumName&quot;&gt; ... &lt;/string&gt;
409                         &lt;string name=&quot;albumPrivacy&quot;&gt; ... &lt;/string&gt;
410                         &lt;string name=&quot;albumDescription&quot;&gt; ... &lt;/string&gt;
411                         &lt;string name=&quot;file&quot;&gt; ... &lt;/string&gt;
412                         &lt;string name=&quot;fileName&quot;&gt; ... &lt;/string&gt;
413                         &lt;string name=&quot;description&quot;&gt; ... &lt;/string&gt;
414                         &lt;string name=&quot;tags&quot;&gt; ... &lt;/string&gt;
415                 &lt;/Params&gt;
416         &lt;/Request&gt;
417         </pre>
418         <ul>
419         <li>There have to be only one of parameters <i>albumName</i> or <i>albumId</i> in request.</li>
420         <li>If <i>albumId</i> is set, photo is uploaded to this album.</li>
421         <li>If <i>albumId</i> isn't specified, new album is created (with name <i>albumName</i>, description <i>albumDescription</i> and private settings <i>albumPrivacy</i>). </li>
422         <li>If both parameters <i>albumName</i> and <i>albumId</i> aren't specified, driver returns error message or photo is uploaded to common album, which is available in some services.</li>
423         <li>Parameter <i>tags</i> can not be supported by some services.</li>
424         <li>Parameter <i>file</i> contains full path to file for sending.</li>
425         <li>Parameter <i>fileName</i> contains name of file for upload.</li>
426         </ul>
427         <b>Response:</b>
428         <pre>
429         &lt;Response class=&quot;photos&quot; function = &quot;uploadPhoto&quot;&gt;
430                 &lt;Params&gt;
431                         &lt;string name=&quot;albumId&quot;&gt; ... &lt;/string&gt;
432                         &lt;string name=&quot;photoId&quot;&gt; ... &lt;/string&gt;
433                 &lt;/Params&gt;
434         &lt;/Response&gt;
435         </pre>
436
437         <h4>getListPhotos</h4>
438         <b>Request:</b>
439         <pre>
440         &lt;Request class=&quot;photos&quot; function = &quot;getListPhotos&quot;&gt;
441                 &lt;Params id=&quot;...&quot;&gt;
442                         &lt;string name=&quot;albumId&quot;&gt; ... &lt;/string&gt;
443                         &lt;number name=&quot;page&quot;&gt; ... &lt;/number&gt;
444                         &lt;number name=&quot;pageSize&quot;&gt; ... &lt;/number&gt;
445                 &lt;/Params&gt;
446         &lt;/Request&gt;
447         </pre>
448         <ul>
449         <li><i>page</i> - number of page that is requested (optional, positive integer, equals 1 by default)</li>
450         <li><i>pageSize</i> - page size (optional, positive integer, equals 100 by default)</li>
451         <li><i>id</i> - user id (optional, equals id of owner of current account by default) </li>
452         </ul>
453         <b>Response:</b>
454         <pre>
455         &lt;Response class=&quot;photos&quot; function=&quot;getListPhotos&quot;&gt;
456                 &lt;Params&gt;
457                         &lt;array name=&quot;photosList&quot; page=&quot;...&quot; pageSize=&quot;...&quot; quantity=&quot;...&quot; ownerId=&quot;...&quot; albumId=&quot;...&quot;&gt;
458                                 &lt;struct name=&quot;photo&quot; id=&quot;...&quot;/&gt;
459                                         &lt;string name=&quot;urlSmall&quot;&gt; ... &lt;/string&gt;
460                                         &lt;string name=&quot;urlBig&quot;&gt; ... &lt;/string&gt;
461                                         &lt;string name=&quot;urlOrig&quot;&gt; ... &lt;/string&gt;
462                                         &lt;string name=&quot;description&quot;&gt; ... &lt;/string&gt;
463                                         &lt;number name=&quot;created&quot;&gt; ... &lt;/number&gt;
464                                 &lt;/struct&gt;
465                         &lt;/array&gt;
466                 &lt;/Params&gt;
467         &lt;/Response&gt;
468         </pre>
469
470         <h4>getListUserPhotos</h4>
471         <b>Request:</b>
472         <pre>
473         &lt;Request class=&quot;photos&quot; function = &quot;getListUserPhotos&quot;&gt;
474                 &lt;Params id=&quot;...&quot;&gt;
475                         &lt;number name=&quot;page&quot;&gt; ... &lt;/number&gt;
476                         &lt;number name=&quot;pageSize&quot;&gt; ... &lt;/number&gt;
477                 &lt;/Params&gt;
478         &lt;/Request&gt;
479         </pre>
480         <ul>
481         <li><i>page</i> - number of page that is requested (optional, positive integer, equals 1 by default)</li>
482         <li><i>pageSize</i> - page size (optional, positive integer, equals 100 by default)</li>
483         <li><i>id</i> - user id (optional, equals id of owner of current account by default) </li>
484         </ul>
485         <b>Response:</b>
486         <pre>
487         &lt;Response class=&quot;photos&quot; function=&quot;getListUserPhotos&quot;&gt;
488                 &lt;Params&gt;
489                         &lt;array name=&quot;photosList&quot; page=&quot;...&quot; pageSize=&quot;...&quot; quantity=&quot;...&quot;&gt;
490                                 &lt;struct name=&quot;photo&quot; id=&quot;...&quot;/&gt;
491                                         &lt;string name=&quot;ownerId&quot;&gt; ... &lt;/string&gt;
492                                         &lt;string name=&quot;albumId&quot;&gt; ... &lt;/string&gt;
493                                         &lt;string name=&quot;urlSmall&quot;&gt; ... &lt;/string&gt;
494                                         &lt;string name=&quot;urlBig&quot;&gt; ... &lt;/string&gt;
495                                         &lt;string name=&quot;urlOrig&quot;&gt; ... &lt;/string&gt;
496                                         &lt;string name=&quot;description&quot;&gt; ... &lt;/string&gt;
497                                         &lt;number name=&quot;created&quot;&gt; ... &lt;/number&gt;
498                                 &lt;/struct&gt;
499                         &lt;/array&gt;
500                 &lt;/Params&gt;
501         &lt;/Response&gt;
502         </pre>
503
504         <h4>getListPhotoTags</h4>
505         <b>Request:</b>
506         <pre>
507         &lt;Request class=&quot;photos&quot; function = &quot;getListPhotoTags&quot;&gt;
508                 &lt;Params&gt;
509                         &lt;string name=&quot;ownerId&quot;&gt; ... &lt;/string&gt;
510                         &lt;string name=&quot;albumId&quot;&gt; ... &lt;/string&gt;
511                         &lt;string name=&quot;photoId&quot;&gt; ... &lt;/string&gt;
512                 &lt;/Params&gt;
513         &lt;/Request&gt;
514         </pre>
515         <b>Response:</b>
516         <pre>
517         &lt;Response class=&quot;photos&quot; function=&quot;getListPhotoTags&quot;&gt;
518                 &lt;Params&gt;
519                         &lt;array name=&quot;tagsList&quot; quantity=&quot;...&quot; ownerId=&quot;...&quot; albumId=&quot;...&quot; photoId=&quot;...&quot;&gt;
520                                 &lt;struct name=&quot;tag&quot; id=&quot;...&quot;/&gt;
521                                         &lt;string name=&quot;userId&quot;&gt; ... &lt;/string&gt;
522                                         &lt;string name=&quot;text&quot;&gt; ... &lt;/string&gt;
523                                         &lt;number name=&quot;created&quot;&gt; ... &lt;/number&gt;
524                                 &lt;/struct&gt;
525                         &lt;/array&gt;
526                 &lt;/Params&gt;
527         &lt;/Response&gt;
528         </pre>
529         <p>Parameter <i>userId</i> is an id of user which is marked on photo (optional).</p>
530
531         <h4>getListFavoritePhotos</h4>
532         <b>Request:</b>
533         <pre>
534         &lt;Request class=&quot;photos&quot; function = &quot;getListFavoritePhotos&quot;&gt;
535                 &lt;Params id=&quot;...&quot;&gt;
536                         &lt;number name=&quot;page&quot;&gt; ... &lt;/number&gt;
537                         &lt;number name=&quot;pageSize&quot;&gt; ... &lt;/number&gt;
538                 &lt;/Params&gt;
539         &lt;/Request&gt;
540         </pre>
541         <ul>
542         <li><i>page</i> - number of page that is requested (optional, positive integer, equals 1 by default)</li>
543         <li><i>pageSize</i> - page size (optional, positive integer, equals 100 by default)</li>
544         <li><i>id</i> - user id (optional, equals id of owner of current account by default) </li>
545         </ul>
546         <b>Response:</b>
547         <pre>
548         &lt;Response class=&quot;photos&quot; function=&quot;getListFavoritePhotos&quot;&gt;
549                 &lt;Params&gt;
550                         &lt;array name=&quot;photosList&quot; page=&quot;...&quot; pageSize=&quot;...&quot; quantity=&quot;...&quot;&gt;
551                                 &lt;struct name=&quot;photo&quot; id=&quot;...&quot;/&gt;
552                                         &lt;string name=&quot;ownerId&quot;&gt; ... &lt;/string&gt;
553                                         &lt;string name=&quot;albumId&quot;&gt; ... &lt;/string&gt;
554                                         &lt;string name=&quot;urlSmall&quot;&gt; ... &lt;/string&gt;
555                                         &lt;string name=&quot;urlBig&quot;&gt; ... &lt;/string&gt;
556                                         &lt;string name=&quot;urlOrig&quot;&gt; ... &lt;/string&gt;
557                                         &lt;string name=&quot;description&quot;&gt; ... &lt;/string&gt;
558                                         &lt;number name=&quot;created&quot;&gt; ... &lt;/number&gt;
559                                 &lt;/struct&gt;
560                         &lt;/array&gt;
561                 &lt;/Params&gt;
562         &lt;/Response&gt;
563         </pre>
564
565         <h4>getPhoto</h4>
566         <b>Request:</b>
567         <pre>
568         &lt;Request class=&quot;photos&quot; function = &quot;getPhoto&quot;&gt;
569                 &lt;Params&gt;
570                         &lt;string name=&quot;url&quot;&gt; ... &lt;/string&gt;
571                         &lt;string name=&quot;path&quot;&gt; ... &lt;/string&gt;
572                 &lt;/Params&gt;
573         &lt;/Request&gt;
574         </pre>
575         <b>Response:</b> info message or error message.
576
577         <h4>getListPhotoComments</h4>
578         <b>Request:</b>
579         <pre>
580         &lt;Request class=&quot;photos&quot; function = &quot;getListPhotoComments&quot;&gt;
581                 &lt;Params&gt;
582                         &lt;string name=&quot;ownerId&quot;&gt; ... &lt;/string&gt;
583                         &lt;string name=&quot;albumId&quot;&gt; ... &lt;/string&gt;
584                         &lt;string name=&quot;photoId&quot;&gt; ... &lt;/string&gt;
585                         &lt;number name=&quot;page&quot;&gt; ... &lt;/number&gt;
586                         &lt;number name=&quot;pageSize&quot;&gt; ... &lt;/number&gt;
587                 &lt;/Params&gt;
588         &lt;/Request&gt;
589         </pre>
590         <ul>
591         <li><i>page</i> - number of page that is requested (optional, positive integer, equals 1 by default)</li>
592         <li><i>pageSize</i> - page size (optional, positive integer, equals 100 by default)</li>
593         </ul>
594         <b>Response:</b>
595         <pre>
596         &lt;Response class=&quot;photos&quot; function=&quot;getListPhotoComments&quot;&gt;
597                 &lt;Params&gt;
598                         &lt;array name=&quot;commentsList&quot; page=&quot;...&quot; pageSize=&quot;...&quot;  quantity=&quot;...&quot; ownerId=&quot;...&quot; albumId=&quot;...&quot; photoId=&quot;...&quot;&gt;
599                                 &lt;struct name=&quot;comment&quot; id=&quot;...&quot;/&gt;
600                                         &lt;string name=&quot;ParentId&quot;&gt; ... &lt;/string&gt;
601                                         &lt;string name=&quot;SenderId&quot;&gt; ... &lt;/string&gt;
602                                         &lt;string name=&quot;SenderName&quot;&gt; ... &lt;/string&gt;
603                                         &lt;string name=&quot;Time&quot;&gt; ... &lt;/string&gt;
604                                         &lt;string name=&quot;Text&quot;&gt; ... &lt;/string&gt;
605                                 &lt;/struct&gt;
606                         &lt;/array&gt;
607                 &lt;/Params&gt;
608         &lt;/Response&gt;
609         </pre>
610         <p>Parameter <i>ParentId</i> is an id of previous comment, if there is such one  (optional).</p>
611
612         <h4>sendPhotoComment</h4>
613         <b>Request:</b>
614         <pre>
615         &lt;Request class=&quot;photos&quot; function=&quot;sendPhotoComment&quot;&gt;
616                 &lt;Params&gt;
617                         &lt;string name=&quot;ownerId&quot;&gt; ... &lt;/string&gt;
618                         &lt;string name=&quot;albumId&quot;&gt; ... &lt;/string&gt;
619                         &lt;string name=&quot;photoId&quot;&gt; ... &lt;/string&gt;
620                         &lt;string name=&quot;text&quot;&gt; ... &lt;/string&gt;
621                 &lt;/Params&gt;
622         &lt;/Request&gt;
623         </pre>
624         <b>Response:</b> info message or error message.
625         
626
627
628         <h3>Messages</h3>
629         <h4>getListOutboxMessages</h4>
630         <b>Request:</b>
631         <pre>
632         &lt;Request class=&quot;messages&quot; function=&quot;getListOutboxMessages&quot;&gt;
633                 &lt;Params&gt;
634                         &lt;number name=&quot;page&quot;&gt; ... &lt;/number&gt;
635                         &lt;number name=&quot;pageSize&quot;&gt; ... &lt;/number&gt;
636                         &lt;number name=&quot;timeOffset&quot;&gt; ... &lt;/number&gt;
637                 &lt;/Params&gt;
638         &lt;/Request&gt;
639         </pre>
640         <ul>
641         <li><i>page</i> - number of page that is requested (optional, positive integer, equals 1 by default)</li>
642         <li><i>pageSize</i> - page size (optional, positive integer, equals 100 by default)</li>
643         <li><i>timeOffset</i> - time offset for requested messages</li>
644         </ul>
645         <b>Response:</b>
646         <pre>
647         &lt;Response class=&quot;messages&quot; function = &quot;getListOutboxMessages&quot;&gt;              
648                 &lt;Params&gt;
649                         &lt;array name=&quot;messageList&quot; page=&quot;...&quot; pageSize=&quot;...&quot; quantity=&quot;...&quot;&gt;
650                                 &lt;struct name=&quot;message&quot; id=&quot;...&quot;&gt;             
651                                         &lt;string name=&quot;SenderId&quot;&gt; ... &lt;/string&gt;
652                                         &lt;string name=&quot;SenderName&quot;&gt; ... &lt;/string&gt;
653                                         &lt;array name=&quot;recipientList&quot; quantity=&quot;...&quot;&gt;
654                                                 &lt;struct name=&quot;recipient&quot;&gt;
655                                                         &lt;string name=&quot;RecipientId&quot;&gt; ... &lt;/string&gt;
656                                                         &lt;string name=&quot;RecipientName&quot;&gt; ... &lt;/string&gt;
657                                                 &lt;/struct&gt;
658                                         &lt;/array&gt;
659                                         &lt;string name=&quot;Time&quot;&gt; ... &lt;/string&gt;
660                                         &lt;string name=&quot;Title&quot;&gt; ... &lt;/string&gt;
661                                         &lt;string name=&quot;Text&quot;&gt; ... &lt;/string&gt;
662                                         &lt;string name=&quot;Status&quot;&gt; ... &lt;/string&gt;
663                                         &lt;attachment id=&quot;...&quot; ownerId=&quot;...&quot; type=&quot;...&quot;&gt;
664                                          ...
665                                         &lt;/attachment&gt;
666                                 &lt;/struct&gt;
667                         &lt;/array&gt;
668                 &lt;/Params&gt;
669         &lt;/Response&gt;
670         </pre>
671         <p>Parameter <i>attachment</i> is optional, its content depends on attribute <i>type</i> and can have following values:</p>
672         <pre>
673         &lt;attachment id=&quot;...&quot; ownerId=&quot;...&quot; type=&quot;image&quot;&gt;
674                 &lt;string name=&quot;name&quot;&gt; ... &lt;/string&gt;      
675                 &lt;string name=&quot;albumId&quot;&gt; ... &lt;/string&gt;
676                 &lt;string name=&quot;urlSmall&quot;&gt; ... &lt;/string&gt;
677                 &lt;string name=&quot;urlBig&quot;&gt; ... &lt;/string&gt;
678         &lt;/attachment&gt;
679
680         &lt;attachment id=&quot;...&quot; ownerId=&quot;...&quot; type=&quot;video&quot;&gt;
681                 &lt;string name=&quot;name&quot;&gt; ... &lt;/string&gt;
682                 &lt;string name=&quot;url&quot;&gt; ... &lt;/string&gt;
683                 &lt;number name=&quot;duration&quot;&gt; ... &lt;/number&gt;
684                 &lt;string name=&quot;urlImage&quot;&gt; ... &lt;/string&gt;
685         &lt;/attachment&gt;
686
687         &lt;attachment id=&quot;...&quot; ownerId=&quot;...&quot; type=&quot;audio&quot;&gt;
688                 &lt;string name=&quot;name&quot;&gt; ... &lt;/string&gt;
689                 &lt;string name=&quot;url&quot;&gt; ... &lt;/string&gt;
690                 &lt;number name=&quot;duration&quot;&gt; ... &lt;/number&gt;
691         &lt;/attachment&gt;
692
693         &lt;attachment id=&quot;...&quot; ownerId=&quot;...&quot; type=&quot;link&quot;&gt;
694                 &lt;string name=&quot;name&quot;&gt; ... &lt;/string&gt;
695                 &lt;string name=&quot;url&quot;&gt; ... &lt;/string&gt;
696                 &lt;string name=&quot;urlImage&quot;&gt; ... &lt;/string&gt;
697         &lt;/attachment&gt;
698
699         &lt;attachment id=&quot;...&quot; ownerId=&quot;...&quot; type=&quot;note&quot;&gt;
700                 &lt;string name=&quot;name&quot;&gt; ... &lt;/string&gt;
701                 &lt;string name=&quot;url&quot;&gt; ... &lt;/string&gt;
702         &lt;/attachment&gt;
703         </pre>
704
705
706
707
708
709         <h3>Audio</h3>
710         <h4>getListAudio</h4>
711         <b>Request:</b>
712         <pre>
713         &lt;Request class="audio" function="getListAudio"&gt;
714                 &lt;Params id="..."&gt;
715                 &lt;/Params&gt;
716         &lt;/Request&gt;
717         </pre>
718         <b>Response:</b>
719         <pre>
720         &lt;Response class="audio" function="getListAudio"&gt;
721                 &lt;Params id="..."&gt;
722                         &lt;array name="audioList" quantity="..." ownerId="..."&gt;
723                                 &lt;struct name="audio" id="..."&gt;
724                                         &lt;string name="title"&gt; ... &lt;/string&gt;
725                                         &lt;string name="artist"&gt; ... &lt;/string&gt;
726                                         &lt;number name="duration"&gt; ... &lt;/number&gt;
727                                         &lt;string name="audio"&gt; ...url... &lt;/string&gt;
728                                 &lt;/struct&gt;
729                         &lt;/array&gt;
730                 &lt;/Params&gt;
731         &lt;/Response&gt;
732         </pre>
733
734
735
736         <h3>Video</h3>
737         <h4>getListVideo</h4>
738         <b>Request:</b>
739         <pre>
740         &lt;Request class="video" function="getListVideo"&gt;
741                 &lt;Params id="..."&gt;
742                 &lt;/Params&gt;
743         &lt;/Request&gt;
744         </pre>
745         <b>Response:</b>
746         <pre>
747         &lt;Response class="video" function="getListVideo"&gt;
748                 &lt;Params&gt;
749                         &lt;array name="videoList" quantity="..." ownerId="..."&gt;
750                                 &lt;struct name="video" id="..."&gt;
751                                         &lt;string name="title"&gt; ... &lt;/string&gt;
752                                         &lt;string name="description"&gt; ... &lt;/string&gt;
753                                         &lt;number name="duration"&gt; ... &lt;/number&gt;
754                                         &lt;img name="Img"&gt; ...url... &lt;/img&gt;
755                                         &lt;string name="link"&gt; ...url... &lt;/string&gt;
756                                         &lt;string name="url"&gt; ...url to player... &lt;/string&gt;
757                                 &lt;/struct&gt;
758                         &lt;/array&gt;
759                 &lt;/Params&gt;
760         &lt;/Response&gt;
761         </pre>
762
763
764
765         <h3>News</h3>
766
767         <h3>Info and error messages</h3>
768         <h4>Error message format</h4>
769         <pre>
770         &lt;Response class="systemMessages" function = "errorMessage"&gt;              
771                 &lt;Params&gt;
772                         &lt;string name="moduleName"&gt; ... &lt;/string&gt;
773                         &lt;string name="code"&gt; ... &lt;/string&gt;
774                         &lt;string name="text"&gt; ... &lt;/string&gt;
775                         &lt;string name="comment"&gt; ... &lt;/string&gt;
776                         &lt;string name="type"&gt;user/internal/service &lt;/string&gt;
777                 &lt;/Params&gt;
778         &lt;/Response&gt;
779         </pre>
780
781         <h4>Info message format</h4>
782         <pre>
783         &lt;Response class="systemMessages" function = "infoMessage"&gt;              
784                 &lt;Params&gt;
785                         &lt;string name="moduleName"&gt; ... &lt;/string&gt;
786                 &lt;/Params&gt;
787         &lt;/Response&gt;
788         </pre>
789
790
791       </td>
792       </tr>
793     </table></td>
794   </tr>
795   <tr>
796     <td><table width="92%" border="0" align="right" cellpadding="0"
797     cellspacing="0">
798       <tr>
799         <td class="copybox"> MySocials Project &copy; 2011</td>
800       </tr>
801     </table></td>
802   </tr>
803   <tr>
804     <td height="10">&nbsp;</td>
805   </tr>
806 </table>
807 </body>
808 </html>