module Flickr::Configuration
Provides general configuration options for the library.
Attributes
Required for authenticated requests.
config.access_token_key = "KEY" config.access_token_secret = "SECRET"
For details on how to obtain it, take a look at the {Flickr::OAuth} module.
Required for authenticated requests.
config.access_token_key = "KEY" config.access_token_secret = "SECRET"
For details on how to obtain it, take a look at the {Flickr::OAuth} module.
API key and shared secret are necessary for making API requests. You can apply for them [here].
[api_key]: www.flickr.com/services/apps/create/apply
Enables caching responses. An object that is passed must respond to ‘#read`, `#write` and `#fetch`.
config.cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 1.hour)
Time to wait for the connection to Flickr
to open. After that {Flickr::TimeoutError} is thrown.
When retrieving photos from Flickr
, you can enable automatic compatibility with a pagination library.
config.pagination = :will_paginate
Supports [WillPaginate] and [Kaminari].
[will_paginate]: github.com/mislav/will_paginate [kaminari]: github.com/amatsuda/kaminari
You can choose to go over a proxy.
config.proxy = "http://proxy.com"
You can choose to make requests over a secure connection (SSL).
config.use_ssl = true
Default is ‘false`.
Time to wait for the first block of response from Flickr
. After that {Flickr::TimeoutError} is thrown.
You can choose to make requests over a secure connection (SSL).
config.use_ssl = true
Default is ‘false`.
Public Instance Methods
@return [Array(string, string)] @private
# File lib/flickr/configuration.rb, line 43 def access_token if access_token_key and access_token_secret [access_token_key, access_token_secret] end end
@example
Flickr.configure do |config| config.api_key = "..." config.shared_secret = "..." # ... end
# File lib/flickr/configuration.rb, line 16 def configure yield self self end