Module: Namba::APIMethods

Included in:
Client
Defined in:
lib/namba/api_methods.rb

Instance Method Summary collapse

Instance Method Details

#get_eventsObject



25
26
27
# File 'lib/namba/api_methods.rb', line 25

def get_events
  post_data_to "http://api.namba.#{self.locale}/getEvents.php"
end

#get_friends_list(name = self.username) ⇒ Object



17
18
19
# File 'lib/namba/api_methods.rb', line 17

def get_friends_list name = self.username
  get_response_from "http://api.namba.#{self.locale}/friends.php?username=" + name
end

#get_last_mailObject



33
34
35
# File 'lib/namba/api_methods.rb', line 33

def get_last_mail
  post_data_to "http://api.namba.#{self.locale}/getLastMail.php"
end

#get_new_mail_countObject



29
30
31
# File 'lib/namba/api_methods.rb', line 29

def get_new_mail_count
  post_data_to "http://api.namba.#{self.locale}/getNewMailCount.php"
end

#get_user_info(name = self.username) ⇒ Object



6
7
8
# File 'lib/namba/api_methods.rb', line 6

def  name = self.username
  get_response_from "http://api.namba.#{self.locale}/getUserInfo.php?username=" + name
end

#set_status(text) ⇒ Object



21
22
23
# File 'lib/namba/api_methods.rb', line 21

def set_status text
  post_data_to "http://api.namba.#{self.locale}/setStatus.php", { :username => self.username, :password => self.password, :status => text }
end