Module: Echo
- Extended by:
- Configuration
- Defined in:
- lib/echor.rb,
lib/echor/api.rb,
lib/echor/user.rb,
lib/echor/client.rb,
lib/echor/search.rb,
lib/echor/backplane.rb,
lib/echor/configuration.rb
Defined Under Namespace
Modules: Configuration Classes: API, Backplane, Client, Search, User
Constant Summary
Constants included from Configuration
Configuration::DEFAULT_CONSUMER_KEY, Configuration::DEFAULT_CONSUMER_SECRET, Configuration::DEFAULT_ENDPOINT, Configuration::DEFAULT_FORMAT, Configuration::DEFAULT_OAUTH_TOKEN, Configuration::DEFAULT_OAUTH_TOKEN_SECRET, Configuration::DEFAULT_PASSWORD, Configuration::DEFAULT_PROXY, Configuration::DEFAULT_SEARCH_ENDPOINT, Configuration::DEFAULT_USER, Configuration::VALID_FORMATS, Configuration::VALID_OPTIONS_KEYS
Class Method Summary collapse
-
.client(options = {}) ⇒ Echo::Client
Alias for Echo::Client.new.
-
.create_echo_user(config) ⇒ Object
Create a user in the echo server.
Methods included from Configuration
configure, extended, options, reset
Class Method Details
.client(options = {}) ⇒ Echo::Client
Alias for Echo::Client.new
17 18 19 |
# File 'lib/echor.rb', line 17 def self.client(={}) Echo::Client.new() end |
.create_echo_user(config) ⇒ Object
Create a user in the echo server
22 23 24 25 26 |
# File 'lib/echor.rb', line 22 def self.create_echo_user(config) data = {:entry => {:accounts => [{:identityUrl => config[:identityUrl] }]}}.to_json JSON.parse(`curl -u #{Echo.user}:#{Echo.password} --data-binary 'subject=poco&content=#{data}' https://api.echoenabled.com/v1/users/update -k`) end |