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