Module: Shove
- Defined in:
- lib/shove.rb,
lib/shove/app.rb,
lib/shove/protocol.rb,
lib/shove/http/request.rb,
lib/shove/app_directory.rb,
lib/shove/http/response.rb,
lib/shove/client/channel.rb,
lib/shove/client/callback.rb,
lib/shove/client/connection.rb,
lib/shove/http/client_context.rb,
lib/shove/http/channel_context.rb
Overview
Shove
See shove.io for an account and client documentation See github.com/shove/shove-ruby for gem documentation See github.com/shove/shove for client documentation
Defined Under Namespace
Modules: Client, Http, Protocol Classes: App, AppDirectory, ShoveException
Constant Summary collapse
- Version =
"1.0.3"
Class Attribute Summary collapse
-
.app ⇒ Object
Returns the value of attribute app.
-
.config ⇒ Object
Returns the value of attribute config.
Class Method Summary collapse
-
.channel(name) ⇒ Object
fetch a channel by name
name
the name of the channel. -
.client(id) ⇒ Object
fetch a client by id.
-
.configure(params = nil, &block) ⇒ Object
configure shover
settings
the settings for the created client as a string for a yaml file, or as a hash. -
.connect ⇒ Object
Connect to the default app with a WebSocket connection.
-
.hosts ⇒ Object
fetch the available stream nodes for this network.
-
.valid? ⇒ Boolean
validate network settings used for the CLI.
Class Attribute Details
.app ⇒ Object
Returns the value of attribute app.
26 27 28 |
# File 'lib/shove.rb', line 26 def app @app end |
.config ⇒ Object
Returns the value of attribute config.
26 27 28 |
# File 'lib/shove.rb', line 26 def config @config end |
Class Method Details
.channel(name) ⇒ Object
fetch a channel by name name
the name of the channel
56 57 58 |
# File 'lib/shove.rb', line 56 def channel name @app.channel(name) end |
.client(id) ⇒ Object
fetch a client by id
61 62 63 |
# File 'lib/shove.rb', line 61 def client id @app.client(id) end |
.configure(params = nil, &block) ⇒ Object
configure shover settings
the settings for the created client as a string for a yaml file, or as a hash
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/shove.rb', line 31 def configure params=nil, &block unless defined? @config @config = Confstruct::Configuration.new do api_url "https://api.shove.io" end end if params @config.configure params end if block @config.configure(&block) end unless defined? @app @app = App.new(@config) else end end |
.connect ⇒ Object
Connect to the default app with a WebSocket connection
79 80 81 |
# File 'lib/shove.rb', line 79 def connect @app.connect end |
.hosts ⇒ Object
fetch the available stream nodes for this network.
73 74 75 |
# File 'lib/shove.rb', line 73 def hosts @app.hosts end |
.valid? ⇒ Boolean
validate network settings used for the CLI
67 68 69 |
# File 'lib/shove.rb', line 67 def valid? @app.valid? end |