Module: Panda
- Extended by:
- Forwardable, Panda
- Included in:
- Panda
- Defined in:
- lib/panda/base.rb,
lib/panda/panda.rb,
lib/panda/config.rb,
lib/panda/errors.rb,
lib/panda/version.rb,
lib/panda/connection.rb,
lib/panda/proxies/proxy.rb,
lib/panda/proxies/scope.rb,
lib/panda/modules/router.rb,
lib/panda/modules/finders.rb,
lib/panda/resources/cloud.rb,
lib/panda/resources/video.rb,
lib/panda/adapters/adapter.rb,
lib/panda/adapters/faraday.rb,
lib/panda/modules/builders.rb,
lib/panda/modules/viewable.rb,
lib/panda/modules/updatable.rb,
lib/panda/resources/profile.rb,
lib/panda/api_authentication.rb,
lib/panda/modules/destroyers.rb,
lib/panda/resources/encoding.rb,
lib/panda/resources/resource.rb,
lib/panda/adapters/restclient.rb,
lib/panda/modules/video_state.rb,
lib/panda/proxies/video_scope.rb,
lib/panda/modules/associations.rb,
lib/panda/proxies/profile_scope.rb,
lib/panda/proxies/encoding_scope.rb,
lib/panda/modules/cloud_connection.rb
Defined Under Namespace
Modules: Adapter, Associations, Builders, CloudConnection, Destroyers, Finders, Router, Updatable, VideoState, Viewable
Classes: APIError, ApiAuthentication, Base, Cloud, Config, Connection, Encoding, EncodingScope, Error, Profile, ProfileScope, Proxy, Resource, Scope, ServiceNotAvailable, Video, VideoScope
Constant Summary
collapse
- VERSION =
"1.4.2"
- API_PORT =
443
- US_API_HOST =
"api.pandastream.com"
- EU_API_HOST =
"api.eu.pandastream.com"
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#cloud ⇒ Object
Returns the value of attribute cloud.
6
7
8
|
# File 'lib/panda/panda.rb', line 6
def cloud
@cloud
end
|
#clouds ⇒ Object
Returns the value of attribute clouds.
6
7
8
|
# File 'lib/panda/panda.rb', line 6
def clouds
@clouds
end
|
#connection ⇒ Object
Returns the value of attribute connection.
7
8
9
|
# File 'lib/panda/panda.rb', line 7
def connection
@connection
end
|
Instance Method Details
#adapter ⇒ Object
48
49
50
|
# File 'lib/panda/panda.rb', line 48
def adapter
@adapter_class ||= default_adapter
end
|
#adapter=(klass) ⇒ Object
44
45
46
|
# File 'lib/panda/panda.rb', line 44
def adapter=(klass)
@adapter_class = klass
end
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/panda/panda.rb', line 11
def configure(auth_params=nil, &block)
if !auth_params
configure = Config.new
if (block.arity > 0)
block.call(configure)
else
configure.instance_eval(&block)
end
auth_params = configure.to_hash
elsif auth_params.is_a?(String)
auth_params = Config.new.parse_panda_url(auth_params)
end
configure_with_auth_params(auth_params)
true
end
|
30
31
32
33
|
# File 'lib/panda/panda.rb', line 30
def configure_heroku
configure_with_auth_params Config.new.parse_panda_url(ENV['PANDASTREAM_URL'])
true
end
|
#connect!(auth_params) ⇒ Object
35
36
37
|
# File 'lib/panda/panda.rb', line 35
def connect!(auth_params)
@connection = Connection.new(auth_params)
end
|