Sha256: 93514b57c7416270ab0efe43c50be228e16daabad76030268993318f8f3f51d9
Contents?: true
Size: 543 Bytes
Versions: 6
Compression:
Stored size: 543 Bytes
Contents
module GlobalSMS class INFO def initialize(args) @api_key = args[:api_key] @api_secret = args[:api_secret] end def originator_list uri = "/originator/list?key=#{@api_key}&secret=#{@api_secret}" get_request(uri) end def user_info uri = "/user/info?key=#{@api_key}&secret=#{@api_secret}" get_request(uri) end private def get_request(uri) client = HTTPClient.new response = client.get("#{API_BASE_URL}#{uri}") JSON.parse(response.body) end end end
Version data entries
6 entries across 6 versions & 1 rubygems