- API Command
- should return encoded URL for the specified command and parameters
- should URL encode any special characters in parameters
- Secure API Command
- should use HTTPS
- Command executor
- should create an API command with the given params
- should send the URI generated by the created command via HTTP get and return the response
- should send the command over a secure HTTPS connection if :secure option is set to true
- API
- should use the api_id, username and password to authenticate and return the new session id
- should support ping, using the current session_id
- should support sending messages to a specified number, returning the message id
- should set the :from parameter and set the :req_feat to 48 when using a custom from string when sending a message
- should set the :mo flag to 1 when :set_mobile_originated is true when sending a message
- should ignore any invalid parameters when sending a message
- should support message status query for a given message id, returning the message status
- should support balance query, returning number of credits as a float
- should raise an API::Error if the response parser raises
- Clickatell::API when authenticating
- should authenticate to retrieve a session_id and return a new API instance using that session id
- Clickatell::API with no authentication options set
- should build commands with no authentication options
- Clickatell::API in secure mode
- should execute commands securely
- API Error
- should parse http response string to create error
- Hash
- should return only the keys specified
- should return only the keys specified, ignoring keys that do not exist
- Response parser
- should return hash for one-line success response
- should raise API::Error if response contains an error message