/
blabla.entry.xml
153 lines (144 loc) · 6.07 KB
/
blabla.entry.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<author>Iker Azpeitia</author>
<documentationURL>http://rifers.org/wiki/display/BLA/REST%20API.html</documentationURL>
<sampleQuery>INSERT INTO {table} (login, password, listId, name) VALUES ('oscaronekin', '12osin34', '40886', 'Test task');</sampleQuery>
<sampleQuery>UPDATE {table} SET fromPriority='6', toPriority='0' WHERE login= 'oscaronekin' AND password='12osin34' AND listId = '40886'</sampleQuery>
<sampleQuery>UPDATE {table} SET done='true' WHERE login= 'oscaronekin' AND password='12osin34' AND id = '254075'</sampleQuery>
<sampleQuery>UPDATE {table} SET name='name changed' WHERE login= 'oscaronekin' AND password='12osin34' AND id = '254075' AND listId = '40886'</sampleQuery>
<sampleQuery>DELETE FROM {table} WHERE login= 'oscaronekin' AND password='12osin34' AND id = '254075' AND listId = '40886'</sampleQuery>
</meta>
<bindings>
<insert itemPath="" produces="XML">
<urls>
<url></url>
</urls>
<inputs>
<key id="login" type="xs:string" paramType="variable" required="true"/>
<key id="password" type="xs:string" paramType="variable" required="true"/>
<key id="listId" type="xs:string" paramType="variable" required="true"/>
<key id="name" type="xs:string" paramType="variable" required="true"/>
</inputs>
<execute>
<![CDATA[
var url='http://blablalist.com/addentry?';
var q=url+'submission=credentials&login=';
q=q+login;
q=q+'&password='+password;
q=q+'&submission=add';
q=q+'&listId='+listId;
name = escape(name);
q=q+'&name='+name;
var results= y.rest(q).post().response;
var res = new XML (results);
response.object = res;
]]>
</execute>
</insert>
<update itemPath="" produces="XML">
<urls>
<url></url>
</urls>
<inputs>
<key id="login" type="xs:string" paramType="variable" required="true"/>
<key id="password" type="xs:string" paramType="variable" required="true"/>
<key id="listId" type="xs:string" paramType="variable" required="true"/>
<value id="fromPriority" type="xs:string" paramType="variable" required="true"/>
<value id="toPriority" type="xs:string" paramType="variable" required="true"/>
</inputs>
<execute>
<![CDATA[
var url='http://blablalist.com/reorderentry?';
var q=url+'submission=credentials&login=';
q=q+login;
q=q+'&password='+password;
q=q+'&submission=reorderEntry';
q=q+'&listId='+listId;
q=q+'&from='+fromPriority;
q=q+'&to='+toPriority;
var results= y.rest(q).post().response;
var res = new XML (results);
response.object = res;
]]>
</execute>
</update>
<update itemPath="" produces="XML">
<urls>
<url></url>
</urls>
<inputs>
<key id="login" type="xs:string" paramType="variable" required="true"/>
<key id="password" type="xs:string" paramType="variable" required="true"/>
<key id="id" type="xs:string" paramType="variable" required="true"/>
<value id="done" type="xs:string" paramType="variable" required="true"/>
</inputs>
<execute>
<![CDATA[
var url='http://blablalist.com/toggleentry?';
var q=url+'submission=credentials&login=';
q=q+login;
q=q+'&password='+password;
q=q+'&submission=toggle';
q=q+'&id='+id;
q=q+'&done='+done;
var results= y.rest(q).post().response;
var res = new XML (results);
response.object = res;
]]>
</execute>
</update>
<update itemPath="" produces="XML">
<urls>
<url></url>
</urls>
<inputs>
<key id="login" type="xs:string" paramType="variable" required="true"/>
<key id="password" type="xs:string" paramType="variable" required="true"/>
<key id="listId" type="xs:string" paramType="variable" required="true"/>
<key id="id" type="xs:string" paramType="variable" required="true"/>
<value id="name" type="xs:string" paramType="variable" required="true"/>
</inputs>
<execute>
<![CDATA[
var url='http://blablalist.com/editlist?';
var q=url+'submission=credentials&login=';
q=q+login;
q=q+'&password='+password;
q=q+'&submission=edit';
q=q+'&id='+listId;
name = escape(name);
q=q+'&entry'+id+'='+name;
var results= y.rest(q).post().response;
var res = new XML (results);
response.object = res;
]]>
</execute>
</update>
<delete itemPath="" produces="XML">
<urls>
<url></url>
</urls>
<inputs>
<key id="login" type="xs:string" paramType="variable" required="true"/>
<key id="password" type="xs:string" paramType="variable" required="true"/>
<key id="listId" type="xs:string" paramType="variable" required="true"/>
<key id="id" type="xs:string" paramType="variable" required="true"/>
</inputs>
<execute>
<![CDATA[
var url='http://blablalist.com/editlist?';
var q=url+'submission=credentials&login=';
q=q+login;
q=q+'&password='+password;
q=q+'&submission=edit';
q=q+'&id='+listId;
q=q+'&remove='+id;
var results= y.rest(q).post().response;
var res = new XML (results);
response.object = res;
]]>
</execute>
</delete>
</bindings>
</table>