Module: MLS
Defined Under Namespace
Modules: Avatar, Slugger
Classes: Model
Constant Summary
collapse
- API_VERSION =
'0.1.0'
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.asset_host ⇒ Object
14
15
16
|
# File 'lib/mls.rb', line 14
def self.asset_host
config['asset_host']
end
|
.config ⇒ Object
22
23
24
|
# File 'lib/mls.rb', line 22
def self.config
@config ||= MLS::Model.connection.server_config
end
|
.image_host ⇒ Object
18
19
20
|
# File 'lib/mls.rb', line 18
def self.image_host
config['image_host']
end
|
.with_api_key(key, &block) ⇒ Object
34
35
36
37
38
39
|
# File 'lib/mls.rb', line 34
def self.with_api_key(key, &block)
Thread.current[:sunstone_api_key] = key
yield
ensure
Thread.current[:sunstone_api_key] = nil
end
|
.with_cookie_store(store, &block) ⇒ Object
Set a cookie jar to use during request sent during the
27
28
29
30
31
32
|
# File 'lib/mls.rb', line 27
def self.with_cookie_store(store, &block)
Thread.current[:sunstone_cookie_store] = store
yield
ensure
Thread.current[:sunstone_cookie_store] = nil
end
|
Instance Method Details
7
8
9
10
11
12
|
# File 'lib/mls.rb', line 7
def
super
super.merge({
'Api-Version' => API_VERSION
})
end
|