blob: e58b24329412593c643fa90f856c10077a4d3733 (
plain)
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
|
var ParseInterface = ParseInterface || null;
(function() {
var cParseInterface = function() {
var application_id = '6jaGjImHFtbJLkAWJRnnLTHfD01nmWHAIrAKNYge';
var javascript_key = 'zA6og358R2Wg5NVAHWj81zeFz2WQZ5u2AhHFPCjN';
Parse.initialize(application_id, javascript_key);
var ContestObject = Parse.Object.extend('ContestObject');
this.get_last_charade = function() {
var that = this;
var query = new Parse.Query(ContestObject);
query.limit(1);
query.descending('createdAt');
query.find({
success: function(response) {
that._process_charade(response[0]);
}
});
};
this._process_charade = function(contest_instance) {
var video_url = contest_instance.get('video_url');
var series_id = contest_instance.get('series_id');
App.answer = contest_instance.get('personId');
App.initialize_video(video_url);
App.get_characters(series_id);
};
return this;
};
ParseInterface = new cParseInterface();
})();
|