Module: ChhMoretext::Request

Included in:
Base
Defined in:
lib/chh_moretext/request.rb

Instance Method Summary collapse

Instance Method Details

#fetch_moretext(number, limit) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/chh_moretext/request.rb', line 3

def fetch_moretext(number, limit)
  number = {:n => "#{number}".to_i}
  limit  = parse(limit)
  condition = limit.nil? ? number : number.merge(limit)

  connection.get("sentences.json", condition).body["sentences"]
end