Module: TropoRest::Client::Session
- Included in:
- TropoRest::Client
- Defined in:
- lib/tropo_rest/client/session.rb
Constant Summary collapse
- PLURAL_PATH =
"sessions".freeze
Instance Method Summary collapse
-
#create_session(token, params = {}) ⇒ Hashie::Mash
Creates a session for the given token.
Instance Method Details
#create_session(token, params = {}) ⇒ Hashie::Mash
Creates a session for the given token
13 14 15 16 17 18 19 |
# File 'lib/tropo_rest/client/session.rb', line 13 def create_session(token, params={}) params.merge!('token' => token) params.merge!(params) { |k,v| v.to_s } # custom parameters must be strings response = post(PLURAL_PATH, params) response.id = response.id.strip if response.id response end |