Sha256: e6cc5abc566cd2a24533c4d4f904433d38e5253dc47b951d815bfa622cf01706

Contents?: true

Size: 541 Bytes

Versions: 1

Compression:

Stored size: 541 Bytes

Contents

require "sms50X/version"
require "sms50X/configuration"
require "sms50X/client"
require "faraday"

module Sms50X
  extend Configuration

  def self.balance
    response = Faraday.get("#{API_URL}/balance/#{API_KEY}")
    response.body.to_i
  end

  def self.deliver(phone_number, message)
    response = Faraday.get("#{API_URL}/sms/#{API_KEY}", { t: phone_number, m: message } )
    response.body.to_i
  end

  def self.messages_sent(month)
    response = Faraday.get("#{API_URL}/stat/#{API_KEY}/#{month}")
    response.body.to_i
  end


end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sms50X-ruby-0.1.0 lib/sms50X.rb