35 lines
1.0 KiB
JavaScript
35 lines
1.0 KiB
JavaScript
|
/* DO NOT MODIFY. This file was compiled Mon, 27 Jun 2011 17:49:39 GMT from
|
||
|
* /Users/chez/Sites/beathaven/app/coffeescripts/session.coffee
|
||
|
*/
|
||
|
|
||
|
(function() {
|
||
|
var Session;
|
||
|
Session = (function() {
|
||
|
Session.prototype.vk_params = null;
|
||
|
Session.prototype.user = null;
|
||
|
function Session(vk_params) {
|
||
|
this.vk_params = vk_params;
|
||
|
}
|
||
|
Session.prototype.query = function(url, params, callback) {
|
||
|
var attr, q_params, _i, _len;
|
||
|
q_params = this.vk_params;
|
||
|
for (_i = 0, _len = params.length; _i < _len; _i++) {
|
||
|
attr = params[_i];
|
||
|
q_params[attr] = params[attr];
|
||
|
}
|
||
|
$.post(url, q_params, callback);
|
||
|
return false;
|
||
|
};
|
||
|
Session.prototype.setVkParams = function(params) {
|
||
|
var attrs, key, _i, _len;
|
||
|
attrs = ['expire', 'mid', 'secret', 'sid', 'sig'];
|
||
|
for (_i = 0, _len = attrs.length; _i < _len; _i++) {
|
||
|
key = attrs[_i];
|
||
|
this.vk_params[key] = params[key];
|
||
|
}
|
||
|
return false;
|
||
|
};
|
||
|
return Session;
|
||
|
})();
|
||
|
}).call(this);
|