Class: Smsapi::Server
- Inherits:
-
Object
- Object
- Smsapi::Server
- Defined in:
- lib/smsapi/server.rb,
lib/smsapi/server/connection.rb
Defined Under Namespace
Classes: Connection
Instance Method Summary collapse
-
#initialize(username, password) ⇒ Server
constructor
A new instance of Server.
- #sms(params = {}) ⇒ Object
- #user(params = {}) ⇒ Object
Constructor Details
#initialize(username, password) ⇒ Server
Returns a new instance of Server.
3 4 5 6 7 |
# File 'lib/smsapi/server.rb', line 3 def initialize(username, password) @username = username @password = password @connection = setup_connection end |
Instance Method Details
#sms(params = {}) ⇒ Object
14 15 16 17 |
# File 'lib/smsapi/server.rb', line 14 def sms(params = {}) api_response = make_request(Smsapi::API[:sms_path], params) api_response.split(';') end |
#user(params = {}) ⇒ Object
9 10 11 12 |
# File 'lib/smsapi/server.rb', line 9 def user(params = {}) api_response = make_request(Smsapi::API[:user_path], params) api_response.split(';') end |