Class: CellForce::Api
- Inherits:
-
Object
- Object
- CellForce::Api
- Defined in:
- lib/cell_force/api.rb
Defined Under Namespace
Modules: Util Classes: Failure, Http
Constant Summary collapse
- LOG_IN_RESOURCE =
"users/login"- SEND_SMS_RESOURCE =
"member/sendsms"- PARAMETER_FILTER =
[:password, :user_key]
Class Method Summary collapse
Class Method Details
.log_out ⇒ Object
53 54 55 |
# File 'lib/cell_force/api.rb', line 53 def log_out post("users/logout").tap { @login_data = nil } end |
.post(resource, body = {}) ⇒ Object
48 49 50 51 |
# File 'lib/cell_force/api.rb', line 48 def post(resource, body={}) body = Util.convert_sms_args(body.dup) if SEND_SMS_RESOURCE == resource Util.parse_response(post_with_automatic_login(resource, body)) end |