Вход Регистрация
Файл: framework/thirdparty/jasmine-ajax/examples/prototype/public/javascripts/TwitterApi.js
Строк: 24
<?php
function TwitterApi () {
  
this.baseUrl "http://search.twitter.com/search.json"
}

TwitterApi.prototype.search = function(querycallbacks) {
  
this.currentRequest = new Ajax.Request(this.baseUrl, {
    
method'get',
    
parameters: {
      
qquery
    
},

    
onSuccess: function(response){
      var 
tweets = [];
      
response.responseJSON.results.each(function(result){
        
tweets.push(new Tweet(result));
      });

      
callbacks.onSuccess(tweets);
    },
    
onFailure:  callbacks.onFailure,
    
onCompletecallbacks.onComplete,
    
on503:      callbacks.onFailWhale
  
});
};
?>
Онлайн: 0
Реклама