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(token) ⇒ Server
constructor
A new instance of Server.
- #sms(params = {}) ⇒ Object
- #user(params = {}) ⇒ Object
Constructor Details
#initialize(token) ⇒ Server
Returns a new instance of Server.
3 4 5 6 |
# File 'lib/smsapi/server.rb', line 3 def initialize(token) @token = token @connection = setup_connection end |
Instance Method Details
#sms(params = {}) ⇒ Object
13 14 15 16 |
# File 'lib/smsapi/server.rb', line 13 def sms(params = {}) api_response = make_request(Smsapi::API[:sms_path], params) api_response.split(';') end |
#user(params = {}) ⇒ Object
8 9 10 11 |
# File 'lib/smsapi/server.rb', line 8 def user(params = {}) api_response = make_request(Smsapi::API[:user_path], params) api_response.split(';') end |