Module: BurstSms::MessagesGet

Included in:
API
Defined in:
lib/burstsms/messages_get.rb

Defined Under Namespace

Classes: Messages, Response

Instance Method Summary collapse

Instance Method Details

#get_messages(offset = 0, limit = 50) ⇒ Object



6
7
8
9
# File 'lib/burstsms/messages_get.rb', line 6

def get_messages(offset=0, limit=50)
  response = post_to_api(get_messages_body(offset, limit))
  Response.parse(response.body)
end

#get_messages_body(offset, limit) ⇒ Object



11
12
13
14
# File 'lib/burstsms/messages_get.rb', line 11

def get_messages_body(offset, limit)
  build_request("messages.get", :offset => offset,
                                :limit => limit )
end