-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathParse.js
More file actions
35 lines (33 loc) · 1.1 KB
/
Parse.js
File metadata and controls
35 lines (33 loc) · 1.1 KB
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
var Cloud = require('RebelFrame/Cloud'),
Acl = require('RebelFrame/Acl');
module.exports = {
cloudFunction: function(config) {
new Cloud({
url: 'https://api.parse.com/1/functions/' + config.function,
method: 'POST',
json: true,
data: config.data || {},
headers: {
'X-Parse-Application-Id': Alloy.CFG.Parse.applicationId,
'X-Parse-REST-API-Key': Alloy.CFG.Parse.apiKey,
'X-Parse-Session-Token': Acl.cloudAccessToken
},
success: config.success,
error: config.error
});
},
config: function(config) {
new Cloud({
url: 'https://api.parse.com/1/config/',
method: 'GET',
json: true,
headers: {
'X-Parse-Application-Id': Alloy.CFG.Parse.applicationId,
'X-Parse-REST-API-Key': Alloy.CFG.Parse.apiKey,
'X-Parse-Session-Token': Acl.cloudAccessToken
},
success: config.success,
error: config.error
});
}
};