🔀 Merge branch 'release/v82'
[Sone.git] / templates / insert / sone.xml
1 <?xml version="1.0" encoding="utf-8" ?>
2 <sone>
3
4         <time><% currentSone.time></time>
5         <protocol-version>0</protocol-version>
6
7         <client>
8                 <name>Sone</name>
9                 <version><% version|xml></version>
10         </client>
11
12         <profile>
13                 <first-name><% currentSone.profile.firstName|xml></first-name>
14                 <middle-name><% currentSone.profile.middleName|xml></middle-name>
15                 <last-name><% currentSone.profile.lastName|xml></last-name>
16                 <birth-day><% currentSone.profile.birthDay|xml></birth-day>
17                 <birth-month><% currentSone.profile.birthMonth|xml></birth-month>
18                 <birth-year><% currentSone.profile.birthYear|xml></birth-year>
19                 <fields>
20                         <%foreach currentSone.profile.fields field>
21                         <field>
22                                 <field-name><% field.name|xml></field-name>
23                                 <field-value><% field.value|xml></field-value>
24                         </field>
25                         <%/foreach>
26                 </fields>
27         </profile>
28
29         <posts>
30                 <%foreach currentSone.posts post>
31                 <post>
32                         <id><% post.id|xml></id>
33                         <recipient><%ifnull !post.recipient><% post.recipient.id|xml><%/if></recipient>
34                         <time><% post.time></time>
35                         <text><% post.text|xml></text>
36                 </post>
37                 <%/foreach>
38         </posts>
39
40         <replies>
41                 <%foreach currentSone.replies reply>
42                 <reply>
43                         <id><% reply.id></id>
44                         <post-id><% reply.post.id|xml></post-id>
45                         <time><% reply.time></time>
46                         <text><% reply.text|xml></text>
47                 </reply>
48                 <%/foreach>
49         </replies>
50
51         <post-likes>
52                 <%foreach currentSone.likedPostIds postId>
53                 <post-like><% postId|xml></post-like>
54                 <%/foreach>
55         </post-likes>
56
57         <reply-likes>
58                 <%foreach currentSone.likedReplyIds replyId>
59                 <reply-like><% replyId|xml></reply-like>
60                 <%/foreach>
61         </reply-likes>
62
63 </sone>